It does not take that much work to read the muxed buffers before they're written to the file. It's exactly what I do in my program.
Sergej On Mon, Mar 23, 2009 at 9:47 PM, Beat <[email protected]> wrote: > > You should check the FLV muxing code in libavformat. It's pretty simple >> and >> yes the frames do get changed. >> >> >> Sergej >> >> On Mon, Mar 16, 2009 at 6:59 PM, Beat <[email protected]> wrote: >> >> >> >>> Hi all >>> >>> I am building a live cam which streams h264 over (Flash) RTMP to the >>> browser. The RTMP part is set up and I can stream h264 from mp4 files to >>> a browser. I also can capture from a connected USB cam and encode the >>> stream to h264 (libx264). >>> The problem is, the frames returned from avcodec_encode_video() look >>> different than the frames in the MP4 file. >>> >>> To record a mp4 file: >>> ffmpeg -s qvga -r 25 -f video4linux2 -i /dev/video0 -vcodec libx264 >>> filename.mp4 >>> >>> Pseudocode for the h264 encoding: >>> setup in stream >>> setup out codec >>> while(av_read_frame(in, frame)) { >>> encode(frame, pic) >>> swscale(pic) >>> encode(pic, buffer) >>> // What shall I do with the buffer? >>> sendToRtmp(buffer) >>> } >>> >>> What I need to known, after a frame is encoded into h264, are there any >>> post-decoding before it is written to the mp4-file? I try to analyze the >>> code, but I couldn't find it. >>> >>> Many thanks and kind regards >>> Beat >>> >>> _______________________________________________ >>> libav-user mailing list >>> [email protected] >>> https://lists.mplayerhq.hu/mailman/listinfo/libav-user >>> >>> >>> >> _______________________________________________ >> libav-user mailing list >> [email protected] >> https://lists.mplayerhq.hu/mailman/listinfo/libav-user >> >> >> > > FLV muxing does not work, this only works if you save to a file. But I need > the stream via RTMP. > MP4 muxing works for streaming via RTMP. > > Best reagrds > > Beat > _______________________________________________ > libav-user mailing list > [email protected] > https://lists.mplayerhq.hu/mailman/listinfo/libav-user > _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
