[FFmpeg-user] Decode to BGR24 raw AVI
Timo S
timo.infradex at gmail.com
Tue Oct 2 12:33:00 CEST 2012
Hello.
There seems to be a disagreement between FFmpeg and VirtualDub of what
uncompressed bgr24 raw avi really is. I can tell this already by looking at
file sizes that they produce from the same video but PSNR & other metrics
tell me they're definitely not the same video.
Here's the drill (the source video file is 1280x720 at 25fps and has no audio):
1) ffmpeg -i input.avi -vcodec rawvideo -pix_fmt bgr24 output.avi
2) VirtualDub video settings: No filters, No frame rate change, Output color
depth 24bit RGB (888), Video compression: Uncompressed RGB/YCbCr
Result: Two avi files that are not identical even if they look the same in
VLC Player & the likes. Mediainfo command line tool tells me the following:
FFmpeg decoded avi:
Format : AVI
Format/Info : Audio Video Interleave
Format profile : OpenDML
File size : 1.50 GiB
Duration : 15s 560ms
Overall bit rate : 827 Mbps
Writing application : Lavf54.6.101
Video
ID : 0
Format : RGB
Codec ID : 0x00000000
Codec ID/Info : Basic Windows bitmap format. 1, 4
and
8 bpp versions are palettised. 16, 24 and 32bpp contain raw RGB samples
Duration : 15s 560ms
Source duration : 15s 560ms
Bit rate : 553 Mbps
Width : 1 280 pixels
Height : 4294966 576 pixels ( WHATTA?! )
Display aspect ratio : 0.000
Frame rate : 25.000 fps
Bit depth : 8 bits
!!!! NOT INDICATED: Bits/(Pixel*Frame)
Stream size : 1.00 GiB (67%)
-------------------------------
And the same for VirtualDub:
Format : AVI
Format/Info : Audio Video Interleave
File size : 1.88 GiB
Duration : 29s 280ms
Overall bit rate : 553 Mbps
Writing application : Lavf54.6.101
Writing library : VirtualDub build 32842/release
Video
ID : 0
Format : RGB
Codec ID : 0x00000000
Codec ID/Info : Basic Windows bitmap format. 1, 4
and
8 bpp versions are palettised. 16, 24 and 32bpp contain raw RGB samples
Duration : 29s 280ms
Bit rate : 553 Mbps
Width : 1 280 pixels
Height : 720 pixels ( Correct! )
Display aspect ratio : 16:9
Frame rate : 25.000 fps
Bit depth : 8 bits
Bits/(Pixel*Frame) : 24.000
Stream size : 1.88 GiB (100%)
-----------
Console output of ffmpeg:
Microsoft Windows [versio 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Kaikki oikeudet pidätetään.
C:\Users\Timo>mediainfo G:\Testivideot\h.264\Dec\pisarat.avi_2000k.mp4.avi
General
Complete name :
G:\Testivideot\h.264\Dec\pisarat.avi_
2000k.mp4.avi
Format : AVI
Format/Info : Audio Video Interleave
Format profile : OpenDML
File size : 1.50 GiB
Duration : 15s 560ms
Overall bit rate : 827 Mbps
Writing application : Lavf54.6.101
Video
ID : 0
Format : RGB
Codec ID : 0x00000000
Codec ID/Info : Basic Windows bitmap format. 1, 4
and
8 bpp versions are palettised. 16, 24 and 32bpp contain raw RGB samples
Duration : 15s 560ms
Source duration : 15s 560ms
Bit rate : 553 Mbps
Width : 1 280 pixels
Height : 4294966 576 pixels
Display aspect ratio : 0.000
Frame rate : 25.000 fps
Bit depth : 8 bits
Stream size : 1.00 GiB (67%)
C:\Users\Timo>mediainfo
G:\Testivideot\h.264\Dec\pisarat.avi_2000k.mp4_VD.avi
General
Complete name :
G:\Testivideot\h.264\Dec\pisarat.avi_
2000k.mp4_VD.avi
Format : AVI
Format/Info : Audio Video Interleave
File size : 1.88 GiB
Duration : 29s 280ms
Overall bit rate : 553 Mbps
Writing application : Lavf54.6.101
Writing library : VirtualDub build 32842/release
Video
ID : 0
Format : RGB
Codec ID : 0x00000000
Codec ID/Info : Basic Windows bitmap format. 1, 4
and
8 bpp versions are palettised. 16, 24 and 32bpp contain raw RGB samples
Duration : 29s 280ms
Bit rate : 553 Mbps
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate : 25.000 fps
Bit depth : 8 bits
Bits/(Pixel*Frame) : 24.000
Stream size : 1.88 GiB (100%)
---------------
Console output of FFmpeg:
ffmpeg -i G:\Test\h.264\Enc\temp\pisarat.avi_2000k.mp4 -vco
dec rawvideo -pix_fmt bgr24 d:\test.avi
ffmpeg version N-41074-g9c27f29 Copyright (c) 2000-2012 the FFmpeg
developers
built on May 27 2012 13:25:48 with gcc 4.6.3
configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-ru
ntime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r
--enable-libass
--enable-libcelt --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable
-libfreetype --enable-libgsm --enable-libmp3lame --enable-libnut
--enable-libope
njpeg --enable-librtmp --enable-libschroedinger --enable-libspeex
--enable-libth
eora --enable-libutvideo --enable-libvo-aacenc --enable-libvo-amrwbenc
--enable-
libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid
--e
nable-zlib
libavutil 51. 55.100 / 51. 55.100
libavcodec 54. 23.100 / 54. 23.100
libavformat 54. 6.101 / 54. 6.101
libavdevice 54. 0.100 / 54. 0.100
libavfilter 2. 77.100 / 2. 77.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'G:\Test\h.264\Enc\temp\pisarat.a
vi_2000k.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf54.6.101
Duration: 00:00:29.28, start: 0.000000, bitrate: 2060 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
1280x720,
2057 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc
Metadata:
handler_name : VideoHandler
w:1280 h:720 pixfmt:yuv420p tb:1/25 sar:0/1 sws_param:flags=2
[buffersink @ 0000000004b90aa0] No opaque field provided
[format @ 0000000004b90c20] auto-inserting filter 'auto-inserted scaler 0'
betwe
en the filter 'src' and the filter 'format'
[scale @ 0000000001e82600] w:1280 h:720 fmt:yuv420p sar:0/1 -> w:1280 h:720
fmt:
bgr24 sar:0/1 flags:0x4
Output #0, avi, to 'd:\test.avi':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
ISFT : Lavf54.6.101
Stream #0:0(und): Video: rawvideo, bgr24, 1280x720, q=2-31, 200 kb/s, 25
tbn
, 25 tbc
Metadata:
handler_name : VideoHandler
Stream mapping:
Stream #0:0 -> #0:0 (h264 -> rawvideo)
Press [q] to stop, [?] for help
DTS -1, next:-40000 st:0 invalid dropping
frame= 60 fps=0.0 q=0.0 size= 162006kB time=00:00:02.40
bitrate=552980.5kbits
.....
.....
frame= 700 fps= 32 q=0.0 size= 1890020kB time=00:00:28.00
bitrate=552965.9kbits
frame= 713 fps= 32 q=0.0 size= 1925120kB time=00:00:28.52
bitrate=552965.8kbits
frame= 732 fps= 32 q=0.0 Lsize= 1976423kB time=00:00:29.28
bitrate=552966.5kbit
s/s
video:1976400kB audio:0kB global headers:0kB muxing overhead 0.001171%
I can get a correctly formatted avi by decoding anything with FFmpeg and
re-decoding it with VirtualDub.
--
View this message in context: http://ffmpeg-users.933282.n4.nabble.com/Decode-to-BGR24-raw-AVI-tp4653855.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.
More information about the ffmpeg-user
mailing list