Author Topic: mplayer - just stopped working...sort of...  (Read 8411 times)

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1350
  • Karma: +26/-0
    • View Profile
mplayer - just stopped working...sort of...
« on: March 30, 2024, 07:23:15 pm »
I've been using mplayer for years...only recently (yesterday in fact) noticed that when attempting to play a MP4 file it looks like no actual video is created, although the app itself starts.

So looking into this I found the following in the LOG:

Quote
MPlayer SVN-r38083-9.1.0 (C) 2000-2021 MPlayer Team
Setting process priority: realtime

Playing G:\tmp\AUTO\20210128_201140.mp4.
Cache fill:  0.00% (0 bytes)

libavformat version 58.65.101 (internal)
libavformat file format detected.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x307b00]Protocol name not provided, cannot determine
 if input is local or a network protocol, buffers and access patterns cannot be
configured optimally without knowing the protocol
[lavf] stream 0: video (h264), -vid 0
VIDEO:  [H264]  1920x1080  24bpp  30.000 fps  34089.8 kbps (4161.4 kbyte/s)
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 58.118.100 (internal)
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
Clip info:
 major_brand: mp42
 minor_version: 0
 compatible_brands: isommp42
 creation_time: 2021-01-29T01:14:08.000000Z
 location: +42.2680-083.0048/
 location-eng: +42.2680-083.0048/
 com.android.version: 10
 com.android.capture.fps: 30.000000
Load subtitles in G:\tmp\AUTO\
Audio: no sound
Starting playback...
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [kva] 1920x1080 => 1920x1080 Planar YV12
KVA: Setup failed!!!
...

...indeed, the "KVA: Setup failed!!!" is reporting out a problem initiating the video outout.

OK, so I went back to my startup CMD, which is:

Code: [Select]
@mode 80,60
G:\apps\multimedia\mplayer\mplayer.exe -xy %1 %2 %3 %4 %5 %6

And here is what my mplayer.ini file looks like:

Quote
# Write your default config options here!
# VIDEO
vo=kva:snap

# 'geometry' settings, where '+0+0' is the top left
# 'x:y' will put the display at this specific location
# 'x%;y%' will put the display at this percentage of the overall screen location (50%:50% would be center of screen)

# slightly moved from LEFT and TOP sides, good for 720 playback
#geometry=10%

# full-screen-width for 1080 playback (fits on HEAD-0 window)
geometry=0%

#aspect=16:9
double=yes              # double buffering(recommended for subtitles)
autoq=100               # AUTO control the video quality
#vf=pp=de,hqdn3d        # additional post-processing options
#vf=pp                  # additional post-processing options
#framedrop="1"          # For slow machines
#hardframedrop="0"      # Make sure hard frame drop is off but can turn on easily now

# AUDIO
ao=kai:dart
#ao=kai:uniaud
#srate=48000
softvol-max=300

#font=g:\psfonts\verdana.ttf
#subfont=g:\psfonts\verdana.ttf

codecpath=g:\apps\multimedia\mplayer\codecs

# OTHER CONTROLS
msglevel:all=5          # set the DEBUG level (5 = DEFAULT)
cache=20480             # set the TOTAL cache size
cache-min=50            # fill xx% of TOTAL cache before playback start
autosync=30             # sync up video/audio by adjusting the algorithm
#mc=1.0                 # up to how many seconds/frame to adjust
priority=realtime       # set the priority of mplayer (idle,belownormal,normal,abovenormal,high,realtime)

# Video Overlay Options and VIO Message Window Options
#really-quiet=yes       # limit what the VIO window shows
#fixed-vo=yes           # keep display output window open between different feeds
colorkey=0x000001       # change the background to off-black, instead of bright green

# Setting for Browser User Agent response
user-agent=NSPlayer/4.1.0.3856

Is anything jumping out at anyone here? Like I said above, this is the config I've been running for somet time now, heck, my last update of anything is about 2022 timeframe.

Going to try with DIVE next to see if that results in something different...

As always: thanks everyone!

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1350
  • Karma: +26/-0
    • View Profile
Re: mplayer - just stopped working...sort of...
« Reply #1 on: March 30, 2024, 07:49:35 pm »
OK, so DIVE made no difference, but as I looked into this more I noted that my mplayer version was a little old.

So off I went deploying the most recent release, alas, same result:

Quote
[G:\test\mplayer]mplayer.exe -xy 1 G:\tmp\AUTO\20210128_201140.mp4
MPlayer 1.5-9.1.0 (C) 2000-2022 MPlayer Team
Setting process priority: realtime

Playing G:\tmp\AUTO\20210128_201140.mp4.
Cache fill:  0.00% (0 bytes)

libavformat version 59.17.102 (internal)
libavformat file format detected.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2f4cf0]Protocol name not provided, cannot determine
 if input is local or a network protocol, buffers and access patterns cannot be
configured optimally without knowing the protocol
[lavf] stream 0: video (h264), -vid 0
VIDEO:  [H264]  1920x1080  24bpp  30.000 fps  34089.8 kbps (4161.4 kbyte/s)
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 59.21.100 (internal)
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
Clip info:
 major_brand: mp42
 minor_version: 0
 compatible_brands: isommp42
 creation_time: 2021-01-29T01:14:08.000000Z
 location: +42.2680-083.0048/
 location-eng: +42.2680-083.0048/
 com.android.version: 10
 com.android.capture.fps: 30.000000
Load subtitles in G:\tmp\AUTO\
Audio: no sound
Starting playback...
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [kva] 1920x1080 => 1920x1080 Planar YV12
KVA: Setup failed!!!
FATAL: Cannot initialize video driver.

..

KO Myung-Hun

  • Newbie
  • *
  • Posts: 45
  • Karma: +6/-0
    • View Profile
Re: mplayer - just stopped working...sort of...
« Reply #2 on: April 01, 2024, 02:49:43 pm »
Hi/2.

Try -msglevel vo=9 for detailed message, please.

And how about vman mode(-vo kva:vman) ?

How about trying to launch mplayer with default options, that is, just [mplayer mp4-file] ? In this case, you should rename your ini file.

Finally, this is true for VLC ?

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1350
  • Karma: +26/-0
    • View Profile
Re: mplayer - just stopped working...sort of...
« Reply #3 on: April 08, 2024, 12:58:32 am »
Hello KO!

...Try -msglevel vo=9 for detailed message, please.

OK, done...here are the snippets for both SNAP & VMAN (where VMAN did actually work and SNAP did not):

1) SNAP
Code: [Select]
MPlayer 1.5-9.1.0 (C) 2000-2022 MPlayer Team

Playing G:\tmp\AUTO\20210130_210808.mp4.
libavformat version 59.17.102 (internal)
libavformat file format detected.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2f4cf0]Protocol name not provided, cannot determine if input is local or a network protocol, buffers and access patterns cannot be configured optimally without knowing the protocol
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (aac), -aid 0, -alang eng
VIDEO:  [H264]  1920x1080  24bpp  30.000 fps  16946.1 kbps (2068.6 kbyte/s)
KVA: Selected video mode = SNAP
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 59.21.100 (internal)
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
Clip info:
 major_brand: mp42
 minor_version: 0
 compatible_brands: isommp42
 creation_time: 2021-01-31T02:08:22.000000Z
 location: +42.2680-083.0048/
 location-eng: +42.2680-083.0048/
 com.android.version: 10
 com.android.capture.fps: 30.000000
Load subtitles in G:\tmp\AUTO\
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 2 ch, floatle, 256.0 kbit/8.33% (ratio: 32006->384000)
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
KAI: Open failed!!!
AO: [null] 48000Hz 2ch floatle (4 bytes per sample)
Starting playback...
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [kva] 1920x1080 => 1920x1080 Planar YV12
KVA: Using 0x32315659 (Planar YV12) image format, vo_config_count = 0
KVA: Selected FOURCC = YV12
KVA: Setup failed!!!
FATAL: Cannot initialize video driver.

2) VMAN
Code: [Select]
MPlayer 1.5-9.1.0 (C) 2000-2022 MPlayer Team

Playing G:\tmp\AUTO\20210130_210808.mp4.
libavformat version 59.17.102 (internal)
libavformat file format detected.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2f4cf0]Protocol name not provided, cannot determine if input is local or a network protocol, buffers and access patterns cannot be configured optimally without knowing the protocol
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (aac), -aid 0, -alang eng
VIDEO:  [H264]  1920x1080  24bpp  30.000 fps  16946.1 kbps (2068.6 kbyte/s)
KVA: Selected video mode = VMAN
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 59.21.100 (internal)
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
Clip info:
 major_brand: mp42
 minor_version: 0
 compatible_brands: isommp42
 creation_time: 2021-01-31T02:08:22.000000Z
 location: +42.2680-083.0048/
 location-eng: +42.2680-083.0048/
 com.android.version: 10
 com.android.capture.fps: 30.000000
Load subtitles in G:\tmp\AUTO\
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 2 ch, floatle, 256.0 kbit/8.33% (ratio: 32006->384000)
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
KAI: Open failed!!!
AO: [null] 48000Hz 2ch floatle (4 bytes per sample)
Starting playback...
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [kva] 1920x1080 => 1920x1080 Planar YV12
KVA: Using 0x32315659 (Planar YV12) image format, vo_config_count = 0
[swscaler @ 0x79d2b0]bicubic scaler, from yuv420p to bgra using MMXEXT
[swscaler @ 0x79d2b0]using unscaled yuv420p -> bgra special converter
KVA: Selected FOURCC = BGR4
Fontconfig error: Cannot load default config file
Selected font is fixed-width.
Selected font is fixed-width.
A:   nan V:   0.0 A-V:    nan ct:    nan   0/  0 ??% ??% ??,?% 0 0

I truncated the remaining LOG entries because they are just repeating as the file continues to be read.

The only strange thing (perhaps?) which I noticed is that VMAN also shows "KAI: Open failed!!!" log entry, however it does produce actual video playback.

...How about trying to launch mplayer with default options, that is, just [mplayer mp4-file] ? In this case, you should rename your ini file.

Finally, this is true for VLC ?

In order to rule out any of my config options I ran from CLI having previously renamed smplyer's CONFIG file so that it wouldn't be pulled in.

Yes, this is consistent in VLC as well (3.0.18 here), which I have set to VMAN previously (at some point in time).

Thanks!

KO Myung-Hun

  • Newbie
  • *
  • Posts: 45
  • Karma: +6/-0
    • View Profile
Re: mplayer - just stopped working...sort of...
« Reply #4 on: April 12, 2024, 08:07:48 am »
Hi/2.

With SNAP mode, there are any clips to play ?

Fortunately, VMAN mode seems to works. If you have no any problems, then I'll recommend to use VMAN mode.

How about DIVE mode ? Doesn't it work ?

And KAI is an audio driver, so it is not relevant to video playback. I think, this is a problem, rather.

MPlayer seems not to convert FLOAT samples to S16 ones.

Would you mind providing this clip ? I want to test for audio playback.

Thanks for your help as always!

KO Myung-Hun

Pete

  • Hero Member
  • *****
  • Posts: 1345
  • Karma: +11/-0
    • View Profile
Re: mplayer - just stopped working...sort of...
« Reply #5 on: April 14, 2024, 07:51:12 pm »
Hi

I'm not sure whether snap output is working or not.

If I play a video using smplayer with snap as output driver it plays fine, mplayer log displayed by smplayer shows:-

J:/Programs/Multimedia/mplayer/mplayer.exe -noquiet -slave -identify -nofs -sub-fuzziness 1 -vo kva:snap, -ao kai, -nodr -double -nomouseinput -nokeepaspect -wid 456 -monitorpixelaspect 1 -subfont-osd-scale 3 -ass -embeddedfonts -ass-line-spacing 0 -ass-font-scale 1 -ass-styles I:/USERS/PETER/HOME/.smplayer/styles.ass -subcp ISO-8859-1 -aid 0 -subpos 100 -volume 99 -ss 165 -osdlevel 0 -vf-add screenshot=\tmp\smplayer_screenshots/shot -noslices -channels 2 -af-add scaletempo -af-add equalizer=0:0:0:0:0:0:0:0:0:0 -softvol -softvol-max 110 L:/download/Caligula.mp4

MPlayer 1.5-9.1.0 (C) 2000-2022 MPlayer Team

Playing L:/download/Caligula.mp4.
libavformat version 59.17.102 (internal)
libavformat file format detected.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2f4cf0]Protocol name not provided, cannot determine if input is local or a network protocol, buffers and access patterns cannot be configured optimally without knowing the protocol
ID_VIDEO_ID=0
[lavf] stream 0: video (h264), -vid 0
ID_AUDIO_ID=0
ID_AID_0_LANG=eng
[lavf] stream 1: audio (aac), -aid 0, -alang eng
VIDEO:  [H264]  938x480  24bpp  24.000 fps  901.7 kbps (110.1 kbyte/s)
Opening video filter: [ass auto=1]
[ass] auto-open
Opening video filter: [screenshot=\tmp\smplayer_screenshots/shot]
[ass] Shaper: FriBidi 0.19.7 (SIMPLE)
---------- snip -------
Towards end of log is this line
VO: [kva] 938x480 => 938x480 Planar YV12


The above seems to indicate snap output is working.


Trying to play the same video directly with mplayer from the command line using this command
   mplayer -vo kva:snap -msglevel ao=9:vo=9 -quiet L:\download\Caligula.mp4 > mplayer.log 2>&1
results in no playback and this in the log:-

MPlayer 1.5-9.1.0 (C) 2000-2022 MPlayer Team

Playing L:\download\Caligula.mp4.
libavformat version 59.17.102 (internal)
libavformat file format detected.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2f4cf0]Protocol name not provided, cannot determine if input is local or a network protocol, buffers and access patterns cannot be configured optimally without knowing the protocol
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (aac), -aid 0, -alang eng
VIDEO:  [H264]  938x480  24bpp  24.000 fps  901.7 kbps (110.1 kbyte/s)
KVA: Init failed!!!
Error opening/initializing the selected video_out (-vo) device.
Clip info:
 major_brand: isom
 minor_version: 512
 compatible_brands: isomiso2avc1mp41
 encoder: Lavf60.3.100


If snap output works from smplayer why does it not work from the command line? - What am I missing?


Regards

Pete




KO Myung-Hun

  • Newbie
  • *
  • Posts: 45
  • Karma: +6/-0
    • View Profile
Re: mplayer - just stopped working...sort of...
« Reply #6 on: April 15, 2024, 06:14:38 am »
Hi/2.

I think SNAP mode should work on your machine.

How about trying to the following command like SMPlayer:

J:/Programs/Multimedia/mplayer/mplayer.exe -noquiet -slave -identify -nofs -sub-fuzziness 1 -vo kva:snap, -ao kai, -nodr -double -nomouseinput -nokeepaspect -wid 456 -monitorpixelaspect 1 -subfont-osd-scale 3 -ass -embeddedfonts -ass-line-spacing 0 -ass-font-scale 1 -ass-styles I:/USERS/PETER/HOME/.smplayer/styles.ass -subcp ISO-8859-1 -aid 0 -subpos 100 -volume 99 -ss 165 -osdlevel 0 -vf-add screenshot=\tmp\smplayer_screenshots/shot -noslices -channels 2 -af-add scaletempo -af-add equalizer=0:0:0:0:0:0:0:0:0:0 -softvol -softvol-max 110 L:/download/Caligula.mp4

Would you mind finding where snapwrap.dll is ? Is it in LIBPATH family when you launch mplayer.exe directly on command line ?

KO Myung-Hun

Pete

  • Hero Member
  • *****
  • Posts: 1345
  • Karma: +11/-0
    • View Profile
Re: mplayer - just stopped working...sort of...
« Reply #7 on: April 15, 2024, 03:59:22 pm »
Hi KO

The snapwrap.dll file is in the mplayer.exe directory - as is woverlay.dll which also fails when trying to use kva:wo.

I can answer my question: snap output is not working.
The mplayer log displayed by smplayer does not mention any problem with snap output but I found the smplayer log has these lines:-

[14:28:20:772] MplayerProcess::parseLine: 'KVA: Init failed!!!'
[14:28:20:803] MplayerProcess::parseLine: 'Opening video filter: [ass auto=1]'
[14:28:20:807] MplayerProcess::parseLine: '[ass] auto-open


I think the above indicates that mplayer could not initiate snap output and switched to "auto" video output.Not sure what causes mplayer to switch output...


I did try to copy'n'paste the mplayer command line from smplayer but I think the line is too long as it does not fully copy.


Regards

Pete

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5041
  • Karma: +114/-1
    • View Profile
Re: mplayer - just stopped working...sort of...
« Reply #8 on: April 15, 2024, 06:35:00 pm »
You can always use sh.exe to get around the command line limit. Create mplayer.sh, paste the command line in and do "sh mplayer.sh" use / instead of \

KO Myung-Hun

  • Newbie
  • *
  • Posts: 45
  • Karma: +6/-0
    • View Profile
Re: mplayer - just stopped working...sort of...
« Reply #9 on: April 16, 2024, 08:43:55 am »
Hi/2.

MPlayer itself does not have the feature switching to auto mode, but I'm not sure SMPlayer does.

Can you post the full log of SMPlayer playing a clip which is not played by MPlayer with -vo kva:snap option?

KO Myung-Hun

KO Myung-Hun

  • Newbie
  • *
  • Posts: 45
  • Karma: +6/-0
    • View Profile
Re: mplayer - just stopped working...sort of...
« Reply #10 on: April 16, 2024, 09:05:30 am »
Hi/2, again.

What's the result of gactrl in SNAP directory?

1. Run 'gactrl.exe' in SNAP directory such as x:\SNAP, where x is a boot drive.
2. Select '0' for 'Interactive Tests'
3. What's the value of '2D Acceleration' ?

KO Myung-Hun

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1350
  • Karma: +26/-0
    • View Profile
Re: mplayer - just stopped working...sort of...
« Reply #11 on: April 19, 2024, 02:40:44 am »

3. What's the value of '2D Acceleration' ?


"YES" on my machine

Pete

  • Hero Member
  • *****
  • Posts: 1345
  • Karma: +11/-0
    • View Profile
Re: mplayer - just stopped working...sort of...
« Reply #12 on: April 24, 2024, 08:31:20 pm »
Hi KO

Sorry for slow response, had to go away for a few days. While I was away I realised what the problem with kva:snap option is: This system is not using the SNAP driver.

It seems smplayer must have the capability to switch video output mode if the selected mode fails.

I attach 2 log files for your perusal
smplayer.log  - playback works despite kva:snap being selected video output, auto switches to VMAN
66295c21-003c_01-MPLAYER-exceptq.txt - the trap file generated whenever smplayer/mplayer is closed


Regards

Pete


KO Myung-Hun

  • Newbie
  • *
  • Posts: 45
  • Karma: +6/-0
    • View Profile
Re: mplayer - just stopped working...sort of...
« Reply #13 on: April 27, 2024, 10:02:56 am »
Hi/2.

@Dariusz Piatkowski

3. What's the value of '2D Acceleration' ?


"YES" on my machine


Then, your system should play a movie with 2D acceleration, that is, SNAP mode. Nevertheless, if it fails, your system or SNAP driver seem not to support 1080p with 2D acceleration. In order to verify this, how about other smaller clips than 1080p, such as 720p ?

@Pete


It seems smplayer must have the capability to switch video output mode if the selected mode fails.


I've found the reason. See `-vo' section of https://mplayerhq.hu/DOCS/man/en/mplayer.1.html#VIDEO%20OUTPUT%20DRIVERS%20(MPLAYER%20ONLY).

Quote
If the list has a trailing ’,’ MPlayer will fall back on drivers not contained in the list.

SMPlayer calls MPlayer with a trailing comma(,) for vo. In this case, `-vo kva:snap,'.

That is, if kva:snap fails, then MPlayer tries other VOs. In this case, try first just `-vo kva' without any suboptions such as snap. Therefore, libkva tries to find proper modes automatically and decides to use VMAN mode. This is the feature of MPlayer not SMPlayer.

And I recommend to use `Default' or `kva(fast)' option in SMPlayer not kva(snap) et al to minimize any confusions.

Finally, for the trap I cannot reproduce here at all. If possible, provide a clip to test, please...

Thanks!

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1350
  • Karma: +26/-0
    • View Profile
Re: mplayer - just stopped working...sort of...
« Reply #14 on: April 28, 2024, 08:01:50 pm »
Hello KO!

...
3. What's the value of '2D Acceleration' ?


"YES" on my machine


Then, your system should play a movie with 2D acceleration, that is, SNAP mode. Nevertheless, if it fails, your system or SNAP driver seem not to support 1080p with 2D acceleration. In order to verify this, how about other smaller clips than 1080p, such as 720p ?

Great pointer!!!

Sure enough, finding a few other videos I was able to play them through SNAP config, although that's not to say all 720s played, some would, some would not.

Then I remembered: the SNAP vidmem size is something I had tweaked in the past in order to free up max ram for my JFS cache (1G)...sure enough, I had it set to 18M, which for regular use was perfectly sufficient (1920x1200 x 2 heads). However, in this case, whether its the double-buffering or something else, perhaps this was causing me a problem?

I doubled up to 36M, and YUP...all of my 1080 vides play back just fine!!!

Eventually settled on 24M, which also happens to be the previous setting I had in place for a very long time...not sure why I had moved away from that, was probably experimenting with a larger JFS cache and just never remembered to bump that back up.

Anyways...sir: thank you for that spot-on remark!!!