<html><head><style>pre,code,address {
margin: 0px;
}
h1,h2,h3,h4,h5,h6 {
margin-top: 0.2em;
margin-bottom: 0.2em;
}
ol,ul {
margin-top: 0em;
margin-bottom: 0em;
}
blockquote {
margin-top: 0em;
margin-bottom: 0em;
}
</style></head><body><div>Hi Peter,</div><div><br></div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div dir="ltr"><div><span style="font-family:arial,sans-serif">When I run with this pipeline:</span></div><div>gst-launch-1.0 -ve sunxisrc keyint=12 bitrate=5000 ! video/x-h264,width=1280,height=720,framerate=60/1 ! h264parse ! tee name=t \<br> t. ! queue ! filesink location=TeeTestNoOtherTee.h264</div><div>I get a valid file.</div><div><br></div><div>When I run with <br></div><div>gst-launch-1.0 -ve sunxisrc keyint=12 bitrate=5000 ! video/x-h264,width=1280,height=720,framerate=60/1 ! h264parse ! tee name=t \<br> t. ! queue ! filesink location=TeeTestWithOtherTee.h264 \<br> t. ! queue ! rtph264pay mtu=1024 ! rtph264depay ! h264parse config-interval=1 ! fakesink</div><div><br></div><div>I get an h264 file that fails to play with ffplay: (snip details)</div></div></blockquote><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div dir="ltr"><div>Any thoughts about what is going on?</div></div></blockquote><div><br></div><div>H.264 can be packetised in different stream formats. In one case you end up writing <font face="monospace">video/x-h264,stream-format=byte-stream</font> into the file (aka "Annex B" format), in the other case <font face="monospace">video/x-h264,stream-format=avc3</font>. Annex B is self-synchronising and can be detected and read from a file, whereas AVC/AVC3 format isn't really meant for writing into a stream or file without external packetisation and should go into a container such as Matroska or mp4. (In general, it's best to always use a container in any case)</div><div><br></div><div>You can force the output format by putting a capsfilter with filtercaps behind h264parse, e.g.</div><div><br></div><div style="margin-left: 3ch;"><font face="monospace">h264parse ! video/x-h264,stream-format=byte-stream ! ....</font></div><div><br></div><div>Automatic negotiation with a tee and multiple tee branches in the mix is a bit tricky, and doesn't always work right unfortunately. (It may or may not be fixed in newer versions of GStreamer, I haven't checked. 1.18 is quite old now.)</div><div><br></div><div>Cheers</div><div> Tim</div><div><br></div><div><span></span></div></body></html>