| Author |
Message |
bayme hero
Joined: 10 Nov 2007 Location: EU
|
|
this is partly obsolete, since YouTube started to offer stereo,
see http://forum.videohelp.com/topic346256-150.html
How to create your own FLV (much smaller upload to YouTube!) in Windows.
For the noobs around here, and even some advanced users might like it:
http://www.any-video-converter.com/products/for_video_free/
This free converter uses the latest mencoder engine, and does it quite well!
It only has a nag confirmation at the end of each encode, but
it isn't annoying, since it also warns you when it is ready!
For YouTube, your FLV file needs to have a maximum stream-rate of 349 kbit/s.
Best settings in Any Video Converter for Profile: Flash Video Movie (*.flv)
can be found in two places, the bottom right corner:
| Code: |
Video Size 320x240
Video Bitrate 220 to 300
(whatever is available with your audio added to it)
Video Framerate 15 to 25
(lower for better image quality, at the cost of less -smooth- movement)
Audio codec mp3
Audio Bitrate 96
Samplerate 44100
(or 22050 if that's OK for you)
A/V Sync Basic |
and in the Options, change under the Audio tab, MP3 parameters:
| Code: |
Encode: VBR-2 | VBR Quality: 7, 8, or 9 (7 causes higher audio bitrate)
MP3 Volume: Default | Audio Quality: 0 |
Use MediaInfo http://mediainfo.sourceforge.net/en
to open your FLV and check "Tree" under the View menu
so you can see what the bitrate of your upload video is.
If it's higher than 349 kbit/s, create a new one, re-select the same video in Any Video Converter,
change "Video Bitrate" to something lower, or under Options change VBR Quality to 8 or 9.
If you use the settings mentioned above, it will use the LAME 3.97 codec for audio, which has superior quality with VBR at really low bitrates. You'll be amazed!
IMPORTANT:
MediaInfo does not understand LAME VBR, and reads wrong values from your FLV.
If you'd like to know the actual audio bitrate in your FLV, use G-Spot for that:
http://www.headbands.com/gspot/
Example video converted using Any Video Converter:
http://www.youtube.com/watch?v=rXEBDCX_O6M
Last edited by bayme on Mar 19, 2008 22:43, edited 5 times in total
|
|
hypnoticpimp Member
Joined: 15 Jan 2004 Location: United States
|
|
hey i tried it alot, its alot easier then other tutorials. but my question is on where you say change video bitrate to 300, What happens if we raise it to 500.00 and then do hex edit
|
|
hypnoticpimp Member
Joined: 15 Jan 2004 Location: United States
|
|
reason is to get more higher quality!
|
|
wonderpierrot Member
Joined: 12 Feb 2008 Location: United States
|
|
| hypnoticpimp wrote: |
| hey i tried it alot, its alot easier then other tutorials. but my question is on where you say change video bitrate to 300, What happens if we raise it to 500.00 and then do hex edit |
That won't work anymore, as YouTube fixed the HQ hex hacking. If the total bitrate of your FLV remains under 350k it should go through YouTube without re-encoding.
|
|
edong Member
Joined: 29 Sep 2005 Location: LOST in the USA
|
|
It says free to try
|
|
frifox Member
Joined: 29 Oct 2007 Location: United States
|
|
i use ffmpeg + lame... wrote a batch script front-end that does all the steps for me. there is no guessing with bitrate settings, everything is calculated on the fly... so far nothing beats the resulting quality
|
|
bayme hero
Joined: 10 Nov 2007 Location: EU
|
|
bayme hero
Joined: 10 Nov 2007 Location: EU
|
|
| frifox wrote: |
i use ffmpeg + lame... wrote a batch script front-end that does all the steps for me. there is no guessing with bitrate settings, everything is calculated on the fly... so far nothing beats the resulting quality  |
Would you care to share your ffmpeg batch command?
I get better results using mencoder, especially for framerates of 25 fps or below.
|
|
reez Member
Joined: 01 Dec 2007 Location: United States
|
|
wow thanks so much for this, it's nice that we can still get some better quality ... i post movie trailers on youtube, and i was wondering if there was a way to keep the aspect ratio widescreen with anyvideoconverter?
|
|
frifox Member
Joined: 29 Oct 2007 Location: United States
|
|
| bayme wrote: |
Would you care to share your ffmpeg batch command?
I get better results using mencoder, especially for framerates of 25 fps or below. |
batch script is here:
http://youtube.com/group/VMuTube
(download link is in group description)
to make things easier, here are the code snippets.
(assuming original.avi as input file, 96Kbps stereo audio,
250Kbps video, 25fps, keyframe every 5 seconds):
ENCODE AUDIO:
| Code: |
ffmpeg -i original.avi -vn audio.wav
lame --abr 96 audio.wav --resample 44.1 -q0 audio.mp3
ffmpeg -i audio.mp3 -acodec copy audio.flv
|
ENCODE VIDEO:
| Code: |
ffmpeg -i original.avi -pass 1 -an -vcodec flv -b 250k -r 25 -g 125 -cmp 3 -subcmp 3 -mbd 2 -flags aic+cbp+mv0+mv4+trell video.flv
if exist video.flv del video.flv
ffmpeg -i original.avi -pass 2 -an -vcodec flv -b 250k -r 25 -g 125 -cmp 3 -subcmp 3 -mbd 2 -flags aic+cbp+mv0+mv4+trell video.flv
|
COMBINE:
| Code: |
ffmpeg -i video.flv -vcodec copy -i audio.flv -acodec copy final.flv
|
if you want, we can both take same HQ avi, each encode with own methods, and then compare.... i'm always willing to explore and improve on the encoding quality
1920x1080, 8Mbps, 2 min, DivX, Action Trailer:
http://www.stage6.com/user/naruoskey/video/1057733/ULTRAVIOLET-Trailer-01
Last edited by frifox on Feb 20, 2008 03:49, edited 4 times in total
|
|
frifox Member
Joined: 29 Oct 2007 Location: United States
|
|
| reez wrote: |
| ... i post movie trailers on youtube, and i was wondering if there was a way to keep the aspect ratio widescreen with anyvideoconverter? |
nah, youtube will scale to 4:3... unless you press that "100% zoom" button, not very convenient. i usually add black bars on top/bottom
btw, you might be interested in this:
http://youtube.com/watch?v=bwkrpCqvcR0
|
|
reez Member
Joined: 01 Dec 2007 Location: United States
|
|
lol yea i AM. is that the padding trick that i know nothing about? Hey and thanks for Imutube it's AWESOME
|
|
bayme hero
Joined: 10 Nov 2007 Location: EU
|
|
| frifox wrote: |
ENCODE AUDIO:
| Code: |
ffmpeg -i original.avi -vn audio.wav
lame --abr 96 audio.wav --resample 44.1 -q0 audio.mp3
ffmpeg -i audio.mp3 -acodec copy audio.flv
|
|
It's widely known that abr is inferior to vbr, for lame. The only reason to use abr is when you require a certain bitrate for your result. If your requirement is quality, you should always use lame's vbr implementation, which is basically what lame is best at.
Here's what I do, using the most recent mencoder, and trying to stay below 350 kbit/s:
| Code: |
"c:\base\v\mencoder.exe" "e:\inputsource.avi" -o output.flv
-mc 0 -ofps 25 -srate 44100 -oac mp3lame -lameopts vbr=2:q=8:aq=0:mode=1:lowpassfreq=17000
-ovc lavc -of lavf -lavfopts format=flv -lavcopts vcodec=flv:vbitrate=236:keyint=125:
mbd=2:trell:v4mv:cbp:last_pred=3:predia=4:dia=4:preme=2:vpass=1
"c:\base\v\mencoder.exe" "e:\inputsource.avi" -o output.flv
-mc 0 -ofps 25 -srate 44100 -oac mp3lame -lameopts vbr=2:q=8:aq=0:mode=1:lowpassfreq=17000
-ovc lavc -of lavf -lavfopts format=flv -lavcopts vcodec=flv:vbitrate=236:keyint=125:
mbd=2:trell:v4mv:cbp:last_pred=3:predia=4:dia=4:preme=2:vpass=2 |
This should all be two lines.
Uses level 8 VBR (q=7 or 9 are often still fine too), joint stereo, and a lowpass at 17 kHz.
Also, I would never resample audio in the encoding stage. The source should already be 44.1 kHz stereo
and 25 fps. I generally don't even scale or do "-vf scale=448:336,harddup"
since I always do the resizing with other tools.
Here's an example of the quality you can get using mencoder, staying within YouTube's official limits:
http://www.youtube.com/watch?v=DYbibozTnWk (this one's at 29.97 fps, even)
|
|
frifox Member
Joined: 29 Oct 2007 Location: United States
|
|
yeah, i know that... but i need specific audio bitrate in the end, so i opted out for ABR...
btw, i added lowpass filter to lame command. removes those unnecessary high tones over 20Khz which nobody can hear anyways:
| Code: |
| lame audio.wav audio.mp3 --abr %AB% -q0 --resample 44.1 --lowpass 19.7 |
EX: http://www.youtube.com/watch?v=ywME1j2sB_U
thanks for the mencoder command, i'll do some tests and see how the quality compares!
|
|
bayme hero
Joined: 10 Nov 2007 Location: EU
|
|
| frifox wrote: |
yeah, i know that... but i need specific audio bitrate in the end, so i opted out for ABR...
btw, i added lowpass filter to lame command. removes those unnecessary high tones over 20Khz which nobody can hear anyways:
| Code: |
| lame audio.wav audio.mp3 --abr %AB% -q0 --resample 44.1 --lowpass 19.7 |
|
The lowpass is especially useful with vbr. For lame mp3 high frequency material is the heaviest to encode, by far.
So if you put it lower, like for example at 18 kHz, lame can put all its effort and quality in the rest..
Most people won't even hear the difference between 16 kHz lowpass and 21 kHz lowpass. Also, 16 kc mp3 is still a lot better than FM Stereo..
By the way, I always get my latest mencoder win32 compile from here: http://oss.netfarm.it/mplayer-win32.php
Sometimes needs a few config file changes regarding the font-support, which you won't need in command line..
See also here: http://forum.videohelp.com/topic346256-330.html#1832298
|
|
bayme hero
Joined: 10 Nov 2007 Location: EU
|
|
By the way, this is all BS now.
Don't upload your own FLV to YouTube, one day they *will* re-encode it, and it will look like utter CRAP.
|
|
reez Member
Joined: 01 Dec 2007 Location: United States
|
|
I cannot believe this. They're actually converting all FLV uploads one by one. This is inhumane..the...the horror. I thought only the hex-edited ones were victim, but NO. But why would they single out FLVs only for reconverting? Or are they aware of videos that bypassed conversion and those are the only ones they're converting?
|
|
zachattackary Member
Joined: 29 Sep 2008 Location: United States
|
|
switch the video size to original to fix this problem
|
|
reez Member
Joined: 01 Dec 2007 Location: United States
|
|
| zachattackary wrote: |
| switch the video size to original to fix this problem |
what do you mean?
|
|
|
|