[Libav-user] H264+flv bad video stream

Dragos Iordache dragoshiordache at gmail.com
Thu Jun 20 10:12:56 CEST 2013


On Mon, Jun 17, 2013 at 1:12 PM, Dragos Iordache
<dragoshiordache at gmail.com>wrote:

> On Mon, Jun 17, 2013 at 11:53 AM, Carl Eugen Hoyos <cehoyos at ag.or.at>wrote:
>
>> Dragos Iordache <dragoshiordache at ...> writes:
>>
>> > If my output is a file ("test.h264") then everything
>> > works ok.
>>
>> Does that mean if you feed test.h264 into ffmpeg to
>> produce the rtmp stream that you need (is that correct?),
>> it works fine, but if you call your application that
>> uses the libav* libraries it does not work?
>>
>> Carl Eugen
>>
>> _______________________________________________
>> Libav-user mailing list
>> Libav-user at ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/libav-user
>>
>
> Hi,
>
> Thanks for your help. The answer is yes. With the following command the
> streams works ok.
>
> .\ffmpeg.exe -i .\test.h264 -f  flv rtmp://live.justin.tv/app/live_****
>
> What do I do wrong?
>
> Thanks,
> Dragos
>
> --
>
> dragoshiordache at gmail.com
> 0726736376
>

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.

What do you think is not right?
Thanks for your help.

Dragos
-- 

dragoshiordache at gmail.com
0726736376
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20130620/c608478e/attachment.html>


More information about the Libav-user mailing list