Tutorial – rewrap Canon DSLR mov files in MP4container 4 better editing
This is my summary of how to remux Canon DSLR mov files into a MP4 container, using the ffmpeg command line utility.
The instructions are simplified because I am no programmer. This method works well, it is very quick, much quicker than recoding/transcoding/converting.
I went this why because I had been having trouble with mov files myself, confirmed after reading many threads around the internet reporting Vegas will get sluggish if there are too many mov files on the timeline.
I was looking for a quick and cheap way to remux (rewrap) HD files from my Canon DSLR so that I could edit with less lag in Vegas.
THE PROGRAM TO USE – FFMPEG
FFMPEG is a command line program, and the command line given in this post does batch remuxing of multiple files. Remux differs from recoding/encoding/transcoding in that it does not involve taking the stream out of the container, decoding it and then encoding it again, to pack it into the same or a different container.
Remuxing means you take whatever streams are inside the original container (“mov” in this case)and just put them verbatim into the alternative (“MP4” in this case)container. Remux is like “cut and paste”, recoding/encoding/transcoding is like “cut, translate and paste”
You must put a copy of the ffmpeg executable file (not a windows executable) in the same folder as the files you wish to remux (rewrap)
And you must put the batch file in that same folder too.
THE AUDIO STREAM NEEDS TO BE CONVERTED DURING THE REMUX PROCESS
Canon MOV files have a small problem in that their audio stream can not be transplanted into the mp4 container wholesale (that container does not support the Canon MOV audio stream). The video stream can be transplanted but the audio stream must be converted.
VERY IMPORTANT TO NAME THE MOV FILES WITHOUT GAPS BEFORE DOING THE REMUX
The MOV files must be named carefully, there cannot be any gaps in the name.
So it wouldn’t work with “interview outside (1).mov”, but this would work “interview_outisde(1).mov”
This is critical, it just won’t work if there are gaps in the name (it doesn’t find the files)
THE BATCH FILE
The whole thing, the remux of the video stream and the conversion of the audio stream can be done with a single line in a batch file, the line below. It is for remuxing multiple files in the same directory in one go.
FOR %%A IN (*.mov) DO ffmpeg -i %%A -vcodec copy -acodec aac -strict experimental -ab 256k %%~nA.mp4
That will remux each mov file into an MP4 container and convert the PCM audio stream into AAC (LC)
Running the batch file will result in a series of MP4 files sitting alongside the mov files in that folder. The mp4s should be approximately the same size as the original mov files and WILL RETAIN ALL THE QUALITY.
SYNTAX OF BATCH FILE
The number specified, in this case “256” refers to the desired Kbps of the audio stream in the new mp4 file (change as you wish)
The remux will not work without the switch “-strict experimental”, it’s needed because the “aac” encoder is still in experimental phase (2016).
The string at the end is “%%~nA.mp4” to make sure that the remuxed files do not contain “.mov” in their names, i.e. so they will be “MVI_1504.mp4” and not “MVI_1504.mov.mp4” for example.
(using a syntax of “%%A.mp4” would yield a file name of “MVI_1504.mov.mp4”)
The beginning of the line “FOR %%A IN (*.mov)” defines the operator “%%A” as all and every mov file in the folder, that’s why the string is repeated, with modification, as part of the outputted file name.
Thanks to Aleksey Tarasov on Creative Cow for putting me on to ffmpeg for this function.
Sorry, there were no replies found.