in

andy vt's tools & blog

Automating lazy

Handbrake version 0.9.3

Last post 05-10-2010 12:01 PM by congenic. 28 replies.
Page 1 of 2 (29 items) 1 2 Next >
Sort Posts: Previous Next
  • 11-29-2008 7:30 AM

    Handbrake version 0.9.3

    For those using a HD-PVR with SageTV that want to re-encode to the Ipod, or other format, check out the latest version of Handbrake.  They added all the ffmpeg libraries to Handbrake and this means that is can read virtually any file type now.  I've been using Handbrake over the last few days to convert the HD-PVR files into the IPod format and it's working really well.

    For those interested you can use the GUI.  Or, if you want to integrate it into an applicaiton like Dtb you can use the command line version.  Below is the command line I'm using.

    "C:\Program Files\Handbrake\HandBrakeCLI.exe" -i {inputfilename} -t 1 -c 1 -o {outputfilename} -f m4v -X 720 --crop 0:0:0:0 --decomb  -P  -e x264 -q 0.39 -a 1 -E faac,ac3 -B 128 -R 48,0 -6 stereo -D 2 -x level=30:cabac=0:ref=3:mixed-refs=1:analyse=all:me=umh:no-fast-pskip=1 -v  

    A really easy way to comeup with your command line is to enter the Handbrake GUI and use it to configure all your settings.  Then tell Handbrake that you want to add your show to the Queue.  Then from the queue manager you can select an option to export the queue to a batch file.  Inside the batch file you will see the command line option for your show.

    This is an interesting open source alternative to DirectShow for those that have issues getting Directshow working.

  • 12-03-2008 10:43 AM In reply to

    • babgvant
    • Top 10 Contributor
    • Joined on 10-02-2006
    • Chicago, IL

    Re: Handbrake version 0.9.3

    does it work with edl files?

  • 12-04-2008 11:50 AM In reply to

    Re: Handbrake version 0.9.3

    It won't re-encode without the commercial segments.  However, it does have a feature to mark chapters.  I just haven't spent any time to see how this works.  I'm sure this is a feature that must be supported in your playback device for it to be useful and I haven't investigated what playback devices support chapters and what containers support chapters (I'm assuming MKV and MP4).  This is something on my "todo" list because it would be ok with me if I could press a button on the IPhone and have it skip to the next chapter (basically a manual commercial skip).  However, Handbrake won't leave the commercial segments out of the recording.
  • 12-07-2008 12:26 PM In reply to

    • babgvant
    • Top 10 Contributor
    • Joined on 10-02-2006
    • Chicago, IL

    Re: Handbrake version 0.9.3

    that would be slick!  i wonder how hard it would be to write a player that did that.

  • 12-07-2008 2:50 PM In reply to

    Re: Handbrake version 0.9.3

     From everything I've read, I think we have everything we would need.  Both Quicktime and the IPod/IPhone support chapters in the MP4, M4V, MOV containers.  Also, it appears VLC supports chapters.  I haven't tried this yet so I don't actually know how well it works.  However, over Christmas break I'm going to try it and I'll let you know how well it works.

  • 12-07-2008 4:06 PM In reply to

    • babgvant
    • Top 10 Contributor
    • Joined on 10-02-2006
    • Chicago, IL

    Re: Handbrake version 0.9.3

    I don't have an IPhone; might be the only person in the states w/o any Apple kit :)
  • 12-08-2008 11:00 AM In reply to

    • babgvant
    • Top 10 Contributor
    • Joined on 10-02-2006
    • Chicago, IL

    Re: Handbrake version 0.9.3

    looks like TCMP supports chapters in mkv, now to figure out how to generate them...

    thanks for pointing this out btw, this is very cool.

  • 12-08-2008 12:45 PM In reply to

    Re: Handbrake version 0.9.3

     That's great that the Windows smart phone will support them.  As a quick little test you could just use the Handbrake GUI to manually set the chapters.  That will at least tell you if it works.

     I've read posts from people that have used Handbrake to set chapters in MP4 files, but I can't find a lot of information on people doing this with MKV.

  • 12-09-2008 7:51 AM In reply to

    • babgvant
    • Top 10 Contributor
    • Joined on 10-02-2006
    • Chicago, IL

    Re: Handbrake version 0.9.3

    Did some playing last night, but couldn't figure out how to create chapters in the GUI.  Once I select a ts file, the GUI won't let me mess with chapters...
  • 12-10-2008 4:47 PM In reply to

    Re: Handbrake version 0.9.3

    It reads them from the files - specifically, from the chapters in a DVD source.  It would be nice if you could supply an EDL/XML (or other format) file and have it insert chapter marks, but that's not the way it appears to work.  I've been using 0.9.2 (and now 0.9.3) for the past 5 months, and it's worked great.

    However, I can't get it to run via DTb.  It just hangs, and then eventually times out (I have a 240 minute limit on the Profile).  Have you been able to run Handbrake successfully from a Profile?

  • 12-10-2008 6:04 PM In reply to

    • babgvant
    • Top 10 Contributor
    • Joined on 10-02-2006
    • Chicago, IL

    Re: Handbrake version 0.9.3

    you need to use the version of runexternal that doesn't hook the output stream (RunExternalNostatus). 
  • 12-11-2008 4:11 AM In reply to

    Re: Handbrake version 0.9.3

    I just looked and you are right.  It looks like Handbrake can only read chapters from a DVD.  This is too bad.  However, there are other options that I'm giong to try.  MP4Box will set chapters into a MP4 files, and MKVMerge will set chapters in MKV files.  I haven't played around with either program, but my theory is I could use Handbrake to perform the encoding, and then use either MP4Box or MKVMerge to set the chapter markers.

     

    Here are the instructions from the MP4Box documentation.

    -chap chap_file : adds chapter information located in chap_file to the destination file. Chapter extensions have been introduced by Nero and are NOT standard extensions of IsoMedia file format, don't be surprised if some players don't understand them.

    The following syntaxes are supported in the chapter text file, with one chapter entry per line:
    • ZoomPlayer chapter files : AddChapter(nb_frames,chapter name), AddChapterBySeconds(nb_sec,chapter name) and AddChapterByTime(h,m,s,chapter name). One chapter entry per line.
    • Time codes : h:m:s name, h:m:s:ms name and h:m:s.ms name. One chapter entry per line.
    • SMPTE codes : h:m:s;nb_f/fps name and h:m:s;nb_f name with nb_f the number of frames and fps the framerate. One chapter entry per line.
    • Common syntax : CHAPTERX=h:m:s[:ms or .ms] on one line and CHAPTERXNAME=name on the other - the order is not important but chapter lines MUST be declared sequencially (same X value expected for 2 consecutive lines).

     

     

    Below is some information on chapters using MKVMerge

    http://www.bunkus.org/videotools/mkvtoolnix/doc/mkvmerge-gui.html#chaptereditor

     

  • 12-11-2008 5:16 AM In reply to

    Re: Handbrake version 0.9.3

    As a follow up to this it looks like creating chapters for the IPod won't be too bad.  It seems that we can just encode them to MP4 using Handbrake and then use Mp4Creator to insert the chapters.

     

    Here is the command line (you have to have the MP4 file encoded with video and audio first.

     mp4creator chapterfile.chap inputfile.mp4

     

    Now the chapterfile.chap just has to be in a specific format.  Below is the format (the first chapter must always be the begining of the file).

    CHAPTER01=00:00:00.000
    CHAPTER01NAME=1
    CHAPTER02=00:53:00.000
    CHAPTER02NAME=2
    CHAPTER03=01:05:00.000
    CHAPTER03NAME=3

     

    It only takes a second for mp4creator to insert the chapters.  I don't have my IPhone on me to check this, but it worked perfectly playing back the file in VLC. If this works on teh IPod/IPhone then we just need a little application to read the .edl files and create the .chap files.

  • 12-11-2008 6:05 AM In reply to

    • babgvant
    • Top 10 Contributor
    • Joined on 10-02-2006
    • Chicago, IL

    Re: Handbrake version 0.9.3

    I was thinking that each segment (defined by the edl) should be a chapter; does that align with how you think it should work?

    |------------------------------------|_______________|----------------|__________|----------------------|___________|----------------|

       chapter 1                               chapter 2                    chapter 3     chapter 4       chapter 5             chapter 6          chapter 7

    ---- = show
    __ = commercial

    | = chapter marker

  • 12-11-2008 6:25 AM In reply to

    Re: Handbrake version 0.9.3

    I was thinking the chapter marker would denote the beginning of each non-commercial segment (see attached). I see the benefit of doing it your way (since it works more like the Commercial Skip add-ins for VMC and SageTV), but for some reason the DVD-style chapters make more sense to me.
Page 1 of 2 (29 items) 1 2 Next >
@2008 andy vt
Powered by Community Server (Non-Commercial Edition), by Telligent Systems