[FFmpeg-devel] Wrapping ffmpeg.c

Evan Klinger eklinger at gmail.com
Thu Jul 14 01:03:34 CEST 2011


Bingo!
Thank you so much for that simple solution.

Evan

On Wed, Jul 13, 2011 at 4:01 PM, Nicolas George
<nicolas.george at normalesup.org> wrote:
> Le quintidi 25 messidor, an CCXIX, Evan Klinger a écrit :
>> I am trying to create a shared library that wraps most of the
>> functionality/code in ffmpeg.c into a more user friendly API. The code
>> is essentially the same as ffmpeg.c except the static variables have
>> been replaced by a struct with the variables as members, and the
>> struct is passed around to each function. Also, rather than using
>> command line options, I am trying to mimic the behavior of FFmpeg's
>> command line options programmatically. The code is successfully
>> reading in the video file and creating the output file, but it is not
>> using any of the settings I am supplying. For example, setting the
>> audio rate, frame rate, bitrates, etc.
>
> With ffmpeg command line, the order of parameters matters. Basically, if you
> write "-ar 42000" to set the audio bitrate, it will affect the next input
> (-i) or output file on the command line.
>
> If your program imitates that behaviour, then:
>
>>       ret = set_input_file(tp, "/home/eklinger/Ray_Final.mp4");
>>       assert(ret==0);
>>       ret=    set_output_file(tp, "/home/eklinger/out.mp4");
>>               assert(ret==0);
>>
>>       ret=    set_audio_codec(tp, "libfaac");
>
> ... you should try to live set_audio_codec before set_output_file, and the
> same for the rest of the settings.
>
> Regards,
>
> --
>  Nicolas George
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
>
> iEYEARECAAYFAk4eI7cACgkQsGPZlzblTJPxqwCgpyLyp5FBGAb29ffJtBk2lpYv
> cH4AoJTvnwI1YjxlbgEQ쳪⟐ꢥ�
> =prdE
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
>


More information about the ffmpeg-devel mailing list