[FFmpeg-user] In and out-range Scale option able to correct 0-255 video to 0-235?

Christoph Gerstbauer christoph.gerstbauer at gmail.com
Tue May 19 22:42:07 CEST 2015


Hello Carl, here is the syntax

C:\Windows\System32>ffmpeg -i
C:\Users\Administrator\Desktop\big_buck_bunny_ffvhuff.avi -vf
"scale=in_range=full:out_range=tv" -vcodec ffvhuff C:\User
s\Administrator\Desktop\big_buck_bunny_ffvhuff_CORRfulltotv.avi -loglevel
debug
x265 [warning]: Unable to open libx265_main10.dll
ffmpeg version N-72220-gd0ac2f5 Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 4.9.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
--enable-gnu
tls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b
--enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme
--enab
le-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
--enable
-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr
--enable-libspeex --enable-libtheora --enable-libtwolame
--enable-libvidstab --ena
ble-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --e
nable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib
  libavutil      54. 23.101 / 54. 23.101
  libavcodec     56. 39.101 / 56. 39.101
  libavformat    56. 33.101 / 56. 33.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 16.101 /  5. 16.101
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Splitting the commandline.
Reading option '-i' ... matched as input file with argument
'C:\Users\Administrator\Desktop\big_buck_bunny_ffvhuff.avi'.
Reading option '-vf' ... matched as option 'vf' (set video filters) with
argument 'scale=in_range=full:out_range=tv'.
Reading option '-vcodec' ... matched as option 'vcodec' (force video codec
('copy' to copy stream)) with argument 'ffvhuff'.
Reading option
'C:\Users\Administrator\Desktop\big_buck_bunny_ffvhuff_CORRfulltotv.avi'
... matched as output file.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging
level) with argument 'debug'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file
C:\Users\Administrator\Desktop\big_buck_bunny_ffvhuff.avi.
Successfully parsed a group of options.
Opening an input file:
C:\Users\Administrator\Desktop\big_buck_bunny_ffvhuff.avi.
[avi @ 0000000002ea6400] Format avi probed with size=2048 and score=100
[avi @ 0000000002eb7ec0] use odml:1
[avi @ 0000000002ea6400] Before avformat_find_stream_info() pos: 5860 bytes
read:144392 seeks:4
[avi @ 0000000002ea6400] parser not found for codec ffvhuff, packets or
times may be invalid.
    Last message repeated 1 times
[avi @ 0000000002ea6400] All info found
[avi @ 0000000002ea6400] After avformat_find_stream_info() pos: 159592
bytes read:265356 seeks:4 frames:1
Input #0, avi, from
'C:\Users\Administrator\Desktop\big_buck_bunny_ffvhuff.avi':
  Metadata:
    encoder         : Lavf56.33.101
  Duration: 00:01:00.00, start: 0.000000, bitrate: 55447 kb/s
    Stream #0:0, 1, 1/24: Video: ffvhuff, 1 reference frame (FFVH /
0x48564646), yuv420p, 854x480, 1/24, 55480 kb/s, SAR 1:1 DAR 427:240, 24
fps, 24 t
br, 24 tbn, 24 tbc
Successfully opened the file.
Parsing a group of options: output file
C:\Users\Administrator\Desktop\big_buck_bunny_ffvhuff_CORRfulltotv.avi.
Applying option vf (set video filters) with argument
scale=in_range=full:out_range=tv.
Applying option vcodec (force video codec ('copy' to copy stream)) with
argument ffvhuff.
Successfully parsed a group of options.
Opening an output file:
C:\Users\Administrator\Desktop\big_buck_bunny_ffvhuff_CORRfulltotv.avi.
File
'C:\Users\Administrator\Desktop\big_buck_bunny_ffvhuff_CORRfulltotv.avi'
already exists. Overwrite ? [y/N] y
Successfully opened the file.
detected 4 logical cores
[Parsed_scale_0 @ 0000000002eafbc0] Setting 'in_range' to value 'full'
[Parsed_scale_0 @ 0000000002eafbc0] Setting 'out_range' to value 'tv'
[Parsed_scale_0 @ 0000000002eafbc0] Setting 'flags' to value '0x4'
[Parsed_scale_0 @ 0000000002eafbc0] w:iw h:ih flags:'0x4' interl:0
[graph 0 input from stream 0:0 @ 0000000004b94a60] Setting 'video_size' to
value '854x480'
[graph 0 input from stream 0:0 @ 0000000004b94a60] Setting 'pix_fmt' to
value '0'
[graph 0 input from stream 0:0 @ 0000000004b94a60] Setting 'time_base' to
value '1/24'
[graph 0 input from stream 0:0 @ 0000000004b94a60] Setting 'pixel_aspect'
to value '1/1'
[graph 0 input from stream 0:0 @ 0000000004b94a60] Setting 'sws_param' to
value 'flags=2'
[graph 0 input from stream 0:0 @ 0000000004b94a60] Setting 'frame_rate' to
value '24/1'
[graph 0 input from stream 0:0 @ 0000000004b94a60] w:854 h:480
pixfmt:yuv420p tb:1/24 fr:24/1 sar:1/1 sws_param:flags=2
[format @ 0000000004b95a40] compat: called with
args=[yuv420p|yuv422p|yuv444p|yuv411p|yuv410p|yuv440p|gbrp|gbrp9le|gbrp10le|gbrp12le|gbrp14le|gray|gra
y16le|yuva420p|yuva422p|yuva444p|gbrap|ya8|yuv420p9le|yuv420p10le|yuv420p12le|yuv420p14le|yuv420p16le|yuv422p9le|yuv422p10le|yuv422p12le|yuv422p14le|y
uv422p16le|yuv444p9le|yuv444p10le|yuv444p12le|yuv444p14le|yuv444p16le|yuva420p9le|yuva420p10le|yuva420p16le|yuva422p9le|yuva422p10le|yuva422p16le|yuva
444p9le|yuva444p10le|yuva444p16le|rgb24|bgra]
[format @ 0000000004b95a40] Setting 'pix_fmts' to value
'yuv420p|yuv422p|yuv444p|yuv411p|yuv410p|yuv440p|gbrp|gbrp9le|gbrp10le|gbrp12le|gbrp14le|gray|
gray16le|yuva420p|yuva422p|yuva444p|gbrap|ya8|yuv420p9le|yuv420p10le|yuv420p12le|yuv420p14le|yuv420p16le|yuv422p9le|yuv422p10le|yuv422p12le|yuv422p14l
e|yuv422p16le|yuv444p9le|yuv444p10le|yuv444p12le|yuv444p14le|yuv444p16le|yuva420p9le|yuva420p10le|yuva420p16le|yuva422p9le|yuva422p10le|yuva422p16le|y
uva444p9le|yuva444p10le|yuva444p16le|rgb24|bgra'
[AVFilterGraph @ 000000000035ef00] query_formats: 4 queried, 3 merged, 0
already done, 0 delayed
[Parsed_scale_0 @ 0000000002eafbc0] w:854 h:480 fmt:yuv420p sar:1/1 ->
w:854 h:480 fmt:yuv420p sar:1/1 flags:0x4
Output #0, avi, to
'C:\Users\Administrator\Desktop\big_buck_bunny_ffvhuff_CORRfulltotv.avi':
  Metadata:
    ISFT            : Lavf56.33.101
    Stream #0:0, 0, 1/24: Video: ffvhuff, 1 reference frame (FFVH /
0x48564646), yuv420p, 854x480 [SAR 1:1 DAR 427:240], 1/24, q=2-31, 200
kb/s, 24 fp
s, 24 tbn, 24 tbc
    Metadata:
      encoder         : Lavc56.39.101 ffvhuff
Stream mapping:
  Stream #0:0 -> #0:0 (ffvhuff (native) -> ffvhuff (native))
Press [q] to stop, [?] for help
Cliping frame in rate conversion by 0.000008
[output stream 0:0 @ 0000000004b95140] EOF on sink link output stream
0:0:default.
No more output streams to write to, finishing.
frame= 1440 fps=367 q=0.0 Lsize=  406110kB time=00:01:00.00
bitrate=55447.5kbits/s
video:406070kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.009723%
Input file #0 (C:\Users\Administrator\Desktop\big_buck_bunny_ffvhuff.avi):
  Input stream #0:0 (video): 1440 packets read (415815916 bytes); 1440
frames decoded;
  Total: 1440 packets (415815916 bytes) demuxed
Output file #0
(C:\Users\Administrator\Desktop\big_buck_bunny_ffvhuff_CORRfulltotv.avi):
  Output stream #0:0 (video): 1440 frames encoded; 1440 packets muxed
(415815916 bytes);
  Total: 1440 packets (415815916 bytes) muxed
1444 frames successfully decoded, 0 decoding errors
[AVIOContext @ 0000000002f0fe20] Statistics: 10 seeks, 13399 writeouts
[AVIOContext @ 0000000002ea6c80] Statistics: 415962108 bytes read, 4 seeks



Best Regards
Christoph

2015-05-17 13:01 GMT+02:00 Carl Eugen Hoyos <cehoyos at ag.or.at>:

> Christoph Gerstbauer <christophgerstbauer <at> gmail.com> writes:
>
> > is this ffmpeg scale option a possible method to
> > "crop" input vidoe with 0-255 values to an output
> > encoding of 16-235 values?
>
> As with all questions on this mailing list, please
> provide the command line that does not correctly
> "crop" the values together with the complete, uncut
> console output.
>
> Carl Eugen
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>


More information about the ffmpeg-user mailing list