[FFmpeg-devel] [PATCH] move set_context_opts call for video encoders to fix ... (was: Re: strict experimental)

Janne Grunau janne-ffmpeg
Sat Sep 25 12:21:41 CEST 2010


On Sat, Sep 25, 2010 at 09:30:42AM +0000, Carl Eugen Hoyos wrote:
> Janne Grunau <janne-ffmpeg <at> jannau.net> writes:
> 
> > yes, strict_std_complience is only set after the find_codec_id_or_die
> > call for video encoders. see attached patch for a possible fix.
> 
> (with your patch and rv20 capabilities set to CODEC_CAP_EXPERIMENTAL)
> 
> ./ffmpeg -strict experimental -i tests/lena.pnm -strict experimental -vcodec
> rv20 -strict experimental test.rm -strict experimental
> FFmpeg version SVN-r25162, Copyright (c) 2000-2010 the FFmpeg developers
>   built on Sep 24 2010 12:35:08 with gcc 4.4.4
>   configuration: --cc=/usr/local/gcc-4.4.4/bin/gcc
>   libavutil     50.27. 0 / 50.27. 0
>   libavcore      0. 9. 0 /  0. 9. 0
>   libavcodec    52.89. 0 / 52.89. 0
>   libavformat   52.78. 5 / 52.78. 5
>   libavdevice   52. 2. 2 / 52. 2. 2
>   libavfilter    1.39. 0 /  1.39. 0
>   libswscale     0.11. 0 /  0.11. 0
> Input #0, image2, from 'tests/lena.pnm':
>   Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
>     Stream #0.0: Video: ppm, rgb24, 256x256, 25 tbr, 25 tbn, 25 tbc
> encoder 'rv20' is experimental and might produce bad results.
> Add '-strict experimental' if you want to use it.

Are you sure you're testing the patched ffmpeg? works here

./ffmpeg -i lena.pnm -strict experimental -vcodec rv20 -y test.rm 
FFmpeg version git-78070f9, Copyright (c) 2000-2010 the FFmpeg developers
  built on Sep 25 2010 12:15:06 with gcc 4.4.4
  configuration: --cpu=host --enable-gpl
  libavutil     50.28. 0 / 50.28. 0
  libavcore      0. 9. 0 /  0. 9. 0
  libavcodec    52.90. 0 / 52.90. 0
  libavformat   52.78. 5 / 52.78. 5
  libavdevice   52. 2. 2 / 52. 2. 2
  libavfilter    1.40. 0 /  1.40. 0
  libswscale     0.11. 0 /  0.11. 0
Input #0, image2, from 'lena.pnm':
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
    Stream #0.0: Video: ppm, rgb24, 256x256, 25 tbr, 25 tbn, 25 tbc
[buffer @ 0x29f0680] w:256 h:256 pixfmt:rgb24
[ffmpeg_output @ 0x29f08e0] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out'
[scale @ 0x29f0c00] w:256 h:256 fmt:rgb24 -> w:256 h:256 fmt:yuv420p flags:0xa0000004
Output #0, rm, to 'test.rm':
  Metadata:
    encoder         : Lavf52.78.5
    Stream #0.0: Video: rv20, yuv420p, 256x256, q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop encoding
frame=    1 fps=  0 q=3.8 Lsize=      12kB time=0.04 bitrate=2499.6kbits/s    
video:12kB audio:0kB global headers:0kB muxing overhead 2.016162%


Janne



More information about the ffmpeg-devel mailing list