The Few, The Proud
After reading some FFmpeg doc (linked in the references), I found out that MP4's can't be concatenated in their native form. There are only a few video formats that CAN be concatenated in their native form: MPEG-1, MPEG-2 PS, DV. After some experimentation and viewing the results, I decided to use mpeg2video as my intermediate format with this command:ffmpeg -threads 8 -i part1.mp4 -sameq -vcodec mpeg2video -acodec mp2 -ac 2 -ar 44100 -ab 256k 1.mpg

Converting en masse
Since I had four of these files to convert, it made sense for me to use some quick shell control flow to get the job done in one shot (input/output streams in bold below):for i in 1 2 3 4;do ffmpeg -threads 8 -i part$i.mp4 -sameq -vcodec mpeg2video -acodec mp2 -ac 2 -ar 44100 -ab 256k $i.mpg;done

Simple filesystem concatenation
After I converted the base files into files of a type that could be concatenated, I used this command to concatenate the files:cat 1.mpg 2.mpg 3.mpg 4.mpg > all.mpg

The resulting file is pretty large ~6GB:[sodo@computer tmp]$ ll all.mpg

-rw-rw-r--. 1 sodo sodo 6165041152 Mar 3 13:16 all.mpg

This would be a quite serviceable intermediate file, but upon reflection, I thought that I could probably do the concatenation and conversion to a final format in one step, rather than two. FFmpeg to the rescue!

FFmpeg's "concat" feature

Because I like my iDevices, I want the file format to be an MP4 container using H264/AAC as my video and audio formats. So instead of doing a two-step conversion:

1) concatenate the files in the filesystem

2) transcode the video to a file format

I decided to combine both of those steps into one by using the "concat" feature of ffmpeg. The command looks like this:

You can change the output specifiers to taste. Also note that you'll need a presets file defined if you are going to use the "-vpre slow" specifier.

There was no way to tell from FFmpeg's output that the concatenation command was working except for this small line:Input #0, mpeg, from 'concat:/tmp/1.mpg|/tmp/2.mpg|/tmp/3.mpg|/tmp/4.mpg'

as well as the fact that the "frame=" counter at the bottom of the FFmpeg output incremented beyond the length of the first video. In this case, 21827.

Verify the total number of framesRedirecting standard error to standard output
As a sanity check, I like to verify the total number of frames in the output. I can do this by capturing the text information that FFmpeg outputs when FFmpeg runs. That text information is not "standard output" in the Unix sense. The text from an FFmpeg command actually outputs "standard error". So instead of trying to grep with a command like this:ffmpeg -i 1.mpg -an -vcodec copy -f mpeg2video -y NUL | grep 'frame'

Hi Cacasodo,I have a problem regarding cinelerra's EDL output. I have done editing of about 2 hour and i need to output to Color grading software. When i do export in EDL, it doesn't records filename into reelname column. In reelname its something like cin0000. How can i automate this process? Is there any script?

Mohan,I haven't played with the EDL function. However, I see that it spits out the edits to a particular track in CMX 3600 format (whatever that is).

I don't have a script to manipulate that particular EDL format, but if you post your question to the Cinelerra Community Version mailing list (http://cinelerra.org/mailinglists.php), maybe someone there has such a thing.

In general, though, if you only needed a subset of the information contained in the file, I'd probably use a shell script (awk/sed/etc) to pick out specific information and then format that information as an executable script. Something like what I did here:Automation Script

Why Mule?

"Mules are not really stubborn. They can seem lazy because they will not put themselves in danger. A horse can be worked until it drops, but not so with a mule. The "stubborn" streak is just the mule's way of telling humans that things are not right. Mules are very intelligent and it is not a good idea to abuse a mule. They will do their best for their owner, with the utmost patience."About Mules