I just want to shoot this idea out here for those who may be interested.

The problem is the following: The desire to edit H264/MP4 files in Adobe Premiere Pro without having to reencode the data and thus losing quality, as Premiere Pro offers it for formats like DV AVI.

I have seen arguments against the necessity, but hey, who cares. I am sure there are people out there who would love this.

So here's the idea for a tool that will kinda allow this. I don't have the time to program it myself, but maybe someone is bored enough, that's why I'm posting it.

Basic premise:

1. Adobe Premiere Pro projects can be imported as compositions into Adobe After Effects. Adobe After Effects can save project files in an editable XML file format. Adobe After Effects also offers command-line rendering (aerender.exe).

2. It is possible to read the XML project files via a custom tool to extract information about all the different file formats used in the timeline. The tool can use third-party software to analyze those streams for compatibility and offer the user a choice from the h264 formats most prevalently used in the project (for example 1080p/60, plus other information necessary for H264 streams to be able to match). The user then chooses one of those formats and lets the program do its "magic".

3. The program then uses MP4Box or similar to extract all the h264 parts of source video files that are unaltered in the project (no color correction etc). It makes sure to account for GOP beginnings, to not mess anything up.

4. The program then uses aerender.exe to render the parts of the project where the video can not be loslessly copied, in the format specified above, maybe with a choice of bitrate. This would apply to color correction, titles, fades, transformations ... well, basically anything that isn't just the video stream itself. It would also apply for the parts of the stream that can not be loslessly copied due to interruption of GOPs.

5. The program then uses aerender.exe to render out a .wav file of the complete project sound. Thus we can have losless video stream copying while doing fancy audio work.

6. The program then uses MP4Box to join all the h264 streams in the correct order and mux them with the audio stream (possibly with encoding the audio stream before that).

7. Voila.

The only thing I can think of that could be a problem would be VFR files like those recorded by NVIDIA Shadowplay. I don't personally understand much about how h264 streams work, and Cut Assistant is able to trim and cut those files without video/audio sync issues, but it's probably not completely trivial. One obvious trade-off would be that aerender.exe would "constantize" the framerate of the parts that have to be re-rendered, but I am sure a nifty programmer could find a solution to any arising audio/video sync issues.

Anyhow, since all the major software doing the hard work already exists (aerender.exe and MP4Box and maybe others) I think this would be a nice and not too challenging little project for anyone interested. If no one wants to do it, I'll probably do it myself some day, but I don't have the time now, so there you go.

Cheers.