Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to generate FLV stream from raw h264 which can be played by Actionscript NetStream?
    primarykey
    data
    text
    <p>I have an issue with FLV stream generating. I've developed DVR system, an it should be able to stream video in FLV format (to play it on Actionscript NetStream). I receive video from encoder in raw H264 NAL units (0x00 0x00 0x00 0x01 ), also I can recognize is encoded frame IDR or non-IDR.</p> <p>My solution to create FLV stream (based on Adobe spec: Video File Format Specification Version 10) was:</p> <ol> <li>wait for IDR frame;</li> <li>put FLV header </li> <li>put PrevTagSize(0)</li> <li>put FLV tag with video tag VIDEODATA with AVCVIDEODATA</li> <li>put PrevTagSize</li> <li>repeat steps 4,5 till end of streaming. </li> </ol> <p>Stream looks good, and can be playable by ffplay, mplayer, vlc, etc. But not played by player based on Actionscript NetStream.</p> <p>So, I've get raw h264 data and convert it to FLV using ffmpeg:</p> <p><em>ffmpeg -f h264 -i d1.h264 -vcodec copy -f flv d1.flv</em></p> <p>and try to compate both flv's my and ffmpeg's.</p> <p>First of all I see that ffmpeg adds AVC sequence header, immediately after FLV header. I've started to do the same, but NetStream still not support my stream, and also another players ceased to play it.</p> <p>Ok, then I've continue to compare flv's. Now I see that NAL unit headers in ffmpeg's coded FLV a bit changed, but I can't understand what the meaning of the changes. I read many specs, but nothing helpful. Did anybody can clarify me this?</p> <p>Fo example my NAL units looks so: 00 00 00 01 XX XX ... - for all units </p> <p>FFmpeg NALs: 00 00 [14 BA] 61 9A ... - non IDR (two bytes variable) 00 00 [7A 02] 65 88 ... - IDR (two bytes variable) 00 00 00 40 06 05 ... - SEI</p> <p>Is there added some counter or anything else?</p> <p>Will be happy to see any ideas, links, etc.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload