splitting dvd into chapters automatically

Support for HandBrake on Linux, Solaris, and other Unix-like platforms
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
Posts: 12
Joined: Mon Oct 17, 2016 4:31 pm

splitting dvd into chapters automatically

Post by jdanield » Thu Nov 17, 2016 1:52 pm

Hello :-)

This is an often asked question, but for what I see answers are more for windows than unix and the preference menu are not the same

at least in my openSUSE Leap 42.1 version: 0.10.5 (x86_64)

I can use gui or cli (prefered), but the various scripts I found on mac forums don't works well (in the same time, I don't have a mac).

I have lot of personal dvd (home made) from the last decade, when I had a SD DV camcorder, and I want to load them on my piwigo galelry as mp4 (much better than my usual flv format). online, 2 hours file is nor handy, so I need to split them in chapters

handbrake sees perfectly the chapters, but adding every chapter to the queue manually is pretty boring.

I tried to change the {source} valu in the preference, but this seems to be read only at the start - {chapter} is always 1. A name like {source}-{chapter}-{title} would be perfect (but any other kind also)


I get some script that seems to work (derived from my usual script):

Code: Select all


for i in {1..70} ; do

    for j in {1..70} ; do

	echo $a

#	HandBrakeCLI  -i "VIDEO_TS" -t $i --angle 1 -c $j  -o "$a"

HandBrakeCLI  -i "VIDEO_TS" -t "$i" --angle 1 -c "$j"  -o "$a"  -f mp4  -O  -w 960 --crop 0:0:0:0 --loose-anamorphic  --modulus 2 -e x264 -q 22 -r 30 --pfr -a 1 -E av_aac -6 dpl2 -R Auto -B 160 -D 0 --gain 0 --audio-fallback ac3 --encoder-level="3.1"  --encoder-profile=high  --verbose=1

chmod a+r "$a" 


it's brute and I don't know yet is it wont let some extra files, but for the beginning it works. I have no idea of what are exactly chapters and title, so the double loop, nor how to extract the info with handbrake. If you can, let me know, thanks

*addition, 2*

Works for a home made 33 tracks dvd. The second loop increments, The first loop is usefull if the dvd is also split in parts (for example two swhows, when the first loop is the parts of the show). No extra file. Should work better if I could know how to get each number from the dvd.

makes the work for me


Post Reply