[Libav-user] C api for ffv1 encoder

James Troeth james.troeth at plotlogic.com
Sat Sep 2 00:12:13 EEST 2023


Hi Users,

I am trying to write some software that uses the ffv1 encoder, however I am unable to produce a valid file using the c api.
I have had success with libx264 and lib264rgb encoders.

I have attached original.c which is a modified version of the example found at https://ffmpeg.org/doxygen/trunk/encode_video_8c-example.html
All that is changed is the pixel format to GRAY16 and the population of the frame data.
to run it I do:
    ./original "gray.mkv" "ffv1" to load the ffv1 encoder and output a mkv file.

I have attached the output which shows the encoder running and the output from ffplay trying to play the file.
The return code from avcodec_recieve_packet() is always AVERROR(EAGAIN).

Is someone able to modify the example code such that it works for ffv1 or tell me what I'm mising?

Thanks,
James









-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20230901/1eefc1d9/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: original.c
Type: text/x-csrc
Size: 6903 bytes
Desc: original.c
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20230901/1eefc1d9/attachment.c>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ffmpeg_output.txt
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20230901/1eefc1d9/attachment.txt>


More information about the Libav-user mailing list