GNOME Bugzilla – Bug 750341
tsdemux: Not able to play HEVC video clip in pull mode
Last modified: 2018-11-03 13:35:46 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 ...
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
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.
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.
There might also be an issue with avdec_h265, try libde265dec for comparison.
Or h265parse. It works in avplay, libde265dec and avdec_h265 both only show the first frame.
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.
> 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 :)
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).
Same result as Slomo if I added in tsdemux.
This is probably related or the same as bug #750400
... and it's not unfortunately :)
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.
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
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.
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
Still happen in master (~1.7.2)
Nicolas' first pipeline works for me now.
Automated removal of (bad) usage of the "NONE" target milestone.
-- 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.