LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   ffmpeg encoding help (https://www.linuxquestions.org/questions/linux-software-2/ffmpeg-encoding-help-636816/)

SentralOrigin 04-21-2008 11:48 AM

ffmpeg encoding help
 
I have a VIDEO_TS directory with a bunch of .VOB files (that are parts of the main movie). I'd like to encode these to ONE .avi or .ogm file with a file size limit of 2 GB at the BEST quality I can get for that size. I'm reading the man page but the -fs (file size limit) option doesn't say to put the numbers in bytes, kilobytes, megabytes, or gigabytes so I'm not sure which number to put in. Also, I don't know which is the best quality video and audio codec. Can anyone help me out here? Thanks in advance.

David the H. 04-21-2008 06:46 PM

Doncha just hate it when man pages skip over important little syntax details like that?

I've never used the file size option myself, but I'd assume it uses the same syntax as the other options, so something like 2097152k would probably work. I suggest doing a smaller sized test or two to see what options work. Be sure to tell us what you get.

As for the codec, from reading around, it looks like the x264 codec will probably give you the best bang for the buck, but I don't believe the avi container supports such mp4 codecs very well. The native mp4 container is probably your best bet there.

jroyce 04-21-2008 09:30 PM

I have found the libx264 codec option to be very tempermental--many of my non-Linux video players have not recognized it as being x264. In fact, I've found that many of the MPEG-4 codecs in ffmpeg do not produce an output that I can use with Media Player or other common Win applications. (mencoder seems to produce reliable AVI files)

If you do want to use ffmpeg, I would recommend specifying the -vcodec msmpeg4v2 option and if you plan to limit file size, use the -pass 1/2 option to do two-pass encoding.

Don't forget that you will need to specify a bitrate for the file. I'm not 100% sure, but I don't think that the -fs option will override the default bitrate of 200 kbps.

SentralOrigin 04-21-2008 11:40 PM

I don't have to use ffmpeg, but I don't know what else is good. I don't even know what birate is or anything about this codec stuff. I usually don't do this kind of thing and I didn't really want to bother to learn because I probably won't be doing this much, but it's very confusing nonetheless

almatic 04-22-2008 01:50 AM

this is easily doable with avidemux. Open the first .vob with avidemux, it will probably find the others automatically and ask you to concatenate them. Then choose 'avi' or 'ogm' as container and your desired codec (xvid or h264) and click on 'configure'. There you choose '2-pass video size' and enter 2000mb. As audio codec choose mp3 or whatever you like. Then 'save as' and off you go.

If you wanted to use ffmpeg you'd first have to calculate the bitrate yourself and for that you'd first need to know the size of the output audio stream. Since you didn't want to learn that, I'd suggest using avidemux.

edit: afaik the -fs option does not care about bitrates, it will just stop encoding when the specified filesize is reached.

SentralOrigin 04-23-2008 10:35 AM

Quote:

Originally Posted by almatic (Post 3128759)
this is easily doable with avidemux. Open the first .vob with avidemux, it will probably find the others automatically and ask you to concatenate them. Then choose 'avi' or 'ogm' as container and your desired codec (xvid or h264) and click on 'configure'. There you choose '2-pass video size' and enter 2000mb. As audio codec choose mp3 or whatever you like. Then 'save as' and off you go.

If you wanted to use ffmpeg you'd first have to calculate the bitrate yourself and for that you'd first need to know the size of the output audio stream. Since you didn't want to learn that, I'd suggest using avidemux.

edit: afaik the -fs option does not care about bitrates, it will just stop encoding when the specified filesize is reached.

Why does avidemux squish the DVD picture instead of leaving it in widescreen?


All times are GMT -5. The time now is 11:45 PM.