Xyberviri

Handbrake

Jun 23rd, 2017
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.47 KB | None | 0 0
  1. https://www.google.com/search?q=handbrake+cli+video+per+chapter&ie=utf-8&oe=utf-8
  2. https://www.google.com/search?q=iso+to+mkv&ie=utf-8&oe=utf-8#q=iso+to+mkv+ubuntu
  3. https://superuser.com/questions/394516/how-to-convert-50-episodes-from-dvd-into-50-mp4-with-handbrake-easily
  4.  
  5.  
  6.  
  7. sudo add-apt-repository ppa:stebbins/handbrake-releases
  8. sudo apt-get update
  9.  
  10. HandBrake gtk gui with the command:
  11. apt-get install handbrake-gtk
  12.  
  13. HandBrake CLI with the command:
  14. apt-get install handbrake-cli
  15.  
  16. HandBrakeCLI -Z "High Profile" -i a_movie.iso -o a_movie.mp4
  17.  
  18.  
  19.  
  20.  
  21. https://handbrake.fr
  22.  
  23.  
  24. $ for i in `seq 4`; do HandBrakeCLI --input /dev/dvd --title $i --preset Normal --output NameOfDisc_Title$i.mp4; done
  25.  
  26. patty@patty:~$ for i in `seq 4`; do HandBrakeCLI -i /media/patty/DVDTITLE -t $i -o DVDTITLE_Title$i.mp4 -e x264 -q 18; done
  27.  
  28.  
  29.  
  30.  
  31. #!/bin/bash
  32. rawout=$(HandBrakeCLI -i /dev/dvd -t 0 2>&1 >/dev/null)
  33. #read handbrake's stderr into variable
  34.  
  35. count=$(echo $rawout | grep -Eao "\\+ title [0-9]+:" | wc -l)
  36. #parse the variable using grep to get the count
  37.  
  38. for i in $(seq $count)
  39. do
  40.     HandBrakeCLI --input /dev/dvd --title $i --preset Normal --output $i.mp4
  41. done
  42.  
  43.  
  44. It's worth noting that if you want that count value to be right you'll need to pass --min-duration 0 to HandBrakeCLI, otherwise you'll come up short on some DVDs. For example, my test DVD has a 10 second track 1 that will be ignored in the final output
  45. https://handbrake.fr/docs/en/1.0.0/cli/cli-guide.html
Add Comment
Please, Sign In to add comment