How to encode H.264 video using FFmpeg C API and then open the output with a media player?

后端 未结 2 1300
忘掉有多难
忘掉有多难 2021-02-10 00:51

I\'m trying to encode a H.264 video with the FFMPEG C API. I have successfully compiled and executed the decoding/encoding example provided by FFMPEG.

The problem I\'m f

2条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-10 01:24

    As mentioned by nobody555, maybe your VLC simply cannot open that file because it is a raw stream.

    Alternatives are listed at: https://superuser.com/questions/261774/converting-or-playing-a-264-video-file

    ffplay is an option, but it also works on VLC 2.2.1, Ubnuntu 15.10.

    Also consider the example: https://github.com/FFmpeg/FFmpeg/blob/n3.0/doc/examples/muxing.c which generates a container format instead of a raw stream.

提交回复
热议问题