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 700186 - Thumbnailer fails when gstreamer-vaapi is installed
Thumbnailer fails when gstreamer-vaapi is installed
Status: RESOLVED FIXED
Product: gstreamer-vaapi
Classification: Other
Component: general
0.5.2
Other Linux
: Normal normal
: ---
Assigned To: gstreamer-vaapi maintainer(s)
gstreamer-vaapi maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-05-12 16:18 UTC by Jan Alexander Steffens (heftig)
Modified: 2014-02-11 23:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GST_DEBUG=6 log of totem-video-thumbnailer (438.79 KB, application/octet-stream)
2013-05-13 09:22 UTC, Jan Alexander Steffens (heftig)
Details

Description Jan Alexander Steffens (heftig) 2013-05-12 16:18:13 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
Comment 1 Bastien Nocera 2013-05-13 06:46:48 UTC
There's nothing showing here that totem-video-thumbnailer is being used, or even called. Try it on the command-line instead.
Comment 2 Jan Alexander Steffens (heftig) 2013-05-13 07:00:30 UTC
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
Comment 3 Bastien Nocera 2013-05-13 07:06:03 UTC
totem-video-thumbnailer creates a fakesink as the video decoder. A vaapi-only decoder must be getting plugged into the decoding pipeline.
Comment 4 Sebastian Dröge (slomo) 2013-05-13 08:40:32 UTC
Which version of gstreamer and gst-plugins-base is used here? Could you get a debug log with GST_DEBUG=6 of this?
Comment 5 Jan Alexander Steffens (heftig) 2013-05-13 09:22:17 UTC
Created attachment 243970 [details]
GST_DEBUG=6 log of totem-video-thumbnailer

gstreamer 1.0.7
gst-plugins-base 1.0.7
Comment 6 Sebastian Dröge (slomo) 2013-05-13 10:48:32 UTC
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.
Comment 7 Tim-Philipp Müller 2013-05-13 11:13:25 UTC
You can work around this is in the thumbnailer btw, but just setting the rank of the vaapi decoder to NONE.
Comment 8 Jan Alexander Steffens (heftig) 2013-07-15 19:16:04 UTC
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.
Comment 9 Gwenole Beauchesne 2013-07-16 04:44:42 UTC
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?
Comment 10 Jan Alexander Steffens (heftig) 2013-07-16 04:48:11 UTC
Ah, right. Both happened.
Comment 11 Gwenole Beauchesne 2013-07-16 05:01:05 UTC
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.
Comment 12 Jan Alexander Steffens (heftig) 2013-07-16 05:11:52 UTC
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.
Comment 13 Gwenole Beauchesne 2013-07-16 05:19:15 UTC
Thanks for testing, I will have to look at it then.
Comment 14 Jan Alexander Steffens (heftig) 2013-07-16 05:30:46 UTC
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>
Comment 15 Gwenole Beauchesne 2013-07-18 07:23:38 UTC
(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. :)
Comment 16 Jan Alexander Steffens (heftig) 2013-07-18 07:30:24 UTC
Right. Totem and "gst-launch-1.0 playbin" now (successfully) use the VAAPI decoder again, while the thumbnailers are broken.
Comment 17 Víctor Manuel Jáquez Leal 2013-07-18 07:34:35 UTC
(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 :(
Comment 18 Jan Alexander Steffens (heftig) 2014-02-11 23:18:06 UTC
Both players and thumbnailers seem to work. The former pick VA-API, the latter pick software decoders. So everything's fine. Yippee!