[FFmpeg-devel] H.264 NAL creation

mnagy at cc.hut.fi mnagy
Sun Nov 14 10:39:31 CET 2010


I have mp4 files stored on my media server. I'd like to open these  
files, retrieve H.264 frames and send them using by own RTP/RTCP  

I open video file using av_open_input_file(), then I find stream info,  
codec, and codec context. What I should do next? I tried by calling  
av_read_frame() to obtain a single frame, and then put it into RTP  
payload (I fragment it if it's necessary). But when I want to receive  
stream in VLC, I get error: "cannot decode one frame". I also found  
out by reading previous posts, that there is no simple correlation  
between obtaining AVPacket from av_read_frame(), and a NAL unit. What  
should I do obtain a NAL unit, and put it into my RTP payload?

Thanks in advance

More information about the ffmpeg-devel mailing list