cjhaas.com Basically a place that Chris can post solutions to problems so he can easily find them later

October 26, 2010

Convert MXF to AVI/MOV/MP4/etc

Filed under: Uncategorized — Tags: — Chris Haas @ 2:26 pm

The only way that I could find to convert a Sony cam MXF file was to use MXFSplit to pull out the raw stream and then use FFMpeg to convert that to something.

Step 1: Download and extract MXFLib from FreeMXF.org (OLD LINK, source only now) FreeMXF.org

Step 2:Drop to a command line, CD to the directory containing the files from above and run the following command on your file:
mxfsplit.exe "c:20101012-092347B01.mxf"

Step 3: The previous command will give you a *.Stream file which is a raw DV stream that we can pass to FFMPeg:
ffmpeg -y -i "c:20101012-092347B01.Stream" -s 640x480 Output.mov

June 4, 2010

failed to rename “x264_2pass.log.temp” to “x264_2pass.log”

Filed under: Uncategorized — Tags: — Chris Haas @ 10:15 am

If you’re not running FFMPEG directly (running a GUI wrapper for instance) I don’t have an answer for you. But if you’re running FFMPEG directly from the command line you might run into this if you run multiple encodes at the same time.

Specifically, FFMPEG allows you to specify the 2-pass logfile but doesn’t allow you to specify x264′s 2-pass logfile. So if you run multiple 2-pass encodes at the same time they’ll both try to write to the same logfile (which seems to not fail) during the first pass but the first one to finish tries to rename the file and fails with:

failed to rename "x264_2pass.log.temp" to "x264_2pass.log".
[libx264 @ 0x19db1f0]ratecontrol_init: can't open stats file
Error while opening codec for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height

Then the encoder that failed might also kick out this error message while trying to make the second pass:

[libx264 @ 0x2606ad0]statistics are damaged at line 2130, parser out=0
Error while opening codec for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height

The solution? The only solution I have so far is to copy FFMPEG to a unique folder for each 2-pass encode because the x264 logs will be created in the same folder as FFMPEG.exe. If anyone has another option I’d love to hear it.

UPDATE 2009-06-30

I’m launching FFMPEG from .Net and I found that if I just set the WorkDirectory of the process to a unique folder instead of copying the EXE every time it works perfectly, too.

Powered by WordPress