Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
20th December 2009, 16:33 | #1 | Link | |
Registered User
Join Date: Jul 2009
Location: Missouri, US
Posts: 68
|
ffmpeg -b -minrate -maxrate -bufsize
Quote:
Alright! I want to have ffmpeg encode something at no more than 110 kbit/s (or kbps). I have tried '-b 110' but this does not work. A buddy and I did some research, and apparently you have to take advantage of minrate, maxrate, and bufsize (required for minrate and maxrate). For clarification, "4000k" is "4000 kbit/s or kbps." This is what I want to know: what is and exactly does bufsize do? What is "video buffer verifier buffer size" (someone please call the Department of Redundancy Department)?
__________________
Intel C2Q Q9450 Yorkfield 12MB L2-Cache @ 3.2GHz, G.Skill 2x2GB DDR2-1000 (PC2 8000) DC, Corsair 750TX, ATI VisionTek Radeon HD4850 512MB, 500GB Seagate Barracuda 7200.11 SATA-II, 200GB Maxtor IDE-150 |
|
20th December 2009, 17:40 | #2 | Link | |
x264 developer
Join Date: Sep 2005
Posts: 8,666
|
Quote:
-b 110 means "110 bits per second". I don't think that's what you mean. What do you mean by "no more than 110kbps"? Do you mean an average bitrate of 110kbps? That's what -b is for. Do you mean a local bitrate not exceeding 110kbps? If so, why? |
|
20th December 2009, 17:44 | #3 | Link | ||
Registered User
Join Date: Jul 2009
Location: Missouri, US
Posts: 68
|
I am just trying to set the bitrate to 110kbps (the -b 110 would probably be more correct if I appended 'k' to '110'). In combination with a bitrate calculator, I am trying to make sure the encoded video will be around a specific filesize (such as 150 MB).
EDIT: Just tried it...but instead of displaying a bitrate of ~110kbps, it's all the way up to 300kbps (which is NOT what I want). Quote:
Quote:
__________________
Intel C2Q Q9450 Yorkfield 12MB L2-Cache @ 3.2GHz, G.Skill 2x2GB DDR2-1000 (PC2 8000) DC, Corsair 750TX, ATI VisionTek Radeon HD4850 512MB, 500GB Seagate Barracuda 7200.11 SATA-II, 200GB Maxtor IDE-150 Last edited by BlueToast; 20th December 2009 at 17:47. |
||
20th December 2009, 17:54 | #4 | Link |
Registered User
Join Date: Jul 2009
Location: Missouri, US
Posts: 68
|
Well then how do I encode FoldKora.mkv (698 MB, 320x240, x264 codec / avc1 format, 25fps, ? bitrate, 128kbps MP3 @ 48000 Hz) to FLV (~150 MB, 240x180, 25fps, 64kbps audio @ 44100 Hz)?
__________________
Intel C2Q Q9450 Yorkfield 12MB L2-Cache @ 3.2GHz, G.Skill 2x2GB DDR2-1000 (PC2 8000) DC, Corsair 750TX, ATI VisionTek Radeon HD4850 512MB, 500GB Seagate Barracuda 7200.11 SATA-II, 200GB Maxtor IDE-150 |
20th December 2009, 18:11 | #5 | Link |
x264 developer
Join Date: Sep 2005
Posts: 8,666
|
FLV supports H.264; use x264 instead. Read the guide.
|
20th December 2009, 18:31 | #6 | Link | ||
Registered User
Join Date: Jul 2009
Location: Missouri, US
Posts: 68
|
Quote:
Quote:
__________________
Intel C2Q Q9450 Yorkfield 12MB L2-Cache @ 3.2GHz, G.Skill 2x2GB DDR2-1000 (PC2 8000) DC, Corsair 750TX, ATI VisionTek Radeon HD4850 512MB, 500GB Seagate Barracuda 7200.11 SATA-II, 200GB Maxtor IDE-150 |
||
21st December 2009, 20:00 | #8 | Link |
Registered User
Join Date: Jul 2009
Location: Missouri, US
Posts: 68
|
Thanks Dark Shikari!
One thought I was having -- if you or someone else could clear this up -- upon executing the first line in that batch, it would save a file FoldKoraFLV.mp4 (or FLV if I changed MP4). Then it would execute the second line after finishing that task -- wouldn't this overwrite FoldKoraFLV.mp4/flv and thus undo the first line's work? How do this part work?
__________________
Intel C2Q Q9450 Yorkfield 12MB L2-Cache @ 3.2GHz, G.Skill 2x2GB DDR2-1000 (PC2 8000) DC, Corsair 750TX, ATI VisionTek Radeon HD4850 512MB, 500GB Seagate Barracuda 7200.11 SATA-II, 200GB Maxtor IDE-150 |
21st December 2009, 20:07 | #9 | Link |
Registered User
Join Date: May 2006
Posts: 957
|
The first pass doesn't need to write a video file at all, it writes a stats file which contains the information needed for the second pass. When the second pass is run, this file is read.
__________________
x264 log explained || x264 deblocking how-to preset -> tune -> user set options -> fast first pass -> profile -> level Doom10 - Of course it's better, it's one more. |
17th January 2010, 23:55 | #10 | Link |
Registered User
Join Date: Jul 2009
Location: Missouri, US
Posts: 68
|
Finally got the opportunity to try this out.
ffmpeg.bat Code:
ffmpeg -i hq700.mp4 -an -pass 1 -vcodec libx264 -vpre fastfirstpass -b 112k -bt 112k -threads 0 -s 240x180 lq150.mp4 ffmpeg -i hq700.mp4 -acodec libfaac -ab 64k -pass 2 -vcodec libx264 -vpre hq -b 112k -bt 112k -threads 0 -s 240x180 lq150.mp4 Code:
C:\Program Files (x86)\megui\tools\ffmpeg>ffmpeg.bat C:\Program Files (x86)\megui\tools\ffmpeg>ffmpeg -i hq700.mp4 -an -pass 1 -vcode c libx264 -vpre fastfirstpass -b 110k -bt 110k -threads 0 -s 240x180 lq150.mp4 FFmpeg version SVN-r20900-Sherpya, Copyright (c) 2000-2009 Fabrice Bellard, et a l. built on Dec 20 2009 03:53:05 with gcc 4.2.5 20080919 (prerelease) [Sherpya] libavutil 50. 7. 0 / 50. 7. 0 libavcodec 52.43. 0 / 52.43. 0 libavformat 52.44. 0 / 52.44. 0 libavdevice 52. 2. 0 / 52. 2. 0 libavfilter 1.12. 0 / 1.12. 0 libswscale 0. 7. 2 / 0. 7. 2 libpostproc 51. 2. 0 / 51. 2. 0 Seems stream 0 codec frame rate differs from container frame rate: 50.00 (50/1) -> 25.00 (25/1) Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'hq700.mp4': Metadata: major_brand : isom minor_version : 1 compatible_brands: isomavc1 Duration: 01:57:19.56, start: 0.000000, bitrate: 833 kb/s Stream #0.0(und): Video: h264, yuv420p, 720x576 [PAR 1:1 DAR 5:4], 727 kb/s, 50 fps, 25 tbr, 25k tbn, 50 tbc Stream #0.1(und): Audio: mp3, 48000 Hz, 2 channels, s16, 102 kb/s File for preset 'fastfirstpass' not found C:\Program Files (x86)\megui\tools\ffmpeg>ffmpeg -i hq700.mp4 -acodec libfaac -a b 64k -pass 2 -vcodec libx264 -vpre hq -b 110k -bt 110k -threads 0 -s 240x180 lq 150.mp4 FFmpeg version SVN-r20900-Sherpya, Copyright (c) 2000-2009 Fabrice Bellard, et a l. built on Dec 20 2009 03:53:05 with gcc 4.2.5 20080919 (prerelease) [Sherpya] libavutil 50. 7. 0 / 50. 7. 0 libavcodec 52.43. 0 / 52.43. 0 libavformat 52.44. 0 / 52.44. 0 libavdevice 52. 2. 0 / 52. 2. 0 libavfilter 1.12. 0 / 1.12. 0 libswscale 0. 7. 2 / 0. 7. 2 libpostproc 51. 2. 0 / 51. 2. 0 Seems stream 0 codec frame rate differs from container frame rate: 50.00 (50/1) -> 25.00 (25/1) Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'hq700.mp4': Metadata: major_brand : isom minor_version : 1 compatible_brands: isomavc1 Duration: 01:57:19.56, start: 0.000000, bitrate: 833 kb/s Stream #0.0(und): Video: h264, yuv420p, 720x576 [PAR 1:1 DAR 5:4], 727 kb/s, 50 fps, 25 tbr, 25k tbn, 50 tbc Stream #0.1(und): Audio: mp3, 48000 Hz, 2 channels, s16, 102 kb/s File for preset 'hq' not found File for present 'hq' not found. X_x
__________________
Intel C2Q Q9450 Yorkfield 12MB L2-Cache @ 3.2GHz, G.Skill 2x2GB DDR2-1000 (PC2 8000) DC, Corsair 750TX, ATI VisionTek Radeon HD4850 512MB, 500GB Seagate Barracuda 7200.11 SATA-II, 200GB Maxtor IDE-150 |
18th January 2010, 02:56 | #12 | Link |
Registered User
Join Date: Jul 2009
Location: Missouri, US
Posts: 68
|
Where would these presents be?
EDIT: Been Googling it and looking everywhere in ffmpeg documentation and can't find that parameter..
__________________
Intel C2Q Q9450 Yorkfield 12MB L2-Cache @ 3.2GHz, G.Skill 2x2GB DDR2-1000 (PC2 8000) DC, Corsair 750TX, ATI VisionTek Radeon HD4850 512MB, 500GB Seagate Barracuda 7200.11 SATA-II, 200GB Maxtor IDE-150 Last edited by BlueToast; 18th January 2010 at 02:58. |
18th January 2010, 18:15 | #14 | Link |
Registered User
Join Date: Jul 2009
Location: Missouri, US
Posts: 68
|
I don't have any ffpreset files. I am getting this ffmpeg.exe through MeGUI. I searched my harddrive for "*.ffpreset", "ffpreset", and "fastfirstpass" with no results for any. ffmpeg.org does not seem to have anything but SVN related downloads.
__________________
Intel C2Q Q9450 Yorkfield 12MB L2-Cache @ 3.2GHz, G.Skill 2x2GB DDR2-1000 (PC2 8000) DC, Corsair 750TX, ATI VisionTek Radeon HD4850 512MB, 500GB Seagate Barracuda 7200.11 SATA-II, 200GB Maxtor IDE-150 |
18th January 2010, 18:23 | #15 | Link | |
x264 developer
Join Date: Sep 2005
Posts: 8,666
|
Quote:
|
|
18th January 2010, 19:57 | #16 | Link |
Registered User
Join Date: Jul 2009
Location: Missouri, US
Posts: 68
|
Alright. I have ffmpeg.exe and *.ffpreset files in E:\Videos\Teremtes\. In the same directory I have hq700.mp4 and ffmpeg.bat. Here is ffmpeg.bat:
Code:
ffmpeg -i hq700.mp4 -an -pass 1 -vcodec libx264 -fpre "C:\Program Files (x86)\megui\tools\ffmpeg\libx264-fastfirstpass.ffpreset" -b 112k -bt 112k -threads 0 -s 240x180 lq150.mp4 ffmpeg -i hq700.mp4 -acodec libfaac -ab 64k -pass 2 -vcodec libx264 -fpre "C:\Program Files (x86)\megui\tools\ffmpeg\libx264-hq.ffpreset" -b 112k -bt 112k -threads 0 -s 240x180 lq150.mp4
__________________
Intel C2Q Q9450 Yorkfield 12MB L2-Cache @ 3.2GHz, G.Skill 2x2GB DDR2-1000 (PC2 8000) DC, Corsair 750TX, ATI VisionTek Radeon HD4850 512MB, 500GB Seagate Barracuda 7200.11 SATA-II, 200GB Maxtor IDE-150 |
19th January 2010, 13:08 | #17 | Link |
Registered User
Join Date: May 2006
Posts: 957
|
Yes, that is what you are supposed to do
__________________
x264 log explained || x264 deblocking how-to preset -> tune -> user set options -> fast first pass -> profile -> level Doom10 - Of course it's better, it's one more. |
25th January 2010, 18:04 | #18 | Link |
Registered User
Join Date: Jul 2009
Location: Missouri, US
Posts: 68
|
I ran the batch on two videos, and both of them turned out weird. I will explain what I mean by "weird" later. Is ffmpeg supposed to automatically mux in the audio to the resulting files? Another thing is that neither have audio like their high quality originals.
__________________
Intel C2Q Q9450 Yorkfield 12MB L2-Cache @ 3.2GHz, G.Skill 2x2GB DDR2-1000 (PC2 8000) DC, Corsair 750TX, ATI VisionTek Radeon HD4850 512MB, 500GB Seagate Barracuda 7200.11 SATA-II, 200GB Maxtor IDE-150 |
25th January 2010, 19:57 | #19 | Link | |
x264 developer
Join Date: Sep 2005
Posts: 8,666
|
Quote:
|
|
25th January 2010, 20:37 | #20 | Link |
Registered User
Join Date: Jul 2009
Location: Missouri, US
Posts: 68
|
Don't you mean 0kbps? There's no audio!
__________________
Intel C2Q Q9450 Yorkfield 12MB L2-Cache @ 3.2GHz, G.Skill 2x2GB DDR2-1000 (PC2 8000) DC, Corsair 750TX, ATI VisionTek Radeon HD4850 512MB, 500GB Seagate Barracuda 7200.11 SATA-II, 200GB Maxtor IDE-150 |
|
|