What can play *.mp4 files? (neither vlc nor mplayer can)

I have an *.mp4 file which I would like to play.
Trying with vlc, it plays the file fine, but after 30-40 seconds it disables all gui functions except kill -9, so the playback cannot be paused or repositioned.
Trying with mplayer, it also plays the file fine, but the video part is played ~3 times faster than the audio part.
Practically, both are unuseable. Is there something that might work?
 
I have an *.mp4 file which I would like to play.
Trying with vlc, it plays the file fine, but after 30-40 seconds it disables all gui functions except kill -9, so the playback cannot be paused or repositioned.
Trying with mplayer, it also plays the file fine, but the video part is played ~3 times faster than the audio part.
Practically, both are unuseable. Is there something that might work?

They should both work fine. Sounds like a screwed up mp4 file. What does `ffprobe` say about it?
 
MP4 is a container format. Which means it can contain different codecs for the audio and video streams. The player needs to be able to play the specific audio and video codecs being used. Even it's able to understand the container it may have problems with the actual codecs being used. So the biggest question is, which codecs does this MP4 file use?
 
mpv usually plays everything I give it. I think cracauer@ asks the important question. What is the output of ffprobe -hide_banner <filename>.mp4? (the hide_banner option helps lessen usually unneeded output).
 
They should both work fine. Sounds like a screwed up mp4 file. What does `ffprobe` say about it?
Code:
ffprobe version 4.4.3 Copyright (c) 2007-2022 the FFmpeg developers
  built with FreeBSD clang version 14.0.5 (https://github.com/llvm/llvm-project.git llvmorg-14.0.5-0-gc12386ae247c)
  configuration: --prefix=/usr/local --mandir=/usr/local/man --datadir=/usr/local/share/ffmpeg --pkgconfigdir=/usr/local/libdata/pkgconfig --disable-static --disable-libcelt --enable-shared --enable-pic --enable-gpl --enable-avresample --cc=cc --cxx=c++ --enable-alsa --disable-libopencore-amrnb --disable-libopencore-amrwb --disable-libaom --disable-libaribb24 --enable-asm --disable-libass --disable-libbs2b --disable-libcaca --disable-libcdio --disable-libcodec2 --disable-libdav1d --disable-libdavs2 --disable-libdc1394 --disable-debug --enable-htmlpages --disable-libdrm --disable-libfdk-aac --disable-libflite --enable-fontconfig --enable-libfreetype --disable-frei0r --disable-libfribidi --disable-gcrypt --disable-libglslang --disable-libgme --enable-gmp --enable-gnutls --enable-version3 --enable-libgsm --enable-iconv --disable-libilbc --enable-libjack --disable-libklvanc --disable-libkvazaar --enable-ladspa --enable-libmp3lame --disable-liblensfun --enable-libbluray --disable-librsvg --disable-librtmp --disable-libxml2 --disable-lto --disable-lv2 --disable-mbedtls --enable-libmfx --disable-libmodplug --disable-libmysofa --enable-network --enable-nonfree --disable-nvenc --enable-openal --disable-opencl --disable-opengl --disable-libopenh264 --enable-libopenjpeg --disable-libopenmpt --disable-openssl --disable-libopenvino --enable-optimizations --enable-libopus --disable-pocketsphinx --disable-libpulse --disable-librabbitmq --disable-librav1e --disable-librist --enable-runtime-cpudetect --disable-librubberband --enable-sdl2 --disable-libsmbclient --disable-libsnappy --disable-sndio --disable-libsoxr --enable-libspeex --disable-libsrt --disable-libssh --enable-libsvtav1 --disable-libtensorflow --disable-libtesseract --enable-libtheora --enable-libtwolame --disable-libuavs3d --enable-libv4l2 --enable-vaapi --disable-vapoursynth --enable-vdpau --disable-libvidstab --disable-libvmaf --enable-libvorbis --disable-libvo-amrwbenc --enable-libvpx --disable-vulkan --enable-libwebp --enable-libx264 --enable-libx265 --disable-libxavs2 --enable-libxcb --disable-libxvid --disable-outdev=xv --disable-libzimg --disable-libzmq --disable-libzvbi
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
Input #0, mpegts, from 'Video.mp4':
  Duration: 01:34:49.65, start: 1.433589, bitrate: 808 kb/s
  Program 1 
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
  Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 588x480 [SAR 1:1 DAR 49:40], 25 fps, 25 tbr, 90k tbn, 50 tbc
  Stream #0:1[0x101](und): Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 131 kb/s
 
There is nothing special in there. If you still have problems I would convert it to a mkv file using ffmpeg with "copy" encoders.
 
mplayer plays mp4 files here. And many other formats. I have installed a few extra codecs. Everything installed from packages. Nothing special to it.
 
There is nothing special in there. If you still have problems I would convert it to a mkv file using ffmpeg with "copy" encoders.
It's a stream from ok.ru; I'm in the garden and here is no bandwidth for video streaming, I did an overnight download. It's an occasion when I hoped for the stuff to just work when needed.
 
VLC can play .mp4 (and just about everything else) just fine... I compile mine from ports with EVERYTHING enabled. Sounds like the packages still don't have very sensible defaults. I think the package version of mpv plays .mp4 fine... but if push comes to shove, you can copy the file to your phone and play from there.
 
That one has no way to disable fullscreen (only an option to enable it, but it's always enabled anyway), no GUI controls whatsoever (and no way to access anything else while it's running), Ctrl-C might terminate it only if one knows in which window the mouse is without visual feedback.
 
VLC can play .mp4 (and just about everything else) just fine...
Sure it can play it - only after some 30-40 sec. the (pause, stop, zoom etc) buttons no longer have an effect. I.e it continues to play the video, while the GUI part has already crashed.
 
I'm going to guess that index is broken, try to remux it using ffmpeg or bento4/mp4box. It's very likely not a player issue which some of you seem to suggest.
Properly built VLC will catch that, and offer to 'rebuild index, then play'. I have a movie file that I rewatch from time to time (although that one is a .avi). And VLC does a great job every time - because it's built with all the options enabled.
 
Just compile VLC from ports, with EVERYTHING turned on, and you'll be amazed at what it's capable of.
I do build everything from ports, but usually with only the options I need. (I don't want to import code and bugs which I don't intend to use.)

I'm back in my basecamp now, sorting things out and analyzing this crap:

Issue 1: multimedia/mplayer video playing faster than audio

Given that mp4 is a container format, then it must have some clock feature to synchronize the streams. It seems that in the media file in question this synchronization is flawed. While vlc does not seem to have a problem with that, mplayer shows that A-V is happily running away from each other:
Code:
AO: [oss] 44100Hz 2ch s16le (2 bytes per sample)
Starting playback...
Movie-Aspect is 1.23:1 - prescaling to correct movie aspect.
VO: [xv] 588x480 => 588x480 Planar YV12 
A:  43.1 V:  77.3 A-V:-34.196 ct: -3.788 1897/1897  9%  1%  0.3% 0 0 
A:  44.2 V:  79.3 A-V:-35.057 ct: -3.888 1947/1947  9%  1%  0.3% 0 0 
A:  44.5 V:  79.8 A-V:-35.276 ct: -3.912 1959/1959  9%  1%  0.3% 0 0 
A:  44.6 V:  80.1 A-V:-35.442 ct: -3.926 1966/1966  9%  1%  0.3% 0 0 
A:  45.6 V:  82.0 A-V:-36.377 ct: -4.012 2009/2009  9%  1%  0.3% 0 0 
A:  59.6 V: 107.4 A-V:-47.823 ct: -5.284 2645/2645  9%  1%  0.3% 0 0

This flaw is most certainly in the media file, and rebuilding it to a different container format, as cracauer@ suggested, would probably solve it. The actual root cause might be somewhere in www/youtube_dl.


Issue 2: multimedia/vlc GUI getting stuck entirely after some seconds into the playback

This might be related to one or more of the vlc threads going into the uwrlck WCHAN and staying there?
Pressing ^C or sending a normal kill cannot stop vlc then, but pressing ^C <enter> ^C does. So there seems some strange relation to the STDIN handle.

I can reproduce this behaviour with different media files, and on both the desktop (13.2-BETA2, Ivybridge) and laptop (13.2-STABLE, Tigerlake). I do not remember this having happened earlier, so it might be some new fun introduced with 13.2
 
[ multimedia/mpv ] That one has no way to disable fullscreen (only an option to enable it, but it's always enabled anyway),
I wonder how I use it in window mode all the time? :-/
no GUI controls whatsoever
Actually more "GUI" than mplayer, at least there's quite some OSD stuff...
Ctrl-C might terminate it only if one knows in which window the mouse is without visual feedback.
Something seems VERY broken with your window manager? If it's in fullscreen mode (F to toggle, just like mplayer), it should keep input focus (which it certainly does here), and then, Q quits it, just like mplayer.

mpv is a fork of mplayer, and meanwhile, mplayer lags behind that much, I'd recommend anyone to get rid of it.
 
Might I suggest the actual source for the content might be malformed.
Good point.

If youtube they are notorious for breaking playback. Broken by design.
I think it's from ok.ru/video. I just needed that tape because of a few statements I might like to document (e.g. about the philosophy of Walt Whitman - I was not at all motivated to start debugging the workflow ;) ).
 
If you have a provider that mixes resolutions like twitch live streams you have to cut the initial part and remux afterwards otherwise you'll end up with weird search/skip and/or speed issues.
 
You seem to have ffmpeg installed. It is really trivial to make a pass at re-packaging and re-indexing (but not re-encoding):
Code:
ffmpeg -i Video.mp4 -c copy new.mkv
 
  • Thanks
Reactions: PMc
I wonder how I use it in window mode all the time? :-/
Good. But this is least concern to me; Normally I use vlc and keep mplayer just in case something doesn't seem to work well.

Actually more "GUI" than mplayer, at least there's quite some OSD stuff...

Something seems VERY broken with your window manager?
Usually not, there is not much of a window manager (icewm). But this one is not reproducible now. Now it starts in window, and does nicely toggle to fullscreen by double-tapping into the window. At the first try it started in that fullscreen and was not willing to leave it (and I certainly tried the double-tapping).

Ah, got it: on an entirely emptied homedir (with only .profile, .xsession and the media file) it does it again! And it does NOT show the progress bar at the bottom either. It does not react to the "F" key, neither does it allow to switch to console (Alt-Ctrl-F1).

Correction: it DOES switch to Alt-Ctrl-F1, but still shows the fullscreen movie. I was able to kill it remotely; and now it's STDERR (in the xterm) shows lots of [vo/gpu] Failed to commit atomic request (-22).
I think it's not the window manager but rather the GPU driver that is broken (as usual).

mpv is a fork of mplayer, and meanwhile, mplayer lags behind that much, I'd recommend anyone to get rid of it.
Ah! That's why for a moment I thought I had accidentially started the wrong player, when it appeared to look quite similar.
 
Back
Top