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 750341 - tsdemux: Not able to play HEVC video clip in pull mode
tsdemux: Not able to play HEVC video clip in pull mode
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-06-03 13:30 UTC by ris.lim.siew.hoon
Modified: 2018-11-03 13:35 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description ris.lim.siew.hoon 2015-06-03 13:30:34 UTC
Not able to play any big buck bunny HEVC video clip using tsdemux from video clip with file format MPEG-TS.

System: Feodra 21 64bit

Video clip URL: http://www.elecard.com/en/download/videos.html 
Under Big Buck Bunny - SD, 720p and 1080p HEVC video clip

msg:
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR: from element /GstPipeline:pipeline0/GstTSDemux:tsdemux0: Internal data stream error.
Additional debug info:
mpegtsbase.c(1342): mpegts_base_loop (): /GstPipeline:pipeline0/GstTSDemux:tsdemux0:
stream stopped, reason not-linked
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...
Comment 1 Tim-Philipp Müller 2015-06-03 20:39:55 UTC
What exact pipeline are you using to play this back? Don't forget to put an h265parse element between tsdemux and the decoder.

gst-play-1.0 http://www.elecard.com/assets/files/other/clips/bbb_720p_c.ts

works just fine on debian sid with 1.4.5
Comment 2 ris.lim.siew.hoon 2015-06-04 09:08:33 UTC
Sorry. I forgot to provide cmdpipe line.

gst-launch-1.0 filesrc location=/root/Videos/bbb_360p_c.ts ! tsdemux ! avdec_h265 ! xvimagesink


I tryout with the suggestion you mention as below in 720p and 360p video clip:

gst-launch-1.0 filesrc location=/root/Videos/bbb_720p_c.ts ! tsdemux ! h265parse ! avdec_h265 ! xvimagesink

gst-launch-1.0 filesrc location=/root/Videos/bbb_360p_c.ts ! tsdemux ! h265parse ! avdec_h265 ! xvimagesink

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
0:00:00.579798478  1966 0x7f606c00b670 ERROR                  libav :0:: get_buffer() cannot be called after ff_thread_finish_setup()
0:00:00.711446459  1966 0x7f606c031670 ERROR                  libav :0:: get_buffer() cannot be called after ff_thread_finish_setup()
0:00:00.840970746  1966 0x7f606c0cdaf0 ERROR                  libav :0:: get_buffer() cannot be called after ff_thread_finish_setup()
0:00:01.008955313  1966 0x7f6060011ea0 ERROR                  libav :0:: get_buffer() cannot be called after ff_thread_finish_setup()
0:00:01.156256699  1966 0x7f606c00b670 ERROR                  libav :0:: get_buffer() cannot be called after ff_thread_finish_setup()
...
...
until clip finish play still stuck in same video frame. 

I'm using Fedora 21 64bit gnome.
Comment 3 Tim-Philipp Müller 2015-06-04 10:10:25 UTC
Well, there's no buffering in the pipeline at all, and if avdec_h265 can't keep up most frames will be dropped.

I would say 'use gst-play or playbin', but there seems to be an issue with the prerolling of high-bitrate streams (it's fixed in git, but not released in 1.4 yet; in any case, it's probably not going to be fixed in f21). There is/was a bug about that elsewhere.
Comment 4 Tim-Philipp Müller 2015-06-04 11:54:33 UTC
There might also be an issue with avdec_h265, try libde265dec for comparison.
Comment 5 Sebastian Dröge (slomo) 2015-06-04 14:17:29 UTC
Or h265parse. It works in avplay, libde265dec and avdec_h265 both only show the first frame.
Comment 6 ris.lim.siew.hoon 2015-06-05 08:22:40 UTC
Command:
gst-launch-1.0 filesrc location=/root/Videos/bbb_360p_c.ts ! h265parse ! avdec_h265 ! xvimagesink

Able to play but got of error and video playback corrupted very bad.

error msg:
064^[[00m 0x7f2bf0001920 ^[[31;01mERROR  ^[[00m ^[[00m               libav :0::^[[00m Invalid NAL unit size.
0:00:00.302608919 ^[[335m12064^[[00m 0x7f2bf40316c0 ^[[31;01mERROR  ^[[00m ^[[00m               libav :0::^[[00m Invalid NAL unit size.
0:00:00.303060119 ^[[335m12064^[[00m 0x7f2be8001e60 ^[[31;01mERROR  ^[[00m ^[[00m               libav :0::^[[00m Invalid NAL unit size.
0:00:00.303553496 ^[[335m12064^[[00m 0x7f2be0001a10 ^[[31;01mERROR  ^[[00m ^[[00m               libav :0::^[[00m Invalid NAL unit size.
0:00:00.303947082 ^[[335m12064^[[00m 0x7f2bf0001920 ^[[31;01mERROR  ^[[00m ^[[00m               libav :0::^[[00m Invalid NAL unit size.
0:00:00.304477196 ^[[335m12064^[[00m 0x7f2bf40316c0 ^[[31;01mERROR  ^[[00m ^[[00m               libav :0::^[[00m Invalid NAL unit size.
0:00:00.304900346 ^[[335m12064^[[00m 0x7f2be8001e60 ^[[31;01mERROR  ^[[00m ^[[00m               libav :0::^[[00m Invalid NAL unit size.
0:00:00.305181466 ^[[335m12064^[[00m 0x7f2be0001a10 ^[[31;01mERROR  ^[[00m ^[[00m               libav :0::^[[00m Invalid NAL unit 1, skipping.
0:00:00.305555714 ^[[335m12064^[[00m 0x7f2be0001a10 ^[[31;01mERROR  ^[[00m ^[[00m               libav :0::^[[00m Could not find ref with POC 16
0:00:00.305950875 ^[[335m12064^[[00m 0x7f2be0001a10 ^[[31;01mERROR  ^[[00m ^[[00m               libav :0::^[[00m Could not find ref with POC 12
0:00:00.306291547 ^[[335m12064^[[00m 0x7f2be0001a10 ^[[31;01mERROR  ^[[00m ^[[00m               libav :0::^[[00m Could not find ref with POC 20
0:00:00.308009983 ^[[335m12064^[[00m 0x7f2bf0001920 ^[[31;01mERROR  ^[[00m ^[[00m               libav :0::^[[00m Invalid NAL unit size.
0:00:00.308427119 ^[[335m12064^[[00m 0x7f2bf40316c0 ^[[31;01mERROR  ^[[00m ^[[00m               libav :0::^[[00m Invalid NAL unit size.
0:00:00.308931321 ^[[335m12064^[[00m 0x7f2be8001e60 ^[[31;01mERROR  ^[[00m ^[[00m               libav :0::^[[00m Invalid NAL unit size.
0:00:00.341338364 ^[[335m12064^[[00m 0x7f2be0001a10 ^[[31;01mERROR  ^[[00m ^[[00m               libav :0::^[[00m Invalid NAL unit size.
0:00:00.341711650 ^[[335m12064^[[00m 0x7f2bf0001920 ^[[31;01mERROR  ^[[00m ^[[00m               libav :0::^[[00m Invalid NAL unit 1, skipping.
0:00:00.342599774 ^[[335m12064^[[00m 0x7f2bf0001920 ^[[31;01mERROR  ^[[00m ^[[00m               libav :0::^[[00m Could not find ref with POC 24
0:00:00.345936518 ^[[335m12064^[[00m 0x7f2bf40316c0 ^[[31;01mERROR  ^[[00m ^[[00m               libav :0::^[[00m Invalid NAL unit 0, skipping.
0:00:00.348823498 ^[[335m12064^[[00m 0x7f2be8001e60 ^[[31;01mERROR  ^[[00m ^[[00m               libav :0::^[[00m Invalid NAL unit size.
0:00:00.355526748 ^[[335m12064^[[00m 0x7f2bf40316c0 ^[[31;01mERROR  ^[[00m ^[[00m               libav :0::^[[00m CABAC_MAX_BIN : 100
0:00:00.355622463 ^[[335m12064^[[00m 0x7f2bf40316c0 ^[[31;01mERROR  ^[[00m ^[[00m               libav :0::^[[00m CABAC_MAX_BIN : 100




Command:
gst-launch-1.0 filesrc location=/root/Videos/bbb_360p_c.ts ! h265parse ! libde265dec ! xvimagesink

Totally can't play the video.

msg:
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
WARNING: from element /GstPipeline:pipeline0/GstLibde265Dec:libde265dec0: Unsupported extra data version 1, decoding may fail
Additional debug info:
libde265-dec.c(641): gst_libde265_dec_set_format (): /GstPipeline:pipeline0/GstLibde265Dec:libde265dec0
WARNING: from element /GstPipeline:pipeline0/GstLibde265Dec:libde265dec0: end_of_sub_stream_one_bit not set to 1 when it should be (code=1017)
Additional debug info:
libde265-dec.c(844): gst_libde265_dec_handle_frame (): /GstPipeline:pipeline0/GstLibde265Dec:libde265dec0
WARNING: from element /GstPipeline:pipeline0/GstLibde265Dec:libde265dec0: end_of_sub_stream_one_bit not set to 1 when it should be (code=1017)
Additional debug info:
libde265-dec.c(844): gst_libde265_dec_handle_frame (): /GstPipeline:pipeline0/GstLibde265Dec:libde265dec0
WARNING: from element /GstPipeline:pipeline0/GstLibde265Dec:libde265dec0: CTB outside of image area (concealing stream error...) (code=1004)
Additional debug info:
libde265-dec.c(844): gst_libde265_dec_handle_frame (): /GstPipeline:pipeline0/GstLibde265Dec:libde265dec0
WARNING: from element /GstPipeline:pipeline0/GstLibde265Dec:libde265dec0: end_of_sub_stream_one_bit not set to 1 when it should be (code=1017)
Additional debug info:
libde265-dec.c(844): gst_libde265_dec_handle_frame (): /GstPipeline:pipeline0/GstLibde265Dec:libde265dec0
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
WARNING: from element /GstPipeline:pipeline0/GstLibde265Dec:libde265dec0: CTB outside of image area (concealing stream error...) (code=1004)
Additional debug info:
libde265-dec.c(844): gst_libde265_dec_handle_frame (): /GstPipeline:pipeline0/GstLibde265Dec:libde265dec0
ERROR: from element /GstPipeline:pipeline0/GstLibde265Dec:libde265dec0: Error while decoding: coded parameter out of range (code=8)
Additional debug info:
libde265-dec.c(838): gst_libde265_dec_handle_frame (): /GstPipeline:pipeline0/GstLibde265Dec:libde265dec0
Execution ended after 0:00:00.025497612
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...


Not sure is the video clip itself got issue or decoder not supported it.
Will try check with HEVC player in Windows side.
Comment 7 Tim-Philipp Müller 2015-06-05 08:32:28 UTC
> Command:
> gst-launch-1.0 filesrc location=/root/Videos/bbb_360p_c.ts ! h265parse !
> avdec_h265 ! xvimagesink
> 
> Able to play but got of error and video playback corrupted very bad.

It's a .ts file but you're not using tsdemux!

> Command:
> gst-launch-1.0 filesrc location=/root/Videos/bbb_360p_c.ts ! h265parse !
> libde265dec ! xvimagesink
> 
> Totally can't play the video.

You should totally try with tsdemux :)
Comment 8 Sebastian Dröge (slomo) 2015-06-05 08:36:57 UTC
It also does not work well with tsdemux, actually it worked less than without tsdemux for me (I only ever got the first frame, it didn't play more frames corrupted).
Comment 9 ris.lim.siew.hoon 2015-06-05 09:13:17 UTC
Same result as Slomo if I added in tsdemux.
Comment 10 Sebastian Dröge (slomo) 2015-06-05 09:31:30 UTC
This is probably related or the same as bug #750400
Comment 11 Sebastian Dröge (slomo) 2015-06-05 10:02:49 UTC
... and it's not unfortunately :)
Comment 12 Sebastian Dröge (slomo) 2015-06-05 10:03:58 UTC
Thijs, do you have any ideas about this one? It seems to stay quite busy inside libav trying to decode something but never gives more data.
Comment 13 ris.lim.siew.hoon 2015-06-09 06:29:10 UTC
I'm using 1 of this "bbb-1280x720-cfg02.mkv" from http://www.libde265.org/downloads-videos/ 

1) 
command pipeline: not working
gst-launch-1.0 filesrc location=bbb-1280x720-cfg02.mkv ! matroskademux ! h265parse ! avdec_h265 ! xvimagesink

2)
command pipeline: working
gst-launch-1.0 filesrc location=bbb-1280x720-cfg02.mkv ! matroskademux ! h265parse ! libde265dec ! xvimagesink


I'm using mkvextract,exe from "https://www.bunkus.org/videotools/mkvtoolnix/index.html" extract to 'bbb-1280x720-cfg02.265' bitstream h265.

command: 
mkvextract.exe tracks hevc.mkv -f 0:bbb-1280x720-cfg02.265


Re-run it using the following command with bitstream h265.
1) 
command pipeline: not working
gst-launch-1.0 filesrc location=bbb-1280x720-cfg02.265 ! h265parse ! avdec_h265 ! xvimagesink

2)
command pipeline: working
gst-launch-1.0 filesrc location=bbb-1280x720-cfg02.265 ! h265parse ! libde265dec ! xvimagesink
Comment 14 Thijs Vermeir 2015-06-09 08:21:02 UTC
Also when the original file is demuxed first and stored to disk:
gst-launch-1.0 filesrc location=bbb_720p_c.ts ! tsdemux ! filesink location=bbb_720p_c.265

this file plays with avdec (however it looks there are some timestamping issues):
gst-launch-1.0 filesrc location=bbb_720p_c.265 ! h265parse ! avdec_h265 ! autovideosink

The difference is that now the encoded stream is parsed with "allignment=au". Still, it does not work in the tsdemux pipeline when the allignment is forced. So, at least there is some inconsistency in the parser when forced to use allignment=au.
Comment 15 Nicolas Dufresne (ndufresne) 2015-08-11 14:32:58 UTC
Just a note here, it's works in push mode, fails in pull mode.

# Pull mode (stalls, as mention on the ML, timestamps seems off (frameing is odd)
gst-launch-1.0 -v filesrc location=bbb_360p_c.ts ! tsdemux ! h265parse ! avdec_h265 ! xvimagesink

# Push mode (works)
gst-launch-1.0 -v filesrc location=bbb_360p_c.ts ! queue ! tsdemux ! h265parse ! avdec_h265 ! xvimagesink
Comment 16 Tim-Philipp Müller 2016-02-29 00:30:05 UTC
Still happen in master (~1.7.2)
Comment 17 Vincent Penquerc'h 2017-05-25 17:30:58 UTC
Nicolas' first pipeline works for me now.
Comment 18 Edward Hervey 2018-11-01 16:27:45 UTC
Automated removal of (bad) usage of the "NONE" target milestone.
Comment 19 GStreamer system administrator 2018-11-03 13:35:46 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/257.