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. |
4th August 2008, 12:13 | #1 | Link |
mx rider
Join Date: Jul 2008
Posts: 11
|
convert any video format to flv successfully
I'm pretty novice when it comes to mencoder and ffmpeg command lines, so I need some help or suggestions. At the moment my video sharing site is using the command line below to convert many video formats (3gp, 3gpp, mpg, mpeg, mpeg4, mp4, avi, wmv, flv, mov, asf, qt, dat) to flv files. So far I noticed it converts to flv file successfully when the input video is flv, 3pg, mov or mp4. Other formats are not tested yet. What I do know for certain is that wmv files are never successfully converted. The audio is converted propperly, but the video frames aren't. It's like there are 20 frames in total and you see them one after the other in a timespan of 20 seconds.
The bottom line is the code below isn't good enough to convert any video format to an flv successfully. What command line you think would? I'm also open to use ffmpeg instead of mencoder. I just don't know what command line would be the optimal one to use. All help and suggestions are greatly appreciated. Code:
/usr/local/bin/mencoder video.wmv -o video.flv -of lavf -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts vcodec=flv:vbitrate=800:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -vf scale=320:240 -srate 22050
__________________
Upload your mororized sports video to www.carbtube.com and earn a little money on the side from them. |
5th August 2008, 09:55 | #4 | Link | ||
mx rider
Join Date: Jul 2008
Posts: 11
|
Quote:
Quote:
You see I'm a bit novice to it all. But I'm surely prepared to read up where I have to to get it done.
__________________
Upload your mororized sports video to www.carbtube.com and earn a little money on the side from them. |
||
5th August 2008, 10:21 | #5 | Link |
Registered User
Join Date: Jan 2008
Posts: 870
|
As far as i can see there is no Adobe Flash Encoder available for linux, i would stick with mencoder and tweak what you have.
Try adding harddup in the filters section.... -vf harddup,scale=320:240 Sometimes wmv files have strange framerate's, i have seen wmv's with 100fps rates, that could explain why mencoder is having a spat! Last edited by dat720; 5th August 2008 at 10:25. |
5th August 2008, 10:59 | #6 | Link |
mx rider
Join Date: Jul 2008
Posts: 11
|
I remember trying -vf scale=320:240,harddup but that didn't do it. You suggestions -vf harddup,scale=320:240 did. Great! You recon all video formats will now convert successfully because of the hardup parameter?
Also, I am intriged by what Dark Shikari said. "You'd probably be better off using H.264, given how much better quality you'll get." How can I take advantage of that? EDIT: It didn't do it perfectly. It seems the audio is faster or the video is slower (too many frames). Either one of these.
__________________
Upload your mororized sports video to www.carbtube.com and earn a little money on the side from them. Last edited by CTYves; 5th August 2008 at 11:02. |
5th August 2008, 21:42 | #7 | Link |
Registered User
Join Date: Jan 2008
Posts: 870
|
About the only other thing you could do is force a frame rate.
-ofps 23.976 Look at your failed videos and see what frame rate they are, this should give some idea as to what is going on.... PS mencoder did it's job perfectly, but the results are not what you want! |
5th August 2008, 21:51 | #8 | Link |
x264 developer
Join Date: Sep 2005
Posts: 8,666
|
H.264-in-flash example (280kbps video, 32kbps audio). Another one (1.5 megabit video, 128kbps audio)
For help encoding with x264 through ffmpeg, check out this page and this page. |
6th August 2008, 00:24 | #9 | Link |
Derek Prestegard IRL
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,989
|
.......................................
Dude. That game makes my brain short-circuit. I've seen your Touhou samples before, but that's seriously, seriously impressive. 60p, and at 1.5mbps the only problem is a slight blurring / noise in the background. The massive numbers of bullets are perfectly preserved with no blocking anywhere. ~MiSfit
__________________
These are all my personal statements, not those of my employer :) |
7th August 2008, 14:22 | #10 | Link |
mx rider
Join Date: Jul 2008
Posts: 11
|
As much as I would like to use H.264, I don't know how. The pages you showed are a bit complicated to me. And the videos you showed are, well..., impressive!
Can you help me get a command line that would be perfect in your eyes? I can uses mencoder or ffmpeg. Both are installed. Or can you setup a commandline that uses H.264 for me?
__________________
Upload your mororized sports video to www.carbtube.com and earn a little money on the side from them. |
7th August 2008, 14:53 | #11 | Link | |
x264 developer
Join Date: Sep 2005
Posts: 8,666
|
Quote:
|
|
7th August 2008, 16:26 | #12 | Link |
mx rider
Join Date: Jul 2008
Posts: 11
|
Again, that's really chinese to me. I appreciate you helping me though.
What I would like if for someone to fill in parameters at the end of this commandline... Code:
/usr/local/bin/mencoder video.wmv -o video.flv Some parameters in the commandline in post 1 must be cuasing some issues with some video formats (like wmv) and I don't know which.
__________________
Upload your mororized sports video to www.carbtube.com and earn a little money on the side from them. |
9th August 2008, 11:43 | #13 | Link |
mx rider
Join Date: Jul 2008
Posts: 11
|
anybody?
__________________
Upload your mororized sports video to www.carbtube.com and earn a little money on the side from them. |
9th August 2008, 12:18 | #14 | Link |
Registered User
Join Date: Jan 2008
Posts: 870
|
Have Patience fella!!!
Not everyone sits here watching the forums 24/7..... Here is the contents of my youtube.bat: Code:
@echo off "D:\VidTools\AutoMen\mencoder.exe" %1 -o "%~dpn1.youtube.flv" -of lavf -ovc lavc -oac lavc -lavcopts vcodec=flv:vbitrate=448:autoaspect:mbd=2:mv0:trell:v4mv:cbp:last_pred=3:predia=2:dia=2:precmp=2:cmp=2:subcmp=2:preme=2:turbo:acodec=libmp3lame:abitrate=56 -vf scale=320:240 -srate 22050 -af lavcresample=22050 -sws 9 Here is the Transformers trailer i did but it seems youtube totally raped the video, it looks much better from the original flv.... Last edited by dat720; 9th August 2008 at 12:30. |
9th August 2008, 12:34 | #15 | Link |
mx rider
Join Date: Jul 2008
Posts: 11
|
The same thing happens when trying to convert a wmv file. I'm testing to convert a 2 minute wmv file. When converted to flv and I play it, the video flashes by rapidly and ends after 5 seconds. The audio plays propperly for 2 minutes, but on a black background.
__________________
Upload your mororized sports video to www.carbtube.com and earn a little money on the side from them. |
9th August 2008, 13:24 | #17 | Link |
mx rider
Join Date: Jul 2008
Posts: 11
|
__________________
Upload your mororized sports video to www.carbtube.com and earn a little money on the side from them. |
9th August 2008, 13:59 | #19 | Link |
mx rider
Join Date: Jul 2008
Posts: 11
|
Ok. That worked. This is the results here... The sound is a bit stuttery though. But it is better then before. Defenatly. I guess it will do. What do you think?
__________________
Upload your mororized sports video to www.carbtube.com and earn a little money on the side from them. |
9th August 2008, 14:03 | #20 | Link |
Registered User
Join Date: Jan 2008
Posts: 870
|
that could be because 30fps is not the actual frame rate of the video, media info told me 30fps so i just ran with that, and to be honest when i tested it i didn't have the volume loud enough to notice that, it's 11pm here and everyone else is in bed.
Hmm nope i was wrong, the problem is with libmp3lame, it seems to be killing the audio. Wrong again.... i have absolutely no idea why the audio is doing that.... Last edited by dat720; 9th August 2008 at 14:15. |
Tags |
conversion, convert, flv, mencoder |
|
|