Real-time Editing with Premiere Pro CS4.1, Vegas, and other NLE's which can read MP4 files
[Note: real-time editing is only possible with sufficiently fast PCs. Current MP4 decompressors can be unstable. See an alternate method, including full-resolution real-time editing here: viewtopic.php?f=29&t=3871).
1. Install FFMpeg. You can get the latest build here: http://tripp.arrozcru.org/
2. Copy the code below into .bat (batch) files. Edit the scripts to point to your ffmpeg.exe. Change the "threads" count to match the number of cores on your computer.
3. Make a directory called MOV in the same dir as the .bat file(s) and copy all MOV files there.
4. Run the mf.bat batch file (and proxy version(s), if needed).
5. Import the "Full" dir into Premiere. You may need to tell PPro to use a 1.0 aspect ratio for each MP4 (IIRC, you can select them all and do this just once).
6. Create a 960x540 timeline, and do your edits there. Make sure "Scale to Frame Size" is selected for all clips.
7. Create a 1920x1080 timeline and copy paste your final edit there. Right-click on all clips and make sure Scale to Frame Size is selected (should fix any coordinate issues; should fix any title issues).
You should be able to have smooth editing in a 960x540 timeline, sometimes even in a 1920x1080 timeline (not full speed, but usable most of the time). The script below will give you 512kbps AAC audio as part of the new MP4 file (with unchanged video footage) as well as the original unchanged audio in separate wave files (in the WAV dir, see script below).
Full res video (not transcoded. Note that the "threads" argument probably doesn't improve performance in this case as the video is not transcoded. I left it enabled in case the AAC compressor is multithreaded):
Edit: here's a link to the script files: https://cid-a218911273df094b.skydrive.l ... cripts.zip
If full res video won't play back fast enough, try a smaller proxy. You can change the directory when ready to render final and reopen the project (using the full res MP4s).
if not exist Full\nul mkdir Full
for %%I in (MOV\*.MOV) do if not exist "Full\%%~nI.mp4" %ffmpeg% -y -i "%%I" -vcodec copy -aspect 16:9 -acodec libfaac -ab 512k -threads 4 "Full\%%~nI.mp4"
if not exist WAV\nul mkdir WAV
for %%I in (MOV\*.MOV) do if not exist "WAV\%%~nI.wav" %ffmpeg% -y -i "%%I" -vn -acodec copy "WAV\%%~nI.wav"
On my 2006 4x3GHz MacPro with ATI X1900, editing is fast enough/usable in a 960x540 timeline with the full-res MP4s. If working with After Effects, using 640x360 proxies makes sense (real-time performance in AE is possible!):
if not exist Proxy\nul mkdir Proxy
for %%I in (MOV\*.MOV) do if not exist "Proxy\%%~nI.mp4" %ffmpeg% -y -i "%%I" -vcodec libx264 -s 960x540 -aspect 16:9 -b 4000k -acodec libfaac -ab 160k -threads 4 "Proxy\%%~nI.mp4"
Make Proxy Low
if not exist ProxyLow\nul mkdir ProxyLow
for %%I in (MOV\*.MOV) do if not exist "ProxyLow\%%~nI.mp4" %ffmpeg% -y -i "%%I" -vcodec libx264 -s 640x360 -aspect 16:9 -b 2000k -acodec libfaac -ab 128k -threads 4 "ProxyLow\%%~nI.mp4"
If using only one proxy size, delete the appropriate line from process.bat.
Switch between Full and Proxy (change as needed if using ProxyLow)
To use switchEdit: quit PPro and run switchEdit.bat. Restart PPro and reload your project. In this way you can quickly switch between Full and Proxy editing.
ren Proxy _Proxy
ren Full Proxy
ren _Proxy Full