Last active
November 27, 2024 13:37
-
-
Save ZiTAL/12078f0cb404c0113984b6a3b60fe1ad to your computer and use it in GitHub Desktop.
gnu/linux: dvd to mp4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # apt-get install libdvdcss2 dvdbackup ffmpeg | |
| dvdbackup -i /dev/sr0 -o /tmp/example -M |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # VOB to MP4 | |
| # example: 02.sh example | |
| DIR=$1 | |
| LS=$(ls -1 ${DIR} | grep -E "\.VOB$") | |
| for video in ${LS}; do | |
| echo "Processing file: ${DIR}/${video}" | |
| ffmpeg -i ${DIR}/${video} -vcodec h264_nvenc -b:v 4000k -r 30 -acodec aac -b:a 192k -ar 48000 -ac 2 ${DIR}/${video}.mp4 | |
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| file 'example/VTS_01_1.VOB.mp4' | |
| file 'example/VTS_02_1.VOB.mp4' | |
| file 'example/VTS_03_1.VOB.mp4' | |
| file 'example/VTS_04_1.VOB.mp4' | |
| file 'example/VTS_05_1.VOB.mp4' | |
| file 'example/VTS_06_1.VOB.mp4' | |
| file 'example/VTS_07_1.VOB.mp4' | |
| file 'example/VTS_08_1.VOB.mp4' | |
| file 'example/VTS_09_1.VOB.mp4' | |
| file 'example/VTS_09_2.VOB.mp4' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ffmpeg -f concat -safe 0 -i 03.txt -c:v h264_nvenc -b:v 4000k -crf 0 -c:a aac -b:a 192k -ar 48000 -ac 2 example/output.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment