Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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
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.
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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.