using -qscale in ffmpeg doesn't have any effect on coding
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| FFmpeg |
Fix Released
|
Undecided
|
Unassigned | |
| ffmpeg (Ubuntu) |
Medium
|
Reinhard Tartler |
Bug Description
Binary package hint: ffmpeg
using ffmpeg comming with ubuntu jaunty (which is FFmpeg version
0.5=-svn17737+
doesn't change the end result file size. In fact; coding a flv video five times
with qscale going from 1 to 5 has no effect; using 25 doesn't quite make the
video any smaller or less nice to watch.
Originally found this with trying to transcode vob mpeg to a theora; trying
-qmin, -qmax -sameq seems to have the same effect.
I guess the default of 200kb/s for the bitrate setting is taking precedence over
what's set for the quantizer
Here's some command line session which shows the problem. This isn't limited to vob -> flv; qscale doesn't work for theora->theora as well, (and probably a lot more, if not everything).
0 nido@toad:~/ for x in 1 2 3 4 5; do ffmpeg -y -i HARRY_POTTER_
FFmpeg version 0.5-svn17737+
configuration: --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --extra-
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 0 / 52.20. 0
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
libavfilter 0. 4. 0 / 0. 4. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Mar 23 2009 07:13:25, gcc: 4.3.3
Seems stream 0 codec frame rate differs from container frame rate: 50.00 (50/1) -> 25.00 (25/1)
Input #0, mpeg, from 'HARRY_
Duration: 01:15:42.86, start: 0.052000, bitrate: 12699 kb/s
Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x576 [PAR 64:45 DAR 16:9], 7500 kb/s, 25 tbr, 90k tbn, 50 tbc
Stream #0.1[0x80]: Audio: ac3, 48000 Hz, 5.1, s16, 384 kb/s
Stream #0.2[0x81]: Audio: ac3, 0 channels, s16
Output #0, flv, to 'video1.flv':
Stream #0.0: Video: flv, yuv420p, 720x416 [PAR 227:221 DAR 10215:5746], q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
frame= 1501 fps=103 q=0.0 Lsize= 12920kB time=60.04 bitrate=
video:12896kB audio:0kB global headers:0kB muxing overhead 0.183273%
FFmpeg version 0.5-svn17737+
configuration: --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --extra-
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 0 / 52.20. 0
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
libavfilter 0. 4. 0 / 0. 4. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Mar 23 2009 07:13:25, gcc: 4.3.3
Seems stream 0 codec frame rate differs from container frame rate: 50.00 (50/1) -> 25.00 (25/1)
Input #0, mpeg, from 'HARRY_
Duration: 01:15:42.86, start: 0.052000, bitrate: 12699 kb/s
Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x576 [PAR 64:45 DAR 16:9], 7500 kb/s, 25 tbr, 90k tbn, 50 tbc
Stream #0.1[0x80]: Audio: ac3, 48000 Hz, 5.1, s16, 384 kb/s
Stream #0.2[0x81]: Audio: ac3, 0 channels, s16
Output #0, flv, to 'video2.flv':
Stream #0.0: Video: flv, yuv420p, 720x416 [PAR 227:221 DAR 10215:5746], q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
frame= 1501 fps= 98 q=0.0 Lsize= 12920kB time=60.04 bitrate=
video:12896kB audio:0kB global headers:0kB muxing overhead 0.183273%
FFmpeg version 0.5-svn17737+
configuration: --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --extra-
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 0 / 52.20. 0
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
libavfilter 0. 4. 0 / 0. 4. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Mar 23 2009 07:13:25, gcc: 4.3.3
Seems stream 0 codec frame rate differs from container frame rate: 50.00 (50/1) -> 25.00 (25/1)
Input #0, mpeg, from 'HARRY_
Duration: 01:15:42.86, start: 0.052000, bitrate: 12699 kb/s
Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x576 [PAR 64:45 DAR 16:9], 7500 kb/s, 25 tbr, 90k tbn, 50 tbc
Stream #0.1[0x80]: Audio: ac3, 48000 Hz, 5.1, s16, 384 kb/s
Stream #0.2[0x81]: Audio: ac3, 0 channels, s16
Output #0, flv, to 'video3.flv':
Stream #0.0: Video: flv, yuv420p, 720x416 [PAR 227:221 DAR 10215:5746], q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
frame= 1501 fps= 99 q=0.0 Lsize= 12920kB time=60.04 bitrate=
video:12896kB audio:0kB global headers:0kB muxing overhead 0.183273%
FFmpeg version 0.5-svn17737+
configuration: --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --extra-
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 0 / 52.20. 0
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
libavfilter 0. 4. 0 / 0. 4. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Mar 23 2009 07:13:25, gcc: 4.3.3
Seems stream 0 codec frame rate differs from container frame rate: 50.00 (50/1) -> 25.00 (25/1)
Input #0, mpeg, from 'HARRY_
Duration: 01:15:42.86, start: 0.052000, bitrate: 12699 kb/s
Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x576 [PAR 64:45 DAR 16:9], 7500 kb/s, 25 tbr, 90k tbn, 50 tbc
Stream #0.1[0x80]: Audio: ac3, 48000 Hz, 5.1, s16, 384 kb/s
Stream #0.2[0x81]: Audio: ac3, 0 channels, s16
Output #0, flv, to 'video4.flv':
Stream #0.0: Video: flv, yuv420p, 720x416 [PAR 227:221 DAR 10215:5746], q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
frame= 1501 fps=103 q=0.0 Lsize= 12920kB time=60.04 bitrate=
video:12896kB audio:0kB global headers:0kB muxing overhead 0.183273%
FFmpeg version 0.5-svn17737+
configuration: --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --extra-
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 0 / 52.20. 0
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
libavfilter 0. 4. 0 / 0. 4. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Mar 23 2009 07:13:25, gcc: 4.3.3
Seems stream 0 codec frame rate differs from container frame rate: 50.00 (50/1) -> 25.00 (25/1)
Input #0, mpeg, from 'HARRY_
Duration: 01:15:42.86, start: 0.052000, bitrate: 12699 kb/s
Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x576 [PAR 64:45 DAR 16:9], 7500 kb/s, 25 tbr, 90k tbn, 50 tbc
Stream #0.1[0x80]: Audio: ac3, 48000 Hz, 5.1, s16, 384 kb/s
Stream #0.2[0x81]: Audio: ac3, 0 channels, s16
Output #0, flv, to 'video5.flv':
Stream #0.0: Video: flv, yuv420p, 720x416 [PAR 227:221 DAR 10215:5746], q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
frame= 1501 fps=104 q=0.0 Lsize= 12920kB time=60.04 bitrate=
video:12896kB audio:0kB global headers:0kB muxing overhead 0.183273%
0 nido@toad:~/ ls -la video[12345].flv
-rw-r--r-- 1 nido nido 13230180 2009-04-02 14:00 video1.flv
-rw-r--r-- 1 nido nido 13230180 2009-04-02 14:00 video2.flv
-rw-r--r-- 1 nido nido 13230180 2009-04-02 14:00 video3.flv
-rw-r--r-- 1 nido nido 13230180 2009-04-02 14:00 video4.flv
-rw-r--r-- 1 nido nido 13230180 2009-04-02 14:01 video5.flv
Reinhard Tartler (siretart) wrote : Re: [Bug 356322] [NEW] using -qscale in ffmpeg doesn't have any effect on coding | #1 |
Nido Media (nido) wrote : | #2 |
it works with svn for flv video; theora video, however; still doesn't care about the quantizer:
for x in 1 5 25; do /home/nido/
for x in 1 5 25; do /home/nido/
ls -lh
-rw-r--r-- 1 nido nido 798K 2009-04-06 21:17 out1.avi
-rw-r--r-- 1 nido nido 5.2M 2009-04-06 21:18 out1.flv
-rw-r--r-- 1 nido nido 798K 2009-04-06 21:17 out25.avi
-rw-r--r-- 1 nido nido 1.1M 2009-04-06 21:18 out25.flv
-rw-r--r-- 1 nido nido 798K 2009-04-06 21:17 out5.avi
-rw-r--r-- 1 nido nido 2.5M 2009-04-06 21:18 out5.flv
Nido Media (nido) wrote : | #3 |
Reinhard Tartler (siretart) wrote : Re: [Bug 356322] Re: using -qscale in ffmpeg doesn't have any effect on coding | #4 |
okay, this means this needs forwarding upstream.
--
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4
Reinhard Tartler (siretart) wrote : | #5 |
thanks for forwarding it. This is a better url: https:/
as soon as it has been fixed in HEAD we can consider backporting it to the 0.5 release.
Changed in ffmpeg (Ubuntu): | |
importance: | Undecided → Wishlist |
status: | New → Confirmed |
Changed in ffmpeg: | |
importance: | Undecided → Unknown |
status: | New → Unknown |
Changed in ffmpeg: | |
status: | Unknown → Confirmed |
Changed in ffmpeg: | |
status: | Confirmed → Incomplete |
Nido Media (nido) wrote : | #6 |
May I know what is incomplete about this bug?
Paul Gevers (paul-climbing) wrote : Re: [Bug 356322] Re: using -qscale in ffmpeg doesn't have any effect on coding | #7 |
You should look (and ask) upstream. That is where the incomplete message
come from. Except that upstream says closed/implemented and NOT
incomplete. This is probably a bug in Launchpad.
Paul
Nido Media wrote:
> May I know what is incomplete about this bug?
>
Reinhard Tartler (siretart) wrote : | #8 |
this is the patch from upstream.
can someone test it? it looks good to me, so I'll add it to the package on the next upload
Changed in ffmpeg (Ubuntu): | |
status: | Confirmed → Triaged |
importance: | Wishlist → Medium |
Nido Media (nido) wrote : | #9 |
356322.patch applies cleanly on ffmpeg-
Nido Media (nido) wrote : | #10 |
seems to work like a charm. What I did to accomplish this:
sudo su -
apt-get source ffmpeg
apt-get build-dep ffmpeg
cd ffmpeg-
dpkg-buildpackage -rfakeroot -uc -b
cd ..
dpkg -i *.deb
exit
for x in 1 5 25; do ffmpeg -y -vframes 250 -i in.avi -qscale $x -s vga out$x.ogg; done
ls -lah out*.ogg
output of the last command:
-rw-r--r-- 1 nido nido 865K Oct 2 15:23 out1.ogg
-rw-r--r-- 1 nido nido 2.3M Oct 2 15:23 out25.ogg
-rw-r--r-- 1 nido nido 1.2M Oct 2 15:23 out5.ogg
Seems like it's working.
Changed in ffmpeg (Ubuntu): | |
assignee: | nobody → Reinhard Tartler (siretart) |
status: | Triaged → In Progress |
Launchpad Janitor (janitor) wrote : | #11 |
This bug was fixed in the package ffmpeg - 4:0.5+svn200907
---------------
ffmpeg (4:0.5+
[ Reinhard Tartler ]
* Make arguments of av_set_pts_info() unsigned.
* update debian/changelog
* use patch for issue1245 from git.ffmpeg.org
* Support constant-quant encoding for libtheora, LP: #356322
* increase swscale compile time width (VOF/VOFW), LP: #443264
[ Loïc Minier ]
* Update config for karmic's armel toolchain.
* Enable neon flavour; LP: #383240.
* Update NEON confflags to assume v7 and VFP.
* Add backported NEON patches from ffmpeg trunk; see debian/
* Pass proper --cpu and --extra-flags on armel.
* Pass -fPIC -DPIC to neon pass.
-- Loic Minier <email address hidden> Tue, 13 Oct 2009 23:56:04 +0200
Changed in ffmpeg (Ubuntu): | |
status: | In Progress → Fix Released |
Paul Gevers (paul-climbing) wrote : | #12 |
Closing this old bug manually, as according to my comment #7 the bug upstream was closed and the upstream link does not work anymore.
Changed in ffmpeg: | |
importance: | Unknown → Undecided |
status: | Incomplete → New |
status: | New → Fix Released |
alvgarci (alvaro-garcia-gonzalo) wrote : | #13 |
Hi:
Same issue in FFMPEG on MacOS 10.7.3.
Any solution for that?
Thanks
Paul Gevers (paul-climbing) wrote : | #14 |
@alvgarci,
The bug is fixed in both Ubuntu and in upstream ffmpeg/libav. So you will have to ask you distribution for the fix. This is definitely the wrong place, although there might be useful information for the developers of your distribution.
Nido Media <email address hidden> writes:
> using ffmpeg comming with ubuntu jaunty (which is FFmpeg version 3:0.svn20090303 -1ubuntu4) ; usage of the -qscale rather then -b
> 0.5=-svn17737+
> doesn't change the end result file size. In fact; coding a flv video five times
> with qscale going from 1 to 5 has no effect; using 25 doesn't quite make the
> video any smaller or less nice to watch.
could you please check if that also happens with the latest version from
trunk?
--
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4