On 20 Jun 2013 11:13, "Dragos Iordache" <[email protected]> wrote: > > Hi again, > > So I tested some more and the stream works ok with .\ffmpeg.exe -i .\test.h264 -c:v copy -f flv rtmp://live.justin.tv/app/live_**** > But the stream does not work with my implementation using libffmpeg. > > I tried different methods for sending the stream with libffmpeg but none worked ok. What I do now: > > -create an oformat of flv > -create a context for flv and filename=rtmp:/... > -initialize a stream of h264 codec > -write header > -encode using stagefright > -create a packet > -write the packet > > The test.h264 in the ffmpeg line is created using this method and filename is set to "test.h264" and not a rtmp server, so I think this is ok. > > The captured frame data differs slightly between the command I run with ffmpeg and my code using libffmpeg. One of the diferences if that the NAL header "00 00 00 01" is not like this in the ffmpeg method.
Absolutely. FLV uses the AVCC format to store h264 NALUs. See for example an excellent explanation at http://livertmpjavapublisher.blogspot.co.il/2011/06/h264-avcvideopacket.html . > What do you think is not right? Stagefright encoder produces packets in annex-b format. It could be enough to change their headers to AVCC format to make your rtmp happy. > Thanks for your help. > > Dragos Regards, Alex
_______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
