After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 792325 - Totem couldn't play mjpeg video but mplayer could.
Totem couldn't play mjpeg video but mplayer could.
Status: RESOLVED FIXED
Product: totem-pl-parser
Classification: Core
Component: General
3.26.x
Other Linux
: Normal normal
: ---
Assigned To: totem-pl-parser-maint
totem-pl-parser-maint
Depends on:
Blocks:
 
 
Reported: 2018-01-08 13:32 UTC by Mikhail
Modified: 2018-01-09 22:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
totem debug (318.97 KB, application/x-xz)
2018-01-08 13:34 UTC, Mikhail
  Details
plparse: Don't consider MJPEG streams as JPEG images (1.25 KB, patch)
2018-01-09 16:18 UTC, Bastien Nocera
committed Details | Review

Description Mikhail 2018-01-08 13:32:33 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)
Comment 1 Mikhail 2018-01-08 13:34:10 UTC
Created attachment 366490 [details]
totem debug
Comment 2 Mikhail 2018-01-08 13:38:51 UTC
Yet another mjpeg example: https://drive.google.com/file/d/18EBH80fpZd6KjTXd4RHDHUfsAWhwfl5m/view?usp=sharing
Comment 3 Bastien Nocera 2018-01-08 14:43:04 UTC
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.
Comment 4 Bastien Nocera 2018-01-09 16:18:17 UTC
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.
Comment 5 Bastien Nocera 2018-01-09 16:19:22 UTC
Attachment 366561 [details] pushed as 8f3ee8c - plparse: Don't consider MJPEG streams as JPEG images
Comment 6 Mikhail 2018-01-09 21:17:40 UTC
Nautilus now will be opening MJPEG as video file? Or needed another bug report?
Comment 7 Bastien Nocera 2018-01-09 22:02:30 UTC
(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.