Julian Frost
May 7th, 2010, 09:23 PM
I haven't used my FS-C in a while, and forgot that it splits the M2T files into 2GB chunks (8min 42sec 29 frames) due to the FAT32 file system used. I also forgot that when you import these chunks into an NLE (like Premier Pro), you end up with missing frames due to the open GOP.
You can manually type in the command...
COPY /B FILE1.M2T +FILE2.M2T +FILE3.M2T... ... +FILE99.M2T DESTINATION.M2T
...but that's long, and laborious. So I wrote a batch file which combines all the M2T files in a folder and outputs a single "combined.m2t" file, ready for ingestion into your NLE. Open Notepad to create a new file, copy the code below into the notepad document, and save it as COMBINE.BAT. Copy this BAT file into the folder where you have the M2T files, and run it. It parses the folder, gets the filenames of all the M2T files and creates the copy command (above) for you, which it puts in a second batch file. It then runs that batch file, joining all the files together, and finally, it deletes the temporary files.
echo off
rem Delete old files, if they exist...
if exist combineit.bat del combineit.bat
if exist nullfile.tmp del nullfile.tmp
if exist combined.m2t del combined.m2t/p
rem Create some temp files where we store the names of the files to be joined...
type nul > combineit.bat
type nul > nullfile.tmp
echo Combining all M2T files in this folder to "combined.m2t"
echo This may take a while...
rem Create the 2nd batch file containing the command which will join the M2T files...
echo copy /b nullfile.tmp^^>> combineit.bat
for /f %%a IN ('dir /b *.m2t') do echo +%%a ^^>> combineit.bat
echo combined.m2t>> combineit.bat
rem Run the newly created batch file...
call combineit.bat
rem Tidy up!
del nullfile.tmp
del combineit.bat
There's also a Windows GUI version (which I did not write), that I'll most likely use, but didn't find until after I wrote the batch file, above! It's called TSSplitter. It has a join feature too: TSSplitter - Official Website (http://www.ffprojects.net/tssplitter/tssplitter.htm)
You can manually type in the command...
COPY /B FILE1.M2T +FILE2.M2T +FILE3.M2T... ... +FILE99.M2T DESTINATION.M2T
...but that's long, and laborious. So I wrote a batch file which combines all the M2T files in a folder and outputs a single "combined.m2t" file, ready for ingestion into your NLE. Open Notepad to create a new file, copy the code below into the notepad document, and save it as COMBINE.BAT. Copy this BAT file into the folder where you have the M2T files, and run it. It parses the folder, gets the filenames of all the M2T files and creates the copy command (above) for you, which it puts in a second batch file. It then runs that batch file, joining all the files together, and finally, it deletes the temporary files.
echo off
rem Delete old files, if they exist...
if exist combineit.bat del combineit.bat
if exist nullfile.tmp del nullfile.tmp
if exist combined.m2t del combined.m2t/p
rem Create some temp files where we store the names of the files to be joined...
type nul > combineit.bat
type nul > nullfile.tmp
echo Combining all M2T files in this folder to "combined.m2t"
echo This may take a while...
rem Create the 2nd batch file containing the command which will join the M2T files...
echo copy /b nullfile.tmp^^>> combineit.bat
for /f %%a IN ('dir /b *.m2t') do echo +%%a ^^>> combineit.bat
echo combined.m2t>> combineit.bat
rem Run the newly created batch file...
call combineit.bat
rem Tidy up!
del nullfile.tmp
del combineit.bat
There's also a Windows GUI version (which I did not write), that I'll most likely use, but didn't find until after I wrote the batch file, above! It's called TSSplitter. It has a join feature too: TSSplitter - Official Website (http://www.ffprojects.net/tssplitter/tssplitter.htm)