GNOME Bugzilla – Bug 792325
Totem couldn't play mjpeg video but mplayer could.
Last modified: 2018-01-09 22:02:30 UTC
Demonstration video file: https://drive.google.com/file/d/1-GBdtKkox-bOeFpf0YeFw_YbFDVsT0TN/view?usp=sharing $ mplayer /home/mikhail/Downloads/outUHD-Brio.mjpeg MPlayer 1.3.0-7 (C) 2000-2016 MPlayer Team do_connect: could not connect to socket connect: No such file or directory Failed to open LIRC support. You will not be able to use your remote control. Playing /home/mikhail/Downloads/outUHD-Brio.mjpeg. libavformat version 57.71.100 (external) libavformat file format detected. [lavf] stream 0: video (mjpeg), -vid 0 VIDEO: [MJPG] 3840x2160 0bpp 25.000 fps 0.0 kbps ( 0.0 kbyte/s) X11 error: BadMatch (invalid parameter attributes) Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory [vdpau] Error when calling vdp_device_create_x11: 1 ========================================================================== Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family libavcodec version 57.89.100 (external) Selected video codec: [ffmjpeg] vfm: ffmpeg (FFmpeg MJPEG) ========================================================================== Load subtitles in /home/mikhail/Downloads/ Audio: no sound Starting playback... Could not find matching colorspace - retrying with -vf scale... Opening video filter: [scale] Movie-Aspect is undefined - no prescaling applied. [swscaler @ 0x7fe708f30000]bicubic scaler, from yuv422p to yuv420p using MMXEXT VO: [xv] 3840x2160 => 3840x2160 Planar YV12 Movie-Aspect is undefined - no prescaling applied. VO: [xv] 3840x2160 => 3840x2160 Planar YV12 V: 5.6 0/ 0 75% 40% 0.0% 0 0 Exiting... (End of file)
Created attachment 366490 [details] totem debug
Yet another mjpeg example: https://drive.google.com/file/d/18EBH80fpZd6KjTXd4RHDHUfsAWhwfl5m/view?usp=sharing
I'm pretty certain that it's totem-pl-parser thinking that it's JPEG file, and skipping it. There's also the problem that nautilus thinks it's an image, and opens the file in eog instead of totem. I think we might need totem-pl-parser and shared-mime-info changes.
Created attachment 366561 [details] [review] plparse: Don't consider MJPEG streams as JPEG images Similarly to PLS/HLS playlist files in commit 32b2a71, we need to whitelist mjpeg files and pass them on as a media file, rather than ignoring them and removing them from the list of files to play. This requires a version of shared-mime-info with an MJPEG mime-type definition.
Attachment 366561 [details] pushed as 8f3ee8c - plparse: Don't consider MJPEG streams as JPEG images
Nautilus now will be opening MJPEG as video file? Or needed another bug report?
(In reply to Mikhail from comment #6) > Nautilus now will be opening MJPEG as video file? Or needed another bug > report? I forgot to change totem for that: commit 9c649ea99ed659d712004fd29acfa2c14f84a98e Author: Bastien Nocera <hadess@hadess.net> Date: Tue Jan 9 23:00:02 2018 +0100 data: Add MJPEG mime-type Add video/x-mjpeg as handled, so a double-click will launch it in Videos, not in eog. See https://bugzilla.gnome.org/show_bug.cgi?id=792325 Note that the files will need to be named "*.mjpeg" or "*.mjpg" to be recognised as videos. Otherwise they'll just show up as JPEG images, and open in an image viewer.