GNOME Bugzilla – Bug 700186
Thumbnailer fails when gstreamer-vaapi is installed
Last modified: 2014-02-11 23:18:06 UTC
Nautilus cannot create thumbnails for at least mp4 video files when gstreamer-vaapi is installed. Log excerpt: libva info: VA-API version 0.33.0 libva info: va_getDriverName() returns 0 libva info: Trying to open /usr/lib/dri/i965_drv_video.so libva info: Found init function __vaDriverInit_0_33 libva info: va_openDriver() returns 0 (nautilus:16045): GnomeDesktop-WARNING **: Unable to create loader for mime type video/mp4: Unrecognized image file format (nautilus:16045): GnomeDesktop-WARNING **: Error creating thumbnail for file:///home/jan/Videos/Thinking/Critical%20Thinking%20Part%206:%20A%20precautionary%20tale-vjaqM4yd_RA.mp4: Image has zero width totem 3.8.0 gstreamer-vaapi 0.5.3
There's nothing showing here that totem-video-thumbnailer is being used, or even called. Try it on the command-line instead.
I was under the impression that Nautilus used the /usr/share/thumbnailers/totem.thumbnailer for generating video thumbnails. In any case, the totem thumbnailer doesn't work, either: ~> totem-video-thumbnailer -v ~/Videos/Thinking/Critical\ Thinking\ Part\ 6:\ A\ precautionary\ tale-vjaqM4yd_RA.mp4 ~/foobar.png TotemVideoThumbnailer-Message: Initialised libraries, about to create video widget TotemVideoThumbnailer-Message: setting URI file:///home/jan/Videos/Thinking/Critical%20Thinking%20Part%206:%20A%20precautionary%20tale-vjaqM4yd_RA.mp4 TotemVideoThumbnailer-Message: Video widget created TotemVideoThumbnailer-Message: About to open video file libva info: VA-API version 0.33.0 libva info: va_getDriverName() returns 0 libva info: Trying to open /usr/lib/dri/i965_drv_video.so libva info: Found init function __vaDriverInit_0_33 libva info: va_openDriver() returns 0 TotemVideoThumbnailer-Message: Checking whether file has cover TotemVideoThumbnailer-Message: totem-video-thumbnailer couldn't find a video track in '/home/jan/Videos/Thinking/Critical Thinking Part 6: A precautionary tale-vjaqM4yd_RA.mp4' Without gstreamer-vaapi, it works fine: ~> totem-video-thumbnailer -v ~/Videos/Thinking/Critical\ Thinking\ Part\ 6:\ A\ precautionary\ tale-vjaqM4yd_RA.mp4 ~/foobar.png TotemVideoThumbnailer-Message: Initialised libraries, about to create video widget TotemVideoThumbnailer-Message: setting URI file:///home/jan/Videos/Thinking/Critical%20Thinking%20Part%206:%20A%20precautionary%20tale-vjaqM4yd_RA.mp4 TotemVideoThumbnailer-Message: Video widget created TotemVideoThumbnailer-Message: About to open video file TotemVideoThumbnailer-Message: Checking whether file has cover TotemVideoThumbnailer-Message: Opened video file: '/home/jan/Videos/Thinking/Critical Thinking Part 6: A precautionary tale-vjaqM4yd_RA.mp4' TotemVideoThumbnailer-Message: About to seek to 0.333333 TotemVideoThumbnailer-Message: About to get frame for iter 0 TotemVideoThumbnailer-Message: Frame for iter 0 is interesting TotemVideoThumbnailer-Message: Saving captured screenshot
totem-video-thumbnailer creates a fakesink as the video decoder. A vaapi-only decoder must be getting plugged into the decoding pipeline.
Which version of gstreamer and gst-plugins-base is used here? Could you get a debug log with GST_DEBUG=6 of this?
Created attachment 243970 [details] GST_DEBUG=6 log of totem-video-thumbnailer gstreamer 1.0.7 gst-plugins-base 1.0.7
Ok, that happens because vaapidecode has a too high rank, thus is autoplugged. But every decoder that is autoplugged must be able to output raw video if downstream can't handle anything else. Reassigning to gst-vaapi.
You can work around this is in the thumbnailer btw, but just setting the rank of the vaapi decoder to NONE.
Seems to be solved in gstreamer-vaapi 0.5.5. I think this is because the vaapi decoder is not used automatically anymore. playbin doesn't use it, either. Only sushi seems to use it.
Hi, (In reply to comment #8) > Seems to be solved in gstreamer-vaapi 0.5.5. > > I think this is because the vaapi decoder is not used automatically anymore. > playbin doesn't use it, either. Only sushi seems to use it. Well, I did not fix anything in gstreamer-vaapi 0.5.5 for this issue. :) Are you sure, neither of the following event occurred: - Update to a newer GStreamer 1.0.x stack ; - Update of libva/libva-intel-driver to 1.2.x?
Ah, right. Both happened.
In the case of the latter, libva-intel-driver update, we now support implicit conversions from the underlying VA surface to the desired VA image (YUV). However, I don't think this is working either, or at least it should not IMHO, because I don't support video frames mapping with GST_MAP_READ flag. Not to mention that I don't even expose any YUV caps in the first place from vaapidecode. :) So, the hypothesis that libva/libva-intel-driver update fixed your issue is not a valid one on second thought. I did not check either if anything special was done in 1.0.8? On the other hand, if you confirm that re-installing gstreamer-vaapi 0.5.3 fails again for you with your existing setup, and gstreamer-vaapi 0.5.5 then makes it work, I could dig more. Thanks.
With gstreamer-vaapi 0.5.4, it fails. Nautilus log: No accelerated IMDCT transform found libva info: VA-API version 0.34.0 libva info: va_getDriverName() returns 0 libva info: Trying to open /usr/lib/dri/i965_drv_video.so libva info: Found init function __vaDriverInit_0_34 libva info: va_openDriver() returns 0 (nautilus:8741): GnomeDesktop-WARNING **: Unable to create loader for mime type video/x-matroska: Unrecognized image file format (nautilus:8741): GnomeDesktop-WARNING **: Error creating thumbnail for file://[...]: Unrecognized image file format totem-video-thumbnailer log: TotemVideoThumbnailer-Message: Initialised libraries, about to create video widget TotemVideoThumbnailer-Message: setting URI file://[...] TotemVideoThumbnailer-Message: Video widget created TotemVideoThumbnailer-Message: About to open video file No accelerated IMDCT transform found libva info: VA-API version 0.34.0 libva info: va_getDriverName() returns 0 libva info: Trying to open /usr/lib/dri/i965_drv_video.so libva info: Found init function __vaDriverInit_0_34 libva info: va_openDriver() returns 0 TotemVideoThumbnailer-Message: Checking whether file has cover TotemVideoThumbnailer-Message: totem-video-thumbnailer couldn't find a video track in '[...]' --- With gstreamer-vaapi 0.5.5, it works. Nautilus log: No accelerated IMDCT transform found totem-video-thumbnailer log: TotemVideoThumbnailer-Message: Initialised libraries, about to create video widget TotemVideoThumbnailer-Message: setting URI file://[...] TotemVideoThumbnailer-Message: Video widget created TotemVideoThumbnailer-Message: About to open video file No accelerated IMDCT transform found TotemVideoThumbnailer-Message: Checking whether file has cover TotemVideoThumbnailer-Message: Opened video file: '[...]' TotemVideoThumbnailer-Message: About to seek to 0.333333 TotemVideoThumbnailer-Message: About to get frame for iter 0 TotemVideoThumbnailer-Message: Frame for iter 0 is interesting TotemVideoThumbnailer-Message: Saving captured screenshot --- I think vaapi decoder isn't getting loaded.
Thanks for testing, I will have to look at it then.
Did a bisection. The first commit where it works is: commit 3d290a162cde580c49609bffb0e177922c08b3be Author: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> Date: Fri May 24 05:04:01 2013 -0400 plugins: add gst_vaapi_create_display() helper. https://bugzilla.gnome.org/show_bug.cgi?id=703235 Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
(In reply to comment #14) > Did a bisection. The first commit where it works is: > > commit 3d290a162cde580c49609bffb0e177922c08b3be > Author: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> > Date: Fri May 24 05:04:01 2013 -0400 > > plugins: add gst_vaapi_create_display() helper. > > https://bugzilla.gnome.org/show_bug.cgi?id=703235 > > Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com> Thanks, I probably made an error while committing this patch, so I pushed another fix to that code and thumbnailer should now fail again in git master. :)
Right. Totem and "gst-launch-1.0 playbin" now (successfully) use the VAAPI decoder again, while the thumbnailers are broken.
(In reply to comment #15) > (In reply to comment #14) > > Did a bisection. The first commit where it works is: > > > > commit 3d290a162cde580c49609bffb0e177922c08b3be > > Author: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> > > Date: Fri May 24 05:04:01 2013 -0400 > > > > plugins: add gst_vaapi_create_display() helper. > > > > https://bugzilla.gnome.org/show_bug.cgi?id=703235 > > > > Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com> > > Thanks, I probably made an error while committing this patch, so I pushed > another fix to that code and thumbnailer should now fail again in git master. > :) D'oh! Sorry! I missed that :(
Both players and thumbnailers seem to work. The former pick VA-API, the latter pick software decoders. So everything's fine. Yippee!