Results 1 to 3 of 3

Thread: HandBrakeCLI Script

  1. #1
    Join Date
    Jul 2007
    Beans
    127
    Distro
    Ubuntu 10.04 Lucid Lynx

    HandBrakeCLI Script

    My Dad's got an iPod Touch and I'd like to rip some DVDs to it. I know you can use Windows by using DVD Decrypter, Handbrake, Videora, and the whole shebang. That's what he has installed on his computer, and the process is slow and cumbersome. I discovered that HandBrake for Linux and Mac has many more features than the Windows port; Linux and Mac versions can handle encryption, whereas the windows version can't. I have the GUI, but I'd like to make a nice script that does two things in the CLI.
    First, it should open up a terminal and display something like "Enter Output File Name: ". Then, the user would type in something like "Movie.mp4."

    HandBrakeCLI would then execute the command "HandBrakeCLI -i /media/cdrom -o Movie.mp4 --preset="iPhone / iPod Touch" --longest -b 256" and display the output with progress settings.

    If this isn't possible the GUI is also very easy to use; I'd just like a script that runs quickly and does it all in one quick step.

    The movie.mp4 would be the only variable that would change, as the DVD would always be in the cdrom slot.

    How would i go about doing this? I know C++, but can I use that to make a program like this?
    Pay it Forward. Every time someone helps you with an Ubuntu problem, try to help three others with theirs.

  2. #2
    Join Date
    Jan 2008
    Location
    /us/al/home/mb_webguy
    Beans
    2,339
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HandBrakeCLI Script

    It would be easier to use a shell script. I haven't tested it, but I think something like this would work.

    Here's a start...
    Code:
    #! /bin/sh
    
    HandBrakeCLI -i /media/cdrom/VIDEO_TS -o "$@" --preset="iPhone / iPod Touch" --longest -b 256
    If you save this as something like "~/bin/dvd2ipod" and make it executable, you can use it by typing "dvd2ipod filename.mp4".
    Last edited by mb_webguy; February 16th, 2009 at 11:56 PM.

  3. #3
    Join Date
    Jul 2007
    Beans
    127
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HandBrakeCLI Script

    Thanks. That seems logical. I know how to make a shell script and such, but I'm not familiar with anything aside from running a simple command.

    Looks like this is just what I needed.

    Thanks.
    Pay it Forward. Every time someone helps you with an Ubuntu problem, try to help three others with theirs.

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
  •