Linux Delete / Remove MBR
Bash script for converting multiple DVD folders in avi/DiVX/XVID
c=$PWD
n=0
shopt -s dotglob
while IFS= read -r d ; do
CurrD[$n]=”$d”
echo ${CurrD[$n]}
n=$(($n+1))
done < <(find “$c” -name VIDEO_TS)
X=0;
while [ $X -lt $n ]; do
cd “${CurrD[$X]}”
echo $PWD
for f in *.VOB ; do ffmpeg -i “$f” -b:v 3000k -b:a 128k -tag:v DIVX “${f%.VOB}.avi”; done
X=$(($X + 1))
done
Variable incremented in bash while loop resets to 0 when loop finishes
while read -r f
do
count=$(($count+1))
echo "Count is at ${count}"
done < <(ls)
Source: Variable incremented in bash while loop resets to 0 when loop finishes – Stack Overflow
files – How do I loop through only directories in bash? – Unix & Linux
How do I loop through only directories in bash? – Unix & Linux Stack Exchange
How do I execute a file from a FAT USB drive? – Ask Ubuntu
bash yourscript
Source: How do I execute a file from a FAT USB drive? – Ask Ubuntu
escaping – Bash script to cd to directory with spaces in pathname – Stack Overflow
BASH Shell: For Loop File Names With Spaces
ubuntu – Copy files listed by the find command and rename it with the path
linux – Find document files and copy them to another directory
video – How to convert an MKV to AVI with minimal loss
In order to just copy the video and audio bitstream, thus without quality loss:
ffmpeg -i filename.mkv -c:v copy -c:a copy output.avi
If you want FFmpeg to convert video and audio automatically:
ffmpeg -i filename.mkv output.avi
Source: video – How to convert an MKV to AVI with minimal loss – Super User