FFmpeg How to write video to a file

后端 未结 3 1008
走了就别回头了
走了就别回头了 2020-12-24 15:38

What i want is

 1. Get video packet from stream source
 2. Decode it
 3. And write  that decoded data as video file(avi, mpeg etc)

I can ab

3条回答
  •  盖世英雄少女心
    2020-12-24 16:16

    I did something like this at some point using libx264 and vorbis.

    A code example. https://github.com/Themaister/SSNES/blob/master/record/ffemu.c

    The basic idea is that you have to set timestamps yourself in the AVFrame when you want to encode it. Then you can take that packet and write it with av_interleaved_write().

提交回复
热议问题