[FFmpeg-user] bgra to yuv
Josh long
funkyirish at gmail.com
Wed Apr 11 04:12:46 CEST 2012
On Wed, Apr 4, 2012 at 2:44 AM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
> Josh long <funkyirish <at> gmail.com> writes:
>
> > I would like to rephrase my original question; What's the
> > best route to take (with quality preservation being the
> > metric) to get to yuv444p from bgra?
>
> Since this is a long thread:
> Please explain what you are trying to do (you do that above),
> why you are trying it, what command line you are using, the
> complete, uncut console output and what goes wrong.
>
> And because I'd like to understand the whole process:
> How are you receiving the bgra frames?
> (I ask because I have troubles believing anything produces
> raw bgra frames.)
>
> Thank you, Carl Eugen
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
Here goes: I want to convert bgra 1920x1080 30fps video to yuv444p format
for compression using straight dirac_encoder. This is for a school
project, and the videos we have been given are recorded from some special
camera that our client has. Here is what I've tried:
ffmpeg -i 0_10_sec.avi -vcodec rawvideo -pix_fmt yuv444p yuv444.avi
ffmpeg version 0.9.1, Copyright (c) 2000-2012 the FFmpeg developers
built on Mar 16 2012 02:44:10 with gcc 4.6.1
configuration: --enable-libschroedinger
libavutil 51. 32. 0 / 51. 32. 0
libavcodec 53. 42. 4 / 53. 42. 4
libavformat 53. 24. 2 / 53. 24. 2
libavdevice 53. 4. 0 / 53. 4. 0
libavfilter 2. 53. 0 / 2. 53. 0
libswscale 2. 1. 0 / 2. 1. 0
Input #0, avi, from '0_10_sec.avi':
Duration: 00:00:10.00, start: 0.000000, bitrate: 1990665 kb/s
Stream #0:0: Video: rawvideo, bgra, 1920x1080, 30 tbr, 30 tbn, 30 tbc
[buffer @ 0x1e6cae0] w:1920 h:1080 pixfmt:bgra tb:1/1000000 sar:0/1
sws_param:
[buffersink @ 0x1e652a0] auto-inserting filter 'auto-inserted scale 0'
between the filter 'src' and the filter 'out'
[scale @ 0x1e65aa0] w:1920 h:1080 fmt:bgra -> w:1920 h:1080 fmt:yuv444p
flags:0x4
Output #0, avi, to 'yuv444.avi':
Metadata:
ISFT : Lavf53.24.2
Stream #0:0: Video: rawvideo, yuv444p, 1920x1080, q=2-31, 200 kb/s, 30
tbn, 30 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo -> rawvideo)
Press [q] to stop, [?] for help
frame= 5 fps= 0 q=0.0 size= 30381kB time=00:00:00.16
bitrate=1493263.2kbitframe= 10 fps= 10 q=0.0 size= 60756kB
time=00:00:00.33 bitrate=1493131.5kbitframe= 15 fps= 9 q=0.0 size=
91131kB time=00:00:00.50 bitrate=1493084.7kbitframe= 19 fps= 9 q=0.0
size= 115431kB time=00:00:00.63 bitrate=1493066.4kbitframe= 24 fps= 9
q=0.0 size= 145806kB time=00:00:00.80 bitrate=1493050.6kbitframe= 28
fps= 9 q=0.0 size= 170106kB time=00:00:00.93 bitrate=1493043.1kbitframe=
31 fps= 8 q=0.0 size= 188331kB time=00:00:01.03
bitrate=1493038.3kbitframe= 34 fps= 7 q=0.0 size= 206556kB
time=00:00:01.13 bitrate=1493034.4kbitframe= 37 fps= 7 q=0.0 size=
224781kB time=00:00:01.23 bitrate=1493031.1kbitframe= 40 fps= 7 q=0.0
size= 243006kB time=00:00:01.33 bitrate=1493028.3kbitframe= 43 fps= 7
q=0.0 size= 261231kB time=00:00:01.43 bitrate=1493025.9kbitframe= 46
fps= 7 q=0.0 size= 279456kB time=00:00:01.53 bitrate=1493023.8kbitframe=
48 fps= 6 q=0.0 size= 291606kB time=00:00:01.60
bitrate=1493022.3kbitframe= 50 fps= 6 q=0.0 size= 303756kB
time=00:00:01.66 bitrate=1493020.8kbitframe= 53 fps= 6 q=0.0 size=
321981kB time=00:00:01.76 bitrate=1493019.3kbitframe= 56 fps= 6 q=0.0
size= 340206kB time=00:00:01.86 bitrate=1493018.0kbitframe= 59 fps= 6
q=0.0 size= 358431kB time=00:00:01.96 bitrate=1493016.7kbitframe= 62
fps= 6 q=0.0 size= 376656kB time=00:00:02.06 bitrate=1493015.6kbitframe=
64 fps= 5 q=0.0 size= 388806kB time=00:00:02.13
bitrate=1493015.4kbitframe= 66 fps= 5 q=0.0 size= 400956kB
time=00:00:02.20 bitrate=1493014.5kbitframe= 68 fps= 5 q=0.0 size=
413106kB time=00:00:02.26 bitrate=1493013.7kbitframe= 70 fps= 5 q=0.0
size= 425256kB time=00:00:02.33 bitrate=1493013.6kbitframe= 72 fps= 5
q=0.0 size= 437406kB time=00:00:02.40 bitrate=1493012.8kbitframe= 74
fps= 5 q=0.0 size= 449556kB time=00:00:02.46 bitrate=1493012.1kbitframe=
76 fps= 5 q=0.0 size= 461706kB time=00:00:02.53
bitrate=1493012.0kbitframe= 78 fps= 5 q=0.0 size= 473856kB
time=00:00:02.60 bitrate=1493011.4kbitframe= 81 fps= 5 q=0.0 size=
492081kB time=00:00:02.70 bitrate=1493010.7kbitframe= 84 fps= 5 q=0.0
size= 510306kB time=00:00:02.80 bitrate=1493010.1kbitframe= 87 fps= 5
q=0.0 size= 528531kB time=00:00:02.90 bitrate=1493009.6kbitframe= 90
fps= 5 q=0.0 size= 546756kB time=00:00:03.00 bitrate=1493009.0kbitframe=
92 fps= 5 q=0.0 size= 558906kB time=00:00:03.06
bitrate=1493008.6kbitframe= 95 fps= 5 q=0.0 size= 577131kB
time=00:00:03.16 bitrate=1493008.1kbitframe= 98 fps= 5 q=0.0 size=
595356kB time=00:00:03.26 bitrate=1493007.7kbitframe= 101 fps= 5 q=0.0
size= 613581kB time=00:00:03.36 bitrate=1493007.3kbitframe= 104 fps= 5
q=0.0 size= 631806kB time=00:00:03.46 bitrate=1493006.9kbitframe= 107
fps= 5 q=0.0 size= 650031kB time=00:00:03.56 bitrate=1493006.5kbitframe=
110 fps= 5 q=0.0 size= 668256kB time=00:00:03.66
bitrate=1493006.2kbitframe= 112 fps= 5 q=0.0 size= 680406kB
time=00:00:03.73 bitrate=1493006.2kbitframe= 116 fps= 5 q=0.0 size=
704706kB time=00:00:03.86 bitrate=1493005.5kbitframe= 119 fps= 5 q=0.0
size= 722931kB time=00:00:03.96 bitrate=1493005.2kbitframe= 122 fps= 5
q=0.0 size= 741156kB time=00:00:04.06 bitrate=1493005.0kbitframe= 125
fps= 5 q=0.0 size= 759382kB time=00:00:04.16 bitrate=1493004.7kbitframe=
128 fps= 5 q=0.0 size= 777607kB time=00:00:04.26
bitrate=1493004.4kbitframe= 131 fps= 5 q=0.0 size= 795832kB
time=00:00:04.36 bitrate=1493004.2kbitframe= 134 fps= 5 q=0.0 size=
814057kB time=00:00:04.46 bitrate=1493004.0kbitframe= 137 fps= 5 q=0.0
size= 832282kB time=00:00:04.56 bitrate=1493003.7kbitframe= 140 fps= 5
q=0.0 size= 850507kB time=00:00:04.66 bitrate=1493003.5kbitframe= 143
fps= 5 q=0.0 size= 868732kB time=00:00:04.76 bitrate=1493003.3kbitframe=
145 fps= 5 q=0.0 size= 880882kB time=00:00:04.83
bitrate=1493003.4kbitframe= 148 fps= 5 q=0.0 size= 899107kB
time=00:00:04.93 bitrate=1493003.2kbitframe= 151 fps= 5 q=0.0 size=
917332kB time=00:00:05.03 bitrate=1493003.0kbitframe= 154 fps= 5 q=0.0
size= 935557kB time=00:00:05.13 bitrate=1493002.9kbitframe= 155 fps= 5
q=0.0 size= 941632kB time=00:00:05.16 bitrate=1493002.6kbitframe= 156
fps= 5 q=0.0 size= 947707kB time=00:00:05.20 bitrate=1493002.6kbitframe=
157 fps= 5 q=0.0 size= 953782kB time=00:00:05.23
bitrate=1493002.7kbitframe= 159 fps= 5 q=0.0 size= 965932kB
time=00:00:05.30 bitrate=1493002.5kbitframe= 161 fps= 5 q=0.0 size=
978082kB time=00:00:05.36 bitrate=1493002.3kbitframe= 164 fps= 5 q=0.0
size= 996307kB time=00:00:05.46 bitrate=1493002.1kbitframe= 167 fps= 5
q=0.0 size= 1014532kB time=00:00:05.56 bitrate=1493002.0kbitframe= 170
fps= 5 q=0.0 size= 1032757kB time=00:00:05.66 bitrate=1493001.8kbitframe=
173 fps= 5 q=0.0 size= 1050982kB time=00:00:05.76
bitrate=1493001.7kbitframe= 176 fps= 5 q=0.0 size= 1069211kB
time=00:00:05.86 bitrate=1493007.3kbitframe= 180 fps= 5 q=0.0 size=
1093511kB time=00:00:06.00 bitrate=1493007.1kbitframe= 183 fps= 5 q=0.0
size= 1111736kB time=00:00:06.10 bitrate=1493006.9kbitframe= 186 fps= 5
q=0.0 size= 1129961kB time=00:00:06.20 bitrate=1493006.7kbitframe= 189
fps= 5 q=0.0 size= 1148186kB time=00:00:06.30 bitrate=1493006.5kbitframe=
192 fps= 5 q=0.0 size= 1166411kB time=00:00:06.40
bitrate=1493006.3kbitframe= 194 fps= 5 q=0.0 size= 1178561kB
time=00:00:06.46 bitrate=1493006.1kbitframe= 198 fps= 5 q=0.0 size=
1202861kB time=00:00:06.60 bitrate=1493005.9kbitframe= 201 fps= 5 q=0.0
size= 1221086kB time=00:00:06.70 bitrate=1493005.7kbitframe= 204 fps= 5
q=0.0 size= 1239311kB time=00:00:06.80 bitrate=1493005.6kbitframe= 207
fps= 5 q=0.0 size= 1257536kB time=00:00:06.90 bitrate=1493005.4kbitframe=
209 fps= 5 q=0.0 size= 1269686kB time=00:00:06.96
bitrate=1493005.2kbitframe= 212 fps= 5 q=0.0 size= 1287911kB
time=00:00:07.06 bitrate=1493005.0kbitframe= 215 fps= 5 q=0.0 size=
1306136kB time=00:00:07.16 bitrate=1493004.9kbitframe= 218 fps= 5 q=0.0
size= 1324361kB time=00:00:07.26 bitrate=1493004.7kbitframe= 222 fps= 5
q=0.0 size= 1348661kB time=00:00:07.40 bitrate=1493004.6kbitframe= 225
fps= 5 q=0.0 size= 1366886kB time=00:00:07.50 bitrate=1493004.5kbitframe=
227 fps= 5 q=0.0 size= 1379036kB time=00:00:07.56
bitrate=1493004.3kbitframe= 230 fps= 5 q=0.0 size= 1397261kB
time=00:00:07.66 bitrate=1493004.2kbitframe= 233 fps= 5 q=0.0 size=
1415486kB time=00:00:07.76 bitrate=1493004.0kbitframe= 235 fps= 5 q=0.0
size= 1427636kB time=00:00:07.83 bitrate=1493004.1kbitframe= 238 fps= 5
q=0.0 size= 1445862kB time=00:00:07.93 bitrate=1493004.0kbitframe= 241
fps= 5 q=0.0 size= 1464087kB time=00:00:08.03 bitrate=1493003.8kbitframe=
245 fps= 5 q=0.0 size= 1488387kB time=00:00:08.16
bitrate=1493003.5kbitframe= 248 fps= 5 q=0.0 size= 1506612kB
time=00:00:08.26 bitrate=1493003.4kbitframe= 251 fps= 5 q=0.0 size=
1524837kB time=00:00:08.36 bitrate=1493003.3kbitframe= 254 fps= 5 q=0.0
size= 1543062kB time=00:00:08.46 bitrate=1493003.2kbitframe= 256 fps= 5
q=0.0 size= 1555212kB time=00:00:08.53 bitrate=1493003.2kbitframe= 260
fps= 5 q=0.0 size= 1579512kB time=00:00:08.66 bitrate=1493003.0kbitframe=
262 fps= 5 q=0.0 size= 1591662kB time=00:00:08.73
bitrate=1493003.0kbitframe= 265 fps= 5 q=0.0 size= 1609887kB
time=00:00:08.83 bitrate=1493002.9kbitframe= 268 fps= 5 q=0.0 size=
1628112kB time=00:00:08.93 bitrate=1493002.8kbitframe= 271 fps= 5 q=0.0
size= 1646337kB time=00:00:09.03 bitrate=1493002.7kbitframe= 274 fps= 5
q=0.0 size= 1664562kB time=00:00:09.13 bitrate=1493002.6kbitframe= 278
fps= 5 q=0.0 size= 1688862kB time=00:00:09.26 bitrate=1493002.4kbitframe=
281 fps= 5 q=0.0 size= 1707087kB time=00:00:09.36
bitrate=1493002.3kbitframe= 284 fps= 5 q=0.0 size= 1725312kB
time=00:00:09.46 bitrate=1493002.2kbitframe= 288 fps= 5 q=0.0 size=
1749612kB time=00:00:09.60 bitrate=1493002.2kbitframe= 291 fps= 5 q=0.0
size= 1767837kB time=00:00:09.70 bitrate=1493002.1kbitframe= 293 fps= 5
q=0.0 size= 1779987kB time=00:00:09.76 bitrate=1493002.0kbitframe= 296
fps= 5 q=0.0 size= 1798212kB time=00:00:09.86 bitrate=1493001.9kbitframe=
299 fps= 5 q=0.0 size= 1816437kB time=00:00:09.96
bitrate=1493001.8kbitframe= 300 fps= 5 q=0.0 Lsize= 1822513kB
time=00:00:10.00 bitrate=1493002.7kbits/s
video:1822500kB audio:0kB global headers:0kB muxing overhead 0.000715%
unfortunately the video ends up as nine segments in each frame, each some
filter of the whole original frame, stacked in three rows and three
columns. These are gray-scale, and it looks like they are components that
could be added together in the right way to get the original video.
Of course the project presentation is Thursday, so we're going to tell the
client to use the x264 library. It's worth noting that the libschroedinger
comand Carl recommended earlier in the thread will work, but not play in
vlc (it will play in Gnome Mplayer).
Thanks again,
Blessings
More information about the ffmpeg-user
mailing list