-
new mencoder command
Well after lots of reading and trial and lots of error I came up with this for my mencoder it resamples to 44100 and gives a clean HQ audio out and resizes the video for widescreen videos to fit in vshare player I have only tried it with avi files but big difference in quality make sure you are using the latest mplayer download
just comment out the original with a #
and add this below in the video_conversion.php
this is locates in includes/settings folder
Code:
$cmd_mencoder = "$config[mencoder] '$video_src' -o $video_flv -af resample=44100:0:0 -sws 9 -vf scale=448:-3,expand=448:336 -of lavf -ovc lavc -lavcopts vcodec=flv:vbitrate=800:vhq:trell:v4mv:mv0:mbd=2:cbp:aic:cmp=3:subcmp=3 -oac mp3lame -lameopts abr:br=56:mode=3 harddup ";
-
Uh... thanks... but:
The resample command that you are using has nothing to do with video. The "-af resample=22050:0:0" is an audio command. This tells mencoder to resample the audio frequency (which is what the af stands for) to 22.050 Khz. This is pretty much half of the audio frequency that a standard MP3 track has, which is actually a poorer sound. In other words, all this command did was replace the srate (which is the sample rate command) with a resample command, forcing mencoder to resample the audio versus adjusting it as is.
The "real" reason why your command generates improved video is because of the following:
Code:
-sws 9 -vf scale=448:-3,expand=448:336
and
Code:
vcodec=flv:vbitrate=500:trell:v4mv:mv0:mbd=2:cbp:aic:cmp=3:subcmp=3
The first code tells mencoder to scale the video (using the software scaler) and forces it to a certain size (448x336). Because you are scaling the video, processing that would otherwise be wasted on keeping the video's resolution is redirected to other portions of the conversion process. Also, since you are scaling the video to a certain size (versus resizing the video, which is what vShare does natively), you get a cleaner video after conversion.
The second code ups the conversions a bit by using some of mencoder's newer ffmpeg processing commands, which aid in better processing of the video signal.
Where your code breaks down, however, is in two places. One, the resample rate is terrible. You should resample your audio to a standard 44100. The second is in the vbitrate. At only 500Kbps, higher quality videos are going to be choked off tremendously. You will want to increase that based upon the types of videos that you are expecting to upload. For the average user, I would make it 800. This is high enough such that your videos are not choked off, but is low enough so that if you are getting low quality uploads that it doesn't waste disk space by creating overly large files.
Finally, as a side note, in order to use this, you will need later versions of both mencoder and ffmpeg (if an older version of ffmpeg, you will need it to be compiled with the swscale command).
-
I see thank you my original problem was if I had widescreen videos they would get cut off and I could not see the whole thing so I wanted to scale them down I also found that the resample gave me a better sound quality than just the sample command in vshare I made the changes you suggested and going to try them out right now I corrected the code
Thanx again bplex