Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: FFmpeg script for DVD to mp4

  1. #1
    Join Date
    Aug 2010
    Location
    Cullinan , Gauteng
    Beans
    436
    Distro
    Ubuntu 12.04 Precise Pangolin

    FFmpeg script for DVD to mp4

    Morning all , I want to convert DVD movie to mp4 using x264 and aac. I'm having some issues with GUI apps.

    Does anybody have a ffmpeg terminal script to do this ?
    I use ffmpeg in terminal for all my single file converts and prefer to use it but don't know how to use it in terminal for a DVD movie to mp4.

    Thank you
    I5 3ghz , 16gig RAM, Nvidia Geforce GT610 1gig

  2. #2
    Join Date
    Sep 2006
    Beans
    3,484

    Re: FFmpeg script for DVD to mp4

    Handbrake might be the easiest tool to do this. It has a GUI.

    Or if you prefer FFmpeg. This example combines two vob files because the movie was split into several vobs.
    Code:
    ffmpeg -i concat:"/media/dvd/VIDEO_TS/VTS_01_1.VOB|/media/dvd/VIDEO_TS/VTS_01_2.VOB" \
    -acodec libfaac -aq 100 -ac 2 -vcodec libx264 -vpre slow -crf 24 -threads 0 output.mp4
    You'll probably need to compile FFmpeg to use that example:

    HOWTO: Install and use the latest FFmpeg and x264

    This example probably won't work on an encrypted DVD. See vobcopy (and possibly tccat or mplayer) for that additional step.

  3. #3
    Join Date
    Aug 2010
    Location
    Cullinan , Gauteng
    Beans
    436
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: FFmpeg script for DVD to mp4

    Quote Originally Posted by FakeOutdoorsman View Post
    Handbrake might be the easiest tool to do this. It has a GUI.

    Or if you prefer FFmpeg. This example combines two vob files because the movie was split into several vobs.
    Code:
    ffmpeg -i concat:"/media/dvd/VIDEO_TS/VTS_01_1.VOB|/media/dvd/VIDEO_TS/VTS_01_2.VOB" \
    -acodec libfaac -aq 100 -ac 2 -vcodec libx264 -vpre slow -crf 24 -threads 0 output.mp4
    You'll probably need to compile FFmpeg to use that example:

    HOWTO: Install and use the latest FFmpeg and x264

    This example probably won't work on an encrypted DVD. See vobcopy (and possibly tccat or mplayer) for that additional step.
    Thanx , that example is exactly what I need I knew how to do 1 vob file but didn't know how to combine vob files in ffmpeg.

    My ffmpeg is already compiled and working using your guide

    Will give that example a go thank you.
    I5 3ghz , 16gig RAM, Nvidia Geforce GT610 1gig

  4. #4
    Join Date
    Aug 2010
    Location
    Cullinan , Gauteng
    Beans
    436
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: FFmpeg script for DVD to mp4

    Will this work if I am standing in the folder where the .VOB's are ?

    Code:
     
    for f in *.VOB; do ffmpeg -i "$f" -acodec libfaac -ac 2 -ab 128k -vcodec libx264 -vpre fast 
    -crf 21 -threads 0 moviename.mp4; done
    Or will that just overwrite the output file with each VOB.

    Just trying to find a way to make the input a bit easier rather than to specify each input file.
    Last edited by Ghost_Mazal; August 31st, 2010 at 08:19 AM.
    I5 3ghz , 16gig RAM, Nvidia Geforce GT610 1gig

  5. #5
    Join Date
    Aug 2010
    Location
    Cullinan , Gauteng
    Beans
    436
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: FFmpeg script for DVD to mp4

    Or this maybe :

    Code:
     
    for f in *.VOB; do ffmpeg -i concat:"$f" -acodec libfaac -ac 2 -ab 128k -vcodec libx264 
    -vpre fast -crf 21 -threads 0 moviename.mp4; done
    I5 3ghz , 16gig RAM, Nvidia Geforce GT610 1gig

  6. #6
    Join Date
    Aug 2010
    Location
    Cullinan , Gauteng
    Beans
    436
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: FFmpeg script for DVD to mp4

    Ok all 3 those scripts of mine was flawed. But with some fiddling this straight forward one works perfect for someone like me who always copies the files to a hdd folder first:

    Code:
    cat *.VOB > moviename.vob; ffmpeg -i moviename.vob -acodec libfaac -ac 2 -ab 128k -vcodec libx264 -vpre fast -crf 20 -threads 0 moviename.mp4
    Standing in the folder where the vob files is.
    I5 3ghz , 16gig RAM, Nvidia Geforce GT610 1gig

  7. #7
    Join Date
    Sep 2006
    Beans
    3,484

    Re: FFmpeg script for DVD to mp4

    I didn't know you already had the vobs on hard drive. To avoid a large intermediate file you could also try:
    Code:
    cat *.vob | ffmpeg -i - -acodec ...
    I believe this is similar to the FFmpeg concat protocol as shown in my earlier example.

  8. #8
    Join Date
    Aug 2010
    Location
    Cullinan , Gauteng
    Beans
    436
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: FFmpeg script for DVD to mp4

    Will try that also thanx... (what's the difference between the | and ; ) I'm still very new to the scripting thing.
    I5 3ghz , 16gig RAM, Nvidia Geforce GT610 1gig

  9. #9
    Join Date
    Sep 2006
    Beans
    3,484

    Re: FFmpeg script for DVD to mp4

    The | is a pipe, meaning that cat is giving it's output to FFmpeg instead of outputting to a file. The ; means "do the first command and then do this next command".

  10. #10
    Join Date
    Aug 2010
    Location
    Cullinan , Gauteng
    Beans
    436
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: FFmpeg script for DVD to mp4

    And all of a sudden ffmpeg doesn't work anymore After doing a lot of converts with no problems , now suddenly the output file's audio and video is out of sync. Still using the same commands. Now what ??????
    I5 3ghz , 16gig RAM, Nvidia Geforce GT610 1gig

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •