How to restart a tee branch (WARN no codec_data in h264 caps) ?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to restart a tee branch (WARN no codec_data in h264 caps) ?

etienne
Hi everyone,

I have a pipeline on an IMX with 2 cameras as stream source, an image compositor, and several outputs linked on a tee, one on UDP, one in a filesink, and a last one in an hlssink for streaming through a http server. Here is the pipe :

imxv4l2videosrc device=/dev/video2 ! queue ! pa_compositor.sink_1
imxv4l2videosrc device=/dev/video3 ! queue ! pa_compositor.sink_2
imxg2dcompositor background-color=0x000000
sink_1::width=400 sink_1::height=300
sink_2::width=400 sink_2::height=300
queue ! video/x-raw,width=800,height=600 ! imxipuvideotransform ! imxvpuenc_h264 bitrate=3000 !
tee
pa_tee. ! queue name=mp4_queue ! h264parse ! mp4mux ! filesink location=/home/root/pa_camera.mp4
pa_tee. ! queue ! mpegtsmux ! hlssink playlist-root=http://192.168.44.110/hls 
pa_tee. ! queue ! rtph264pay ! udpsink host=192.168.44.63


I need to start/stop output on a given tee branch, say mp4mux for instance.
So far, when user wants to disable mp4mux, I simply send an EOS on  mp4_queue sink. This way I can retrieve destination file /home/root/pa_camera.mp4, it is valid.

The problem occurs when I want to restart the tee branch. I have tried to set state tee branch elements in GST_STATE_NULL then GST_STATE_PLAYING. I then get the following erros in logs :

WARN       codecparsers_h264 gsth264parser.c:1691:gst_h264_parser_parse_slice_hdr: couldn't find associated picture parameter set with id: 0
WARN       qtmux gstqtmux.c:3093:gst_qt_mux_video_sink_set_caps:<video_mp4mux_1> no codec_data in h264 caps
WARN       qtmux gstqtmux.c:3245:gst_qt_mux_video_sink_set_caps:<video_mp4mux_1> pad video_0 refused caps video/x-h264, stream-format=(string)avc, alignment=(string)au, parsed=(boolean)true, width=(int)800, height=(int)600, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1


What is it that I'm missing ?

Thanks,

etienne

Reply | Threaded
Open this post in threaded view
|

Re: How to restart a tee branch (WARN no codec_data in h264 caps) ?

Arjen Veenhuizen
I think that you need an h264parse element after the encoder in order to make sure that SPS/PPS information is generated regularly (set its config-interval property to -1 (requires git master) or 1).
Reply | Threaded
Open this post in threaded view
|

Re: How to restart a tee branch (WARN no codec_data in h264 caps) ?

etienne
Hi Arjen,

there is already a h264parse element right after the tee branch. Or do you mean something else ?
BTW, this pipeline works when I launch it with gst-launch. Problems occur when I try to dynamically start/stop a single branch.