h264parse: not correctly converting avc (alignment=au) to byte-stream (alignment=nal)
I am using Gstreamer 1.14.5 to read a MPEG DASH stream (H.264 stored in AVC format using AU alignment) and convert it to elementary stream (H.264 stored in byte-stream format using NAL alignment). However, the output is corrupted and the content can not be decoded correctly.
The follow errors are printed when we try to use mplayer to reproduce the output content:
[h264 @ 0x7fc7012eb920]concealing 288 DC, 288 AC, 288 MV errors in P frame
[h264 @ 0x7fc7012eb920]illegal short term buffer state detected
This pipeline using a open MPEG DASH TEST MEDIA url can be used to reproduce the issue. (the url is from BBC )
gst-launch-1.0 -v souphttpsrc location=http://rdmedia.bbc.co.uk/dash/ondemand/bbb/2/client_manifest-common_init.mpd ! dashdemux name=demux multiqueue name=mq demux.video_00 ! mq.sink_1 mq.src_1 ! qtdemux ! h264parse ! video/x-h264,stream-format=byte-stream,alignment=nal ! filesink location=/tmp/video.h264
I am using the MPlayer 1.3.0 to validate the video.h264 output but the gstreamer can be used too with the follow command:
gst-launch-1.0 playbin uri=file:///tmp/video.h264
I tested using Gstreamer 1.16 and it has the same issue