Really irritating ffmpeg video bitrate conundrum

Discuss Applications

Really irritating ffmpeg video bitrate conundrum

Postby Calum » Sat Dec 23, 2006 11:39 am

Right. I have the version of ffmpeg from the atrpms repo. This after a couple of tries at using various other rpm versions and getting nowhere. Anyway, it works fine except that i can't get the video bitrate up in quality from the default, which seems to be crap. Everywhere i look on the web it says that -b will be the flag for specifying the video bitrate but it appears that whatever i put after this (allegedly can be any integer up to 32000) it ignores it. Here's my commdn that i'm using:

Code: Select all
ffmpeg -i infile.flv -acodec copy -b 3000 -s 320x240 outfile.mpg

nice and simple. it looks like -b has been deprecated. Does anybody know a way round this?

-----
just noticed the option -sameq which will sort out my issue by allowing the outfile to be of a better video quality but i am still irritated that i can't explicitly specify the output bitrate. Any ideas? this seems dumb if there's no way to do it now, and there used to be.
User avatar
Calum
guru
guru
 
Posts: 1343
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland

Postby Void Main » Sat Dec 23, 2006 1:40 pm

In the ffmpeg doc all the examples show the parameter in "k" but it probably works either way. e.g. "-b 800k". Also, is it possible that since you are using the "copy" codec that you can't change the bitrate?
User avatar
Void Main
Site Admin
Site Admin
 
Posts: 5705
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA

Postby Calum » Sat Dec 23, 2006 2:51 pm

no, copy is for the audio. With an FLV file, the audio is mp3, so this option means that the audio stream is just mapped to the new mpeg video stream instead of having to decode and reencode it.

and sorry, i should have put the error message, don't know what i was thinking.

Code: Select all
[calum@harvey ~]$ ffmpeg -b 800k-i gtk-gnutella-downloads/complete/Spike\ Jones\ videos/Spike\ jones\ and\ Country\ Cousins.flv -acodec copy -b 2k -s 320x240 outfile.mpg
FFmpeg version SVN-r6524, Copyright (c) 2000-2006 Fabrice Bellard, et al.
  configuration:  --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib --mandir=/usr/share/man --enable-mp3lame --enable-libogg --enable-vorbis --enable-faadbin --enable-faac --enable-xvid --enable-x264 --enable-a52 --enable-a52bin --enable-dts --enable-pp --enable-shared --enable-pthreads --enable-dc1394 --enable-gpl --disable-strip --extra-cflags=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m32 -march=i386 -fasynchronous-unwind-tables
  libavutil version: 49.0.1
  libavcodec version: 51.16.0
  libavformat version: 50.5.0
  built on Oct 27 2006 08:43:35, gcc: 4.0.2 20051125 (Red Hat 4.0.2-8)
ffmpeg: unrecognized option '-b'

so it's the option that's not working. i just thought maybe somebody here had seen about it. i found a couple of people saying they had also had this problem on the web, but haven't found any answer to it yet.
User avatar
Calum
guru
guru
 
Posts: 1343
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland

Postby Void Main » Sat Dec 23, 2006 3:02 pm

You need a space between your "800k" and your "-i".
User avatar
Void Main
Site Admin
Site Admin
 
Posts: 5705
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA

Postby Calum » Sat Dec 23, 2006 3:42 pm

how embarrasing!

ok, sorted that, but it's still doing what it was before, which is encoding the video bitrate at the default of 200 kbps (which is pants). It does seem like the -sameq option is fine for me though, so i'll just have to live with that.

also, these flv files seem to all have the sound about 1/4 to 1/3 of a second ahead of the audio. I don't suppose you know of any way to offset the sound against the video so that they are in synch again? this would really help since every time i watch a video my teeth are on edge about this!
User avatar
Calum
guru
guru
 
Posts: 1343
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland

Postby Void Main » Sat Dec 23, 2006 4:04 pm

I know that the video and audio can be synced because MythTV has options for this when transcoding. I've never actually had to use the sync adjustments though because my video has never been out of sync in Myth. I don't believe mythtranscode uses ffmpeg though so I doubt any of this helps.
User avatar
Void Main
Site Admin
Site Admin
 
Posts: 5705
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA

Postby Calum » Wed Dec 27, 2006 7:39 am

well, thanks for giving it your mental effort anyway, i will just have to google it when i get a moment.
User avatar
Calum
guru
guru
 
Posts: 1343
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland


Return to Applications

Who is online

Users browsing this forum: No registered users and 0 guests

cron