First Commit
This commit is contained in:
1
Laptop/video_convert_scripts/change_container_to_avi_Xbox
Executable file
1
Laptop/video_convert_scripts/change_container_to_avi_Xbox
Executable file
@ -0,0 +1 @@
|
||||
ffmpeg -i ThePianist.mpg -vcodec mpeg4 -b 512k -acodec mp2 -ac 2 -ab 128k ThePianist.avi
|
@ -0,0 +1,2 @@
|
||||
ffmpeg -i movie.mkv -vcodec copy -acodec copy Movie.mp4
|
||||
|
15
Laptop/video_convert_scripts/mkv2mp4
Executable file
15
Laptop/video_convert_scripts/mkv2mp4
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
audiofile=`mktemp`
|
||||
videofile=`mktemp`
|
||||
|
||||
cd "`pwd`"
|
||||
|
||||
avconv -i $1 -vn -acodec pcm_s16le -ac 2 $audiofile.wav &> /dev/null
|
||||
normalize-audio $audiofile.wav &> /dev/null
|
||||
faac -c 48000 -q 100 $audiofile.wav &>/dev/null
|
||||
mkvextract tracks $1 1:$videofile.h264 &> /dev/null
|
||||
MP4Box -fps 23.976 -add $videofile.h264 -add $audiofile.aac ${1%.*}.mp4 &> /dev/null
|
||||
|
||||
# cleanup
|
||||
rm $audiofile $videofile
|
||||
|
1
Laptop/video_convert_scripts/rename_m4v_to_avi
Executable file
1
Laptop/video_convert_scripts/rename_m4v_to_avi
Executable file
@ -0,0 +1 @@
|
||||
rename videos with ".m4v" extension to ".avi" for play back on xbox 360
|
29
Laptop/video_convert_scripts/xbox_video_convert_mkv2m4v.sh
Executable file
29
Laptop/video_convert_scripts/xbox_video_convert_mkv2m4v.sh
Executable file
@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
# script to convert an mkv to m4v
|
||||
|
||||
if [ "$1" -a "$2" ];
|
||||
then
|
||||
|
||||
filename=`basename "$1" .mkv`
|
||||
fps=`mkvinfo "$filename".mkv|grep "Default duration"|head -n 1|cut -d'(' -f2|cut -c 1-6`
|
||||
#sfreq=`mkvinfo "$filename".mkv|grep "Sampling frequency"|head -n 1|cut -d':' -f2|cut -c 2-6`
|
||||
|
||||
mkvextract tracks "$filename".mkv 1:video.h264
|
||||
|
||||
ffmpeg -i "$filename".mkv -vn -acodec pcm_s16le -ac 2 audio.wav
|
||||
|
||||
normalize-audio audio.wav
|
||||
|
||||
#faac -c $sfreq audio.wav
|
||||
neroAacEnc -br $2 -lc -if audio.wav -of audio.aac
|
||||
|
||||
MP4Box -fps $fps -add video.h264 -add audio.aac "$filename".m4v
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
rm audio.aac audio.wav video.h264
|
||||
echo "All Done!"
|
||||
fi
|
||||
|
||||
else
|
||||
echo "Usage: mkv2m4v.sh {filename} {target audio bitrate (eg: 128000)}"
|
||||
fi
|
Reference in New Issue
Block a user