LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 04-21-2008, 11:48 AM   #1
SentralOrigin
Member
 
Registered: Jul 2005
Distribution: Gentoo, Ubuntu
Posts: 318

Rep: Reputation: 30
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.
 
Old 04-21-2008, 06:46 PM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
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.
 
Old 04-21-2008, 09:30 PM   #3
jroyce
Member
 
Registered: Nov 2007
Posts: 34

Rep: Reputation: 15
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.
 
Old 04-21-2008, 11:40 PM   #4
SentralOrigin
Member
 
Registered: Jul 2005
Distribution: Gentoo, Ubuntu
Posts: 318

Original Poster
Rep: Reputation: 30
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
 
Old 04-22-2008, 01:50 AM   #5
almatic
Member
 
Registered: Mar 2007
Distribution: Debian
Posts: 547

Rep: Reputation: 67
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.

Last edited by almatic; 04-22-2008 at 01:56 AM.
 
Old 04-23-2008, 10:35 AM   #6
SentralOrigin
Member
 
Registered: Jul 2005
Distribution: Gentoo, Ubuntu
Posts: 318

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by almatic View Post
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?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] ffmpeg psp encoding woes (with a solution!) allstarzero Linux - Software 6 08-10-2013 03:09 PM
Ffmpeg fedoraman Linux - Software 2 01-21-2008 02:01 AM
ffmpeg Polanski Linux - Software 4 07-14-2007 09:58 AM
ffmpeg - psp [] Need help encoding to mp4 nomb Linux - Software 7 01-08-2007 07:42 PM
ffmpeg Polanski Linux - Laptop and Netbook 5 01-11-2006 07:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration