Mutantape
11th September 2011, 22:08
Purpose :
=======
Your camcorder creates one new file each time you shoot a scene. When you want to merge all of them
into one file using tsmuxer, for example, audio drifts relative to video, and the drift increases with the number of clips involved.This is due to the fact that the soundtrack in each scene is slightly longer than the video. When concatenating files, the extra sound bits add up and cumulated drift becomes visible.
This utility trims sound down to the video length by cutting out AC3 frames from the digital stream
there is no recoding, just operation in the compressed domain. I hesitate to label it as lossless,
since obviously some sound frames are removed. But what remains of the sound is not modified.
Sometimes it may be needed to add some silent frames rather than cutting.
Sound is adjusted to +/- 16 ms of the video, since an AC3 frame is 32 ms. The program design avoids
accumulation of errors so it should in principle work for 60 fps devices, with their strange non
integer frame duration, but was not tested in this case.
The delay given in the container is applied to the sound and is set to zero in the final merged file.
A mix of clips with different delays is possible.
Details:
======
This is a DOS utility, with no GUI. I've developed it for my own use, and brought it to the point where it was good enough for me. I do not plan to do much maintenance on it and just put it here in the hope it will be useful to someone as it is.
User manual included in the bundle.
The OS i use is Windows XP.
The camcorder is a device with 50P/60P capability, later expanded to 3D and from a well known japanese brand (no, not them, but the one who bought them...). I am giving no names since some people are currently swamping the web with ads for a payware that handles its files, and i don't want to be caught up in searches with them...
It is a standard-shaped camcorder with 3 variants depending on whether there is a hard disk, or additional internal memory, or just a memory card. Enough said, i guess.
The files it produces use m2ts (AVCHD) container with AVC/H.264 encoded Video (up to 28.8 Mbps), and AC3 sound.
The .m2ts i create with avisynth scripts do not behave exactly like those of the camcorder (mediainfo does not see the same number of frames), this points to different flavors of .m2ts files so i am not sure it will work with other camcorders.
I work with 50P and rarely 25I. I've not tested 60P. The files produced always have negative delays.
There is code to handle positive ones, but i've not tested it.
The code i wrote uses resources from Ac3Cutter (and is embeded in its code). It is a small layer on top of tsmuxer and mediainfo. I add those last two in the bundle for convenience, though it increases the size by
a large relative amount.
The code is designed to work around the bugs i found in those versions, so it may not be a good idea to replace them with newer releases if any is available.
I've scanned the files with a free antivir version.
Feel free to re-scan or recompile from sources if you are the paranoïd type.
This link will have a limited lifetime if nobody uses it...
http://dl.free.fr/nWdDLd12i
It is a french website, but you just have to know that "Télécharger ce fichier" means "Download this file". No password, click on that and it should start (4 MB).
=======
Your camcorder creates one new file each time you shoot a scene. When you want to merge all of them
into one file using tsmuxer, for example, audio drifts relative to video, and the drift increases with the number of clips involved.This is due to the fact that the soundtrack in each scene is slightly longer than the video. When concatenating files, the extra sound bits add up and cumulated drift becomes visible.
This utility trims sound down to the video length by cutting out AC3 frames from the digital stream
there is no recoding, just operation in the compressed domain. I hesitate to label it as lossless,
since obviously some sound frames are removed. But what remains of the sound is not modified.
Sometimes it may be needed to add some silent frames rather than cutting.
Sound is adjusted to +/- 16 ms of the video, since an AC3 frame is 32 ms. The program design avoids
accumulation of errors so it should in principle work for 60 fps devices, with their strange non
integer frame duration, but was not tested in this case.
The delay given in the container is applied to the sound and is set to zero in the final merged file.
A mix of clips with different delays is possible.
Details:
======
This is a DOS utility, with no GUI. I've developed it for my own use, and brought it to the point where it was good enough for me. I do not plan to do much maintenance on it and just put it here in the hope it will be useful to someone as it is.
User manual included in the bundle.
The OS i use is Windows XP.
The camcorder is a device with 50P/60P capability, later expanded to 3D and from a well known japanese brand (no, not them, but the one who bought them...). I am giving no names since some people are currently swamping the web with ads for a payware that handles its files, and i don't want to be caught up in searches with them...
It is a standard-shaped camcorder with 3 variants depending on whether there is a hard disk, or additional internal memory, or just a memory card. Enough said, i guess.
The files it produces use m2ts (AVCHD) container with AVC/H.264 encoded Video (up to 28.8 Mbps), and AC3 sound.
The .m2ts i create with avisynth scripts do not behave exactly like those of the camcorder (mediainfo does not see the same number of frames), this points to different flavors of .m2ts files so i am not sure it will work with other camcorders.
I work with 50P and rarely 25I. I've not tested 60P. The files produced always have negative delays.
There is code to handle positive ones, but i've not tested it.
The code i wrote uses resources from Ac3Cutter (and is embeded in its code). It is a small layer on top of tsmuxer and mediainfo. I add those last two in the bundle for convenience, though it increases the size by
a large relative amount.
The code is designed to work around the bugs i found in those versions, so it may not be a good idea to replace them with newer releases if any is available.
I've scanned the files with a free antivir version.
Feel free to re-scan or recompile from sources if you are the paranoïd type.
This link will have a limited lifetime if nobody uses it...
http://dl.free.fr/nWdDLd12i
It is a french website, but you just have to know that "Télécharger ce fichier" means "Download this file". No password, click on that and it should start (4 MB).