I can't understand how use libavcodec to convert, for example, from avi to h.26开发者_C百科4. Can I convert video in my C++ program in this way:
file=popen("ffmpeg -i file.avi file.m4v");
Can I use this function to dynamically stream without waiting to finish a video converting process?
You can not stream a m4v file while it is being transcoded. ffmpeg writes metadata at the end of the transcoding process which is needed to stream a video. After finished conversion you have to use MP4Box or qt-fatsstart to put this metadata at the beginning. If you still want to stream video while conversion going on, I think you have to convert the video to MPEG transport stream (mpeg-ts) format.
精彩评论