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 797155 - Snapshot doesn't produce a good image for mpeg-ts video
Snapshot doesn't produce a good image for mpeg-ts video
Status: RESOLVED WONTFIX
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-09-17 01:52 UTC by Gregoire
Modified: 2018-09-18 23:19 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Gregoire 2018-09-17 01:52:10 UTC
When using the snapshot application:

https://github.com/GStreamer/gst-plugins-base/blob/master/tests/examples/snapshot/snapshot.c

The only modification to the code I made is to put 50/100 (50% instead of 5%).

gcc snapshot.c `pkg-config --cflags --libs gstreamer-1.0 gtk+-3.0`

it's working well with a mp4 file but it generates a gray image for a mpeg-ts file. See two examples here:

http://gentil.com/tmp/snapshot.zip

I think that the reason is that the mpeg-ts has less information about timestamp so it needs a few frames before it decodes properly a key frame.

How can the source code be patched so that multiple successive frames are decoded before the sample is taken?

Note that if I play the mpeg-ts file and I seek, the first 0.2s is also gray for the same reason explained above.
Comment 1 Gregoire 2018-09-18 23:19:58 UTC
I eventually used gst_element_send_event(pipeline, gst_event_new_step(GST_FORMAT_BUFFERS, 1, 1.0f, TRUE, FALSE)); to move forward and get a good frame.