Hello guys,
I'm developing video upload feature for my website for already 2 months. I've done everything, but I still have some problems.
I'm trying to encode videos for youtube with mencoder (linux) and I have a few questions.
Why did this movie (it's under 350 kbps) was reencoded by YouTube (same video uploaded on YouTube)? I've used same command with some other movies and YouTube didn't reencoded them:
The output is:first: /usr/local/bin/mencoder -really-quiet -vf scale=448:-3,expand=448:336 -sws 9 -of lavf -ovc lavc -lavcopts vcodec=flv:vbitrate=250:trell:v4mv:mv0:mbd=2:cbp:a ic:cmp=3ubcmp=3:vpass=1 -frames 800 -ofps 24000/1001 -oac mp3lame -lameopts abr:br=64:mode=0 -channels 1 -srate 22050 -of lavf -lavfopts format=flv -o /home/re/video/2/25.flv /home/re/ff/logo7.avi /home/re/video/2/25temp
second: /usr/local/bin/mencoder -really-quiet -vf scale=448:-3,expand=448:336 -sws 9 -of lavf -ovc lavc -lavcopts vcodec=flv:vbitrate=250:trell:v4mv:mv0:mbd=2:cbp:a ic:cmp=3ubcmp=3:vpass=2 -frames 800 -ofps 24000/1001 -oac mp3lame -lameopts abr:br=64:mode=0 -channels 1 -srate 22050 -of lavf -lavfopts format=flv -o /home/re/video/2/25.flv /home/re/ff/logo7.avi /home/re/video/2/25temp
Broken frame at 0x1E1A2 Broken frame at 0x1E1A2
I wonder how can I fix this? What should I add to my command line?
--------------------
Another question is how can I set maximum bitrate for the movie? When I use vbitrate=250, for example, some movies encoding with higher bitrates (>350 Kbps including sound), but some movies encoding with pretty low bitrate (around 300). Is there any option that will set real maximum bitrate for the video?
--------------------
Also, I'd like to know what are the best settings for mencoder? I use command line (see above), but I get extremely low quality movies, like this one.
--------------------
And the last, but not least. Why when I do 30 fps > 24 fps or 24 fps > 15 fps with mencoder's -ofps 24000/1001 OR -ofps 15, I get really jerky videos. I mean every movement in those videos looks really ugly, like video plays fast, then slows down for a moment, then plays faster etc. Sample (look at the camera movement at 20-23 seconds).
I wonder how can I fix it?
Please answer for all or some of these questions. Any help will be really appreciated.
Support our site by donate $5 directly to us Thanks!!!
Try StreamFab Downloader and download streaming video from Netflix, Amazon!
Try StreamFab Downloader and download streaming video from Netflix, Amazon!
+ Reply to Thread
Results 211 to 240 of 1969
-
-
The problem with quality is because video is jerky. When I use same output framerate, video quality is pretty good. But I'd really like to use framerates like 15 fps or 12 fps for YouTube.
I wonder, how can I change framerate, so movies play smoothly?
And seconds unanswered question is how to control bitrate (if I need exactly the setted bitrate +-10 kbps)? WIll third pass help? -
I've seen that severe blocking at the beginning of encodes before but can't remember what was used to encode the source for re-encoding. It looks like something down the chain that's not encoding some frames. I had this problem on an old laptop but can't recall if it was too little resources or buggy codec. There should be absolutely no severe blocking at the beginning of the video which may be related to the stalled looking duped frames or looking like a bufferunderun that handles it by duping last good frames.
According to MediaInfo 25.flv has 316kbps video - what YT sees as too much. You need to load that into a hex editor and make a simple change so that the total video and audio bit rate as it will appear to YT as below 350kbps. The actual bit rate is not changed.
See the beginning of this thread.
Haven't run into the broken frame. I'm surprised it doesn't just drop the frame and tell you about it without stopping. -
looks like the koureion
Originally Posted by ApplePro
changing framerate can be jerky.
I've said i use avisynth for filtering though, can't really rate the difference in mencoder's performance.
Originally Posted by ApplePro
maybe provide a source sample of this problem clip,
so someone else can try.
Like i said i use avisynth for framerate conversion, but mencoder should do ok.
Originally Posted by ApplePro
gl -
I NEED HELP!!!
I am trying to use mencoder. I have my video and all the stuff on the C:\ drive...
I run the command prompt and put the following in for my first pass:
"mencoder 1.wmv -o 1.flv -vf scale=480:-3,expand=480:360 -ovc lavc -lavcopts vcodec=flv:vpass=1 -nosound"
everything goes smooth...
then for the second pass I put the following in:
"mencoder 1.wmv -o 1.flv -af resample=44100:2:1 -sws 9 -vf scale=480:-3,expand=480:360 -of lavf -ovc lavc -lavcopts vcodec=flv:vpass=2:vbitrate=1000:trell:v4mv:mv0:mb d=2:cbp:aic:cmp=3ubcmp=3 -oac mp3lame -lameopts abr:br=128:mode=0"
and I get some kind of error saying:
"requested bitrate is too low
Couldnt not open Codec .
FATAL: Cannot initialize video driver
Exiting . . . "
If someone could PLEASE help me with this proble, it would be GREATLY appreciated!
Thanks! -
Do you mean use the exact same thing as in:
"mencoder 1.wmv -o 1.flv -vf scale=480:-3,expand=480:360 -ovc lavc -lavcopts vcodec=flv:vpass=1 -nosound"
or do I have something set differently for the second pass then from the first?
I got this set up from a tutorial on you tube...so I am just copying nad pasting, I really dont understnad the "language" behind it... -
i mean exactly the same like this:
Code:mencoder 1.wmv -o 1.flv -af resample=44100:0:0 -sws 9 -vf scale=480:-3,expand=480:360 -of lavf -ovc lavc -lavcopts vcodec=flv:vpass=1:vbitrate=1000:trell:v4mv:mv0:mbd=2:cbp:aic:cmp=3:subcmp=3 -oac mp3lame -lameopts abr:br=128:mode=0 mencoder 1.wmv -o 1.flv -af resample=44100:0:0 -sws 9 -vf scale=480:-3,expand=480:360 -of lavf -ovc lavc -lavcopts vcodec=flv:vpass=2:vbitrate=1000:trell:v4mv:mv0:mbd=2:cbp:aic:cmp=3:subcmp=3 -oac mp3lame -lameopts abr:br=128:mode=0
-
Ok...
when I change the # from vpass=1 to vpass=2 for the second pass....thats then I get that "FATAL" error I posted above.
Also, when I just do ONE pass...change the HEX number and upload it to youtube, I am havingt 2 problems:
1) its not high qulaity, cuz I guess its not "tricking" youtube
2) my video portion is in fastforward, while the audio is normal...
you can see what I mean here: http://www.youtube.com/watch?v=19gse9_TM8Y
45Tripp thanks for your continued support...hopefully we can get this figured out... -
OK guys and gals,
Recently bumped into uploads that, despite being under 350 kbit/s (A+V in total) were getting re-encoded either way. It seems to have something to do with the actual duration of the original. Videos under 3 minutes have a lower barrier. The shorter it is, the lower the bandwidth of it should be.
This one for example had to be 348 or less, and this one had to be 344 or less for it to pass the re-encode.
On further inspection it might be a size issue. If your uploaded FLV is under 10 Mb in size, YouTube behaves differently. -
Im trying to add my subtitle richman.srt to this .vob file. but it doesnt show the subtitle at all. heres the command i enter in cmd
mencoder -sub newlogo.srt test.vob -o men.flv -af resample=22050:0:0 -sws 9 -vf scale=448:-3,expand=448:336 -of lavf -ovc lavc -lavcopts vcodec=flv:vbitrate=500:trell:v4mv:mv0:mbd=2:cbp:a ic:cmp=3ubcmp=3 -oac mp3lame -lameopts abr:br=48:mode=3
Can someone please tell me how i can add my subitle .srt file that i created to place on the video? cause that above code, doesnt show the subtitle -
hypnotic
console output....
but it's probably not finding the subfont.
easiest to find a true type font you want, download and put in the working folder
as font.ttf, then add to the commandline
Code:-font font.ttf
Originally Posted by imcryz
a sample of the source (the file you are encoding, the first material)
i want the complete text of:
the mencoder commands and the console output (the messages it prints out while working)
gl -
the font that i used for my .srt file was arial black, do u know where i can find the ttf for arial black
-
i placed the arialblack font that i found in my windows/font folder, into the working directory of mplayer, and i entered this code in cmd
mencoder -font font.ttf -sub newlogo.srt test.vob -o men.flv -af resample=22050:0:0 -sws 9 -vf scale=448:-3,expand=448:336 -of lavf -ovc lavc -lavcopts vcodec=flv:vbitrate=500:trell:v4mv:mv0:mbd=2:cbp:a ic:cmp=3ubcmp=3 -oac mp3lame -lameopts abr:br=48:mode=3
and the program crashed, , a error box comes says "Mplayer Has Stopped Working". I use Windows Vista. did i place the font code, in right place? -
so theres no way to fix this , so i can get the subtitles to show on video?
-
************ MIKE'S SUPER EASY HQ GUIDE ***************
Many thanks to 45tripp for the HQ guide. However, I still find it too complicated, and seems others do to. I have spent hours trying to just to install mencoder, etc. Finally I gave up with mencoder and just use easy gui programs. So, here is my guide for those that want the easiest way to upload HQ, still based on 45tripp's method.
My guide shows what I do to upload a 3 minute video with HQ video and stereo audio. You should be able to get a 4 minute video, with a lower bit rate, but I haven't done that yet. I start with a .avi video
MIKE'S EASY HQ GUIDE FOR A 3 MINUTE VIDEO (UP TO 3 MIN)
1. SOURCE VIDEO- My source is an uncompressed .avi video in 640x480, 30 frames/sec, 44100Hz/16bit stereo PCM.
2. EDIT/CLEAN THE AVI - next I clean up and edit (if needed) the .avi using VirtualDub. Basically make the video look good- apply deinterlace, adjust brightness, color, etc. Make it look as good as possible. You can also edit out parts. Save as new .avi
3. ENCODE A FLV- now it's time to create your .flv video from the source .avi. I use Riva FLV Encoder 2.0 with these settings:
VIDEO
Movie Size:448x336
Deinterlace: yes
Framerate:15
Bitrate:1000
AUDIO
Bitrate:128
Sampling Rate: 44100
Channels: Stereo
Important: your .flv file size must be under 27mb, if over, try lower bitrate
4. TEST THE FLV - play your .flv video to make sure it's ok- I use FLVPLAYER.EXE
5. EDIT THE HEADER- your .flv will be re-encoded by YT so to prevent that you must edit the header of the .flv using instructions in post #1. What I do is:
install and run HEXcellent
open your .flv
Look for "duration" on the right side, You're looking for the block of 16 numbers after '40'
change the block of 16 to indicate 10 minutes: 82C0 0000 0000 000
(you can also try 9 minutes, or up to 10:59 minutes)
save
6. EXAMINE FILE INFO - use MediaInfo to see that the PlayTime is under 10:59 and the Bit Rate is under 350. If not, redo step 5 with a higher time (up to 10:59), examine in MediaInfo again and check that Bit Rate is under 350.
Done!
Again, this works for me, and is my easy guide for making videos with 1000 bit rate and stereo audio up to 3 minutes, maybe 4 minutes. At 1000 bitrate, there is very little blocking effect.
How's this look to you 45tripp? -
but how bout for videos thats are 8 minute long, like your source video file is 8 minutes long
-
I've studied this entire thread for hours, and spent hours more trying out various encoding tests, but my results -- without Hex editing -- look only marginally better than a straight-from-Adobe Media Encoder FLV file (and that's due to Avanti I think). Just hoping someone (read: 45tripp!!) can let me know if the sample clips are as good as it gets. Because I've seen other YT videos that originate from DV, yet look much better than my encodes.
Details: I've got 16:9 HDV footage shot on Sony HVR Z1U 1080 60i camera, and edited in Adobe Premiere Pro 2.0 (PP). The final project will consist of clips between 3 and 5 minutes. I don't want to do any hex / time cheating. The test clip below uses some of the most anti-YT footage I've got, ie, jerky camera movements, pans, lots of action (to see the full extent of any differences.)
Using Adobe Media Encoder, within PP, I export a high bitrate FLV w/ these settings:On2vp6 codec, 1,000 kbps video, 29.97 framerate, mp3 audio codec, 48 kbps audio, mono, 320x240 framesize, 1.333 pixel aspect ratio.
Resulting in this: http://youtube.com/watch?v=PsXle_PGQoM
Using Avanti, for a high bitrate FLV, I first export an Uncompressed AVI from PP (detailed settings on video page description), then encode an FLV with these settings: Sorenson spark codec, 2800 kbps video, 29.97 framerate, 48 kbps audio, mono, 320x240 framesize, No to deinterlace.
Resulting in this: http://youtube.com/watch?v=wSFdH_QM0z4
Using Avanti, for a low bitrate FLV (ie, a la this guide) WITHOUT time cheating, I use the same uncompressed AVI from PP, and encode an FLV with these settings: Sorenson spark codec, 280 kbps video, 29.97 framerate, 48 kbps audio, mono, 320x240 framesize, No to deinterlace.
Resulting in this: http://youtube.com/watch?v=sYnGHPlZRvA
Results: The Avanti FLV encodes do look slightly better than Adobe Media Encoder FLVs -- the leaves in the background (at 0:30 and 0:41) don't seem to vibrate like they do in the Adobe Media Encoder video, and the title words at the end (0:52) look smoother. Blockiness on action and camera movement appears the same. But the Avanti hi and lo videos appear the same! (I checked w/ MediaInfo and the lo version maintains its 339kbps in YT).
Questions: Sorry for the drawn-out post, but I want my project to look as good as possible, and this forum appears to be the best and most responsive source i've found for youtube encoding. My questions are:
1. Is this the best quality I can get from my clips (given that it's HDV footage)?
2. Hey! How come my Avanti videos get re-encoded to full screen by YT, when clips I've encoded with other programs (that result in the same frame size and aspect ratio for the raw video) maintain a 16:9 once uploaded to YT? What can I change in Avanti?
I've spent so much time on this, without getting anywhere really, that I'm tapped out. Any help would be like manna from heaven!
thx,
Ram -
Ram, it appears to me that YT re-encoded all three of your video tests to around 350bitrate (guess). That's what we don't want. You will never get the HQ results when YT does the encoding.
I might be wrong, but there are only two ways to I know to bypass YT encoders, Method #1 and #2 described below. All other ways fail, no matter what software, camera, or technique you use. You must use one of these two:
Method #1 is in first post and discussed in the whole thread. My "MIKE'S SUPER EASY HQ GUIDE" two posts up details an easy way to do it.
Method #2 is known as goyomora method and uses no hacking, but I've been limited to only 2 minutes of HQ results. Learn about goyomora at his YT site:
http://www.youtube.com/user/goyomora
If you plan on using Method #2 you must use Total Video Converter ersion 3.10 (not ver 3.11)
It's good you used the same video to test your uploads, although that clip is only :54 seconds and dark. I recommend you try the same video (or a brighter one) with my easy method. You will should be able to get that clip to play back at even a higher bitrate than 1000 since it's only 0:54 sec.
Then you should start testing with 3 minute videos, which should also still work with my easy method. When satisfied, only then try longer videos, 4 and 5 minutes. I know my easy method works great for 3 minute videos and plays back at 1000 bitrate. (A 4 minute video would need a lower bitrate) -
Originally Posted by mikejf
a few comments though:
Originally Posted by mikejf
it's a matter of persistence.
I point to a gui already...
what's wrong with using Avanti?
doesn't get easier.
you can use any encoder your heart pleases....
i thought it clear...
maybe i'll edit the guide to say so in plain language.
I'm outlining my method
which i happen to think provides the best quality.
you can always encode with super or riva or whatever and skip to the cheat...
also i make it clear I don't recommend uploading 1000kbit/s files.
and I believe in hex editing just enough for the files to be eligible.
why make a 3 min file look like 11 mins when it can be presented as a 6 min file?
Originally Posted by beyondseries
a little cheating goes a long way...
dv is difficult footage.
at least push for every bit.
get to 349k/s
(i've not run into the problems bayme has)
sacrifice audio more... go down to 32k/s.
try some filtering on the video stream.
your hi quality attempt didn't pass.
try again.
your adobe vp6 method is good. one of the better ways
but...
bigger uploads, re-encoding, no control.
my way wysiwyg
smaller uploads, no re-encoding, no surprises.
gl -
Hi 45tripp, great tutorial. I was doing something similar last year by adding a still image for say like 7 mins to a 3 min video and running through mencoder and bypassing encoding resulting in a sharp video, but the hexing way is great.
How do you think this video has bypassed enconding?
http://www.youtube.com/watch?v=qhvGvGNXCOA&feature=dir
It looks pretty sharp and is only timed at 3 mins by youtube and for me it downloads faster but still retaining good quality and shows normal time so you don't constant comments from users. Try the re-size button and its 480x360 and gone through unencoded. Their older videos are typical encoded ones. Any ideas how, or are youtube helping them in some way.
Cheers -
Originally Posted by duro
Originally Posted by duro
it's typical youtube quality.
not much action in tennis -
Great stuff, I love this little hack. The specified bitrate went unnoticed as far as 349 kbps. What got me puzzling was celticdruid's ffmpeg build. The latest snapshot had problems muxing together more than two streams--whether input directly through AviSynth or separately with "ffmpeg -i video.flv -vcodec copy -i audio.mp3 -acodec copy output.flv"--so I had to use a different build to get that working. I now also prefer encoding video and audio separately (video with ffmpeg, audio with LAME.exe...). God, I've fallen in love with CLI now. xD
One of my results (@ 1200 kbps): http://www.youtube.com/watch?v=BG1IqRWu-MU -
Originally Posted by kodaismahhussy
Originally Posted by kodaismahhussy
no reason for it anyway
Originally Posted by kodaismahhussy
nice encode
tripp -
Someone tell me how the heck this person gets this awesome quality without hex editing the duration? Also, you can't seek ahead of the loaded part for some reason.
http://youtube.com/watch?v=35yH1e0YdEc
Similar Threads
-
Recommended upload video format for maximum sound quality on youtube
By waigy in forum Video Streaming DownloadingReplies: 25Last Post: 12th Sep 2010, 17:09 -
Youtube - bad upload quality
By therock003 in forum Newbie / General discussionsReplies: 5Last Post: 26th Jul 2010, 02:49 -
Poor quality following upload to YouTube-can anyone assist?
By acceleratorhams in forum Video Streaming DownloadingReplies: 1Last Post: 1st Jun 2009, 15:16 -
Poor Youtube Quality Upon Upload
By JohnSmith1981 in forum Video Streaming DownloadingReplies: 1Last Post: 20th Feb 2009, 12:54 -
Youtube HQ upload slow on normal quality
By seiun in forum Video Streaming DownloadingReplies: 2Last Post: 21st Sep 2008, 13:18