kunal00731
August 29th, 2011, 10:25 AM
Hi,
Yesterday i was trying to develop a script for merging split video files of any format.
The idea came to me when i downloaded a movie called disclosure which was splitted into 3 files like DSC.rmvb.001, DSC.rmvb.002, DSC.rmvb.003
Normally i merge them using :
cat DSC.rmvb.001 DSC.rmvb.002 DSC.rmvb.003 >> DSC.rmvb
Hence i started developing a script to do this for all formats (i.e. rmvb,mkv,avi....and so on.)
So installed mencoder first and then wrote the script as such:
./join.sh
The script starts here :
#!/usr/bin
Echo "How many files are to be converted ?"
read i;
if[$i -eq 1]
then
echo "Operation not possible with only one file"
fi
if[$i -gt 1]
then
echo "Enter the path and name of the videos u want to combine"
read video1 video2 video3
echo "Name the new video with extension"
read name
mencoder -forceidx -oac copy -ovc copy -o $name $video1 $video2 $video3
echo "Operation Successful!"
fi
Now I have heard that mencoder does not support all formats and what if i want to join more than 3 videos. ???
Need some pointers here guys and tell me if a better way exists here.:confused:
Yesterday i was trying to develop a script for merging split video files of any format.
The idea came to me when i downloaded a movie called disclosure which was splitted into 3 files like DSC.rmvb.001, DSC.rmvb.002, DSC.rmvb.003
Normally i merge them using :
cat DSC.rmvb.001 DSC.rmvb.002 DSC.rmvb.003 >> DSC.rmvb
Hence i started developing a script to do this for all formats (i.e. rmvb,mkv,avi....and so on.)
So installed mencoder first and then wrote the script as such:
./join.sh
The script starts here :
#!/usr/bin
Echo "How many files are to be converted ?"
read i;
if[$i -eq 1]
then
echo "Operation not possible with only one file"
fi
if[$i -gt 1]
then
echo "Enter the path and name of the videos u want to combine"
read video1 video2 video3
echo "Name the new video with extension"
read name
mencoder -forceidx -oac copy -ovc copy -o $name $video1 $video2 $video3
echo "Operation Successful!"
fi
Now I have heard that mencoder does not support all formats and what if i want to join more than 3 videos. ???
Need some pointers here guys and tell me if a better way exists here.:confused: