[FFmpeg-user] zimg colorspace yuv -> rgb possible?

Andy Furniss adf.lists at gmail.com
Wed Jan 27 12:36:56 CET 2016


Carl Eugen Hoyos wrote:
> Andy Furniss <adf.lists <at> gmail.com> writes:
>
>> mplayer -ss 11.2 -frames 3 -demuxer lavf -noaspect
>> -vf ilpack,scale -vo png ~/snooker-short.ts
>
> First convert the input file losslessly to something
> I-frame only (like ffv1), then testing will get (much)
> easier.

Yea was in progress, finished now (used y4m).

So this is the test frame snk-420i.y4m

https://drive.google.com/file/d/0BxP5-S1t9VEENjJpRk5vV0FjSFU/view?usp=sharing

This is what results look like -

https://drive.google.com/file/d/0BxP5-S1t9VEEaEVUTzJQc1dseWc/view?usp=sharing

commands -

mplayer -noaspect -vf ilpack,scale -vo png snk-420i.y4m
MPlayer SVN-r37594-5.3.0 (C) 2000-2016 MPlayer Team

Playing snk-420i.y4m.
libavformat version 57.21.101 (internal)
libavformat file format detected.
[lavf] stream 0: video (rawvideo), -vid 0
VIDEO:  [I420]  720x576  0bpp  25.000 fps    0.0 kbps ( 0.0 kbyte/s)
Load subtitles in ./
Opening video filter: [scale]
Opening video filter: [ilpack]
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
Movie-Aspect is undefined - no prescaling applied.
[swscaler @ 0x5649c12f2d40]bicubic scaler, from yuyv422 to rgb24 using 
MMXEXT
VO: [png] 720x576 => 720x576 RGB 24-bit
[VO_PNG] Warning: compression level set to 0, compression disabled!
[VO_PNG] Info: Use -vo png:z=<n> to set compression level from 0 to 9.
[VO_PNG] Info: (0 = no compression, 1 = fastest, lowest - 9 best, 
slowest compression)
png: output directory: .
Selected video codec: [rawi420] vfm: raw (RAW I420)
==========================================================================
Audio: no sound
Starting playback...
V:   0.0   0/  0 ??% ??% ??,?% 0 0


Exiting... (End of file)




ffmpeg -loglevel debug -i snk-420i.y4m -vf scale=interl=1 ffmpeg.png
ffmpeg version N-78066-g11bc4fd Copyright (c) 2000-2016 the FFmpeg 
developers
   built with gcc 5.3.0 (GCC)
   configuration: --prefix=/usr --disable-doc --enable-gpl 
--enable-libzimg --enable-libvpx --enable-libx265 --enable-libdcadec 
--enable-libmp3lame --enable-libx264
   libavutil      55. 15.100 / 55. 15.100
   libavcodec     57. 22.102 / 57. 22.102
   libavformat    57. 23.100 / 57. 23.100
   libavdevice    57.  0.100 / 57.  0.100
   libavfilter     6. 27.100 /  6. 27.100
   libswscale      4.  0.100 /  4.  0.100
   libswresample   2.  0.101 /  2.  0.101
   libpostproc    54.  0.100 / 54.  0.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging 
level) with argument 'debug'.
Reading option '-i' ... matched as input file with argument 'snk-420i.y4m'.
Reading option '-vf' ... matched as option 'vf' (set video filters) with 
argument 'scale=interl=1'.
Reading option 'ffmpeg.png' ... matched as output file.
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 snk-420i.y4m.
Successfully parsed a group of options.
Opening an input file: snk-420i.y4m.
[yuv4mpegpipe @ 0x333e0a0] Format yuv4mpegpipe probed with size=2048 and 
score=100
[yuv4mpegpipe @ 0x333e0a0] Before avformat_find_stream_info() pos: 62 
bytes read:32768 seeks:0
[yuv4mpegpipe @ 0x333e0a0] All info found
[yuv4mpegpipe @ 0x333e0a0] After avformat_find_stream_info() pos: 622148 
bytes read:622148 seeks:0 frames:1
Input #0, yuv4mpegpipe, from 'snk-420i.y4m':
   Duration: 00:00:00.04, start: 0.000000, bitrate: 124429 kb/s
     Stream #0:0, 1, 1/25: Video: rawvideo, 1 reference frame (I420 / 
0x30323449), yuv420p(left), 720x576, 1/25, SAR 64:45 DAR 16:9, 25 fps, 
25 tbr, 25 tbn, 25 tbc
Successfully opened the file.
Parsing a group of options: output file ffmpeg.png.
Applying option vf (set video filters) with argument scale=interl=1.
Successfully parsed a group of options.
Opening an output file: ffmpeg.png.
File 'ffmpeg.png' already exists. Overwrite ? [y/N] y
Successfully opened the file.
detected 4 logical cores
[Parsed_scale_0 @ 0x3345780] Setting 'interl' to value '1'
[Parsed_scale_0 @ 0x3345780] Setting 'flags' to value 'bicubic'
[Parsed_scale_0 @ 0x3345780] w:iw h:ih flags:'bicubic' interl:1
[graph 0 input from stream 0:0 @ 0x33449a0] Setting 'video_size' to 
value '720x576'
[graph 0 input from stream 0:0 @ 0x33449a0] Setting 'pix_fmt' to value '0'
[graph 0 input from stream 0:0 @ 0x33449a0] Setting 'time_base' to value 
'1/25'
[graph 0 input from stream 0:0 @ 0x33449a0] Setting 'pixel_aspect' to 
value '64/45'
[graph 0 input from stream 0:0 @ 0x33449a0] Setting 'sws_param' to value 
'flags=2'
[graph 0 input from stream 0:0 @ 0x33449a0] Setting 'frame_rate' to 
value '25/1'
[graph 0 input from stream 0:0 @ 0x33449a0] w:720 h:576 pixfmt:yuv420p 
tb:1/25 fr:25/1 sar:64/45 sws_param:flags=2
[format @ 0x3345be0] compat: called with 
args=[rgb24|rgba|rgb48be|rgba64be|pal8|gray|ya8|gray16be|ya16be|monob]
[format @ 0x3345be0] Setting 'pix_fmts' to value 
'rgb24|rgba|rgb48be|rgba64be|pal8|gray|ya8|gray16be|ya16be|monob'
[AVFilterGraph @ 0x3344d00] query_formats: 4 queried, 3 merged, 0 
already done, 0 delayed
[Parsed_scale_0 @ 0x3345780] picking rgb24 out of 9 ref:yuv420p alpha:0
[Parsed_scale_0 @ 0x3345780] w:720 h:576 fmt:yuv420p sar:64/45 -> w:720 
h:576 fmt:rgb24 sar:64/45 flags:0x4
Output #0, image2, to 'ffmpeg.png':
   Metadata:
     encoder         : Lavf57.23.100
     Stream #0:0, 0, 1/25: Video: png, 1 reference frame, rgb24(left), 
720x576 [SAR 64:45 DAR 16:9], 1/25, q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
     Metadata:
       encoder         : Lavc57.22.102 png
Stream mapping:
   Stream #0:0 -> #0:0 (rawvideo (native) -> png (native))
Press [q] to stop, [?] for help
cur_dts is invalid (this is harmless if it occurs once at the start per 
stream)
Clipping frame in rate conversion by 0.000008
cur_dts is invalid (this is harmless if it occurs once at the start per 
stream)
     Last message repeated 2 times
[output stream 0:0 @ 0x3345f20] EOF on sink link output stream 0:0:default.
No more output streams to write to, finishing.
[AVIOContext @ 0x34fb500] Statistics: 0 seeks, 17 writeouts
frame=    1 fps=0.0 q=-0.0 Lsize=N/A time=00:00:00.04 bitrate=N/A 
speed=0.599x
video:540kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB 
muxing overhead: unknown
Input file #0 (snk-420i.y4m):
   Input stream #0:0 (video): 1 packets read (622080 bytes); 1 frames 
decoded;
   Total: 1 packets (622080 bytes) demuxed
Output file #0 (ffmpeg.png):
   Output stream #0:0 (video): 1 frames encoded; 1 packets muxed (552544 
bytes);
   Total: 1 packets (552544 bytes) muxed
1 frames successfully decoded, 0 decoding errors
[AVIOContext @ 0x333e780] Statistics: 622148 bytes read, 0 seeks



More information about the ffmpeg-user mailing list