Accurate editing AVCHD/MPEG without re-encoding

Discussions not specifically concerning FameRing.

Accurate editing AVCHD/MPEG without re-encoding

Postby gnux » Mon Sep 14, 2009 6:28 am

Frame Accurate cutting and joining on AVCHD/MPEG without re-encoding

A perfect solution by Smart Cutter for DV and DVB, from FameRing

The AVCHD/MPEG video compression standards are by far the most common today, and are only becoming more common, squeezing out the proprietary and one-off standards of old. DVB, cable, satellite, and over-the-air digital TV are all based on AVCHD/MPEG, and even a lot of IPTV is some sort of AVCHD/MPEG. DVDs are MPEG2. Two of the three video formats allowed on BluRay discs are AVCHD/MPEG variants. Even video cameras(DV) are lately moving to AVCHD/MPEG, even though AVCHD/MPEG is inimical to editing. AVCHD/ MPEG is everywhere.

In recent times, a need has arisen for both domestic and commercial audio and/or video(herein "A/V") apparatuses to support cutting and seamless joining of AVCHD/MPEG A/V segments. Applications for video cutting and seamless joining are numerous, with particular domestic uses including the editing of home movies and the removal of commercial breaks and other discontinuities in recorded broadcast material.

Most digital video recorders record video in AVCHD/MPEG format. They also offer some very basic editing features. But the advanced editing features, till date, were demanding in terms of computing power, i.e. MIPS(Millioin Instructions Per Second) and/or memory intensive and were not possible to incorporate in consumer products, especially due to the fact that the video streams had to be decoded from AVCHD/MPEG format and then re-encoded again for storing in the same AVCHD/MPEG format.

AVCHD/MPEG video, has one key frame for every up to 300 non-key frames. Each key frame with its following non-key frames are called a “group of pictures,” or GOP. Non-key frames can not be decoded without its key frame, while key frame can be decoded independently.

Editing a video sequence involves finding the nearest GOP(Group of pictures) boundary within the audio-video stream and then applying the editing operation. In this approach, some frames, which the user had not intended to edit, will get edited or vice versa because of the GOP boundary calculation. In most cases in AVCHD, the length of the GOP is about several seconds. This approach called as GOP-accurate editing often results in seconds of program loss, which is not acceptable for most users. GOP accurate editing means the system automatically decides to shift the starting point. The same applies to ending point. If the encoder has more frames in a GOP, then the situation becomes worse.

As an example, see the Fig 1. Suppose the edit point is the start of program(green part), the Gop accurate editing will shift the cut point to commercial(red part) or middle part of program, both fail the user's will.


Image
Fig 1. a gop with both commercial and program in it


In the advanced AVCHD/MPEG products, the expectation is to frame-accurate editing(i.e. no shifting of edit points). This expectation can be achieved if AVCHD/MPEG re-encoding is done only for the GOPs around the cut GOPs(i.e. cut points).

There are, however shortcomings with many AVCHD/MPEG applications and systems that are available today. Specifically, many applications and systems force cutting to be done only at GOP boundary. Other applications may allow frame accurate cutting, but will decode the whole portion from the start point to the end point, then re-encode the portion into a new AVCHD/MPEG stream as a result.

Needless to say, neither of the two solutions is desirable as, in the first case, the user's editing wishes are not complied with and, will result in including content that the user does not wish to include. In the second case, content that is not necessarily needed for the user-desired processing is decoded and re-encoded thus adding to the processing complexity and over-head.


With respect to the quality issue, decoding the entirety of each file, operating upon portions of the decoded files, and then re-encoding the output file can be problematic for a couple of different reasons. First, by decoding the entirety of the files, portions that are not operated upon by the user are unnecessarily decoded. Second, re-encoding the entire output file, as noted above, is very expensive in terms of the resources and the time required for re-encoding. Additionally, and prehaps more importantly, each time that content is decoded and re-encoded, it resembles the original content less and less. This can and does lead to degraded quality.

The expected frame accurate editor will only re-encode those GOPs containing cut points, copying unedited GOPs from the original file straight into the new output file. Thus, users pay the re-encoding penalties of time and quality loss only at the cut points.

The classic program of "frame accurate", which is a really clever MPEG editing program, is Womble’s MPEG2VCR. But it lacks the ability to edit AVCHD.

Elecard’s XMuxer, has MPEG editing abilities. The Pro version claims to have frame-accurate editing, while the Lite version only does GOP-accurate editing. Also, the AVCHD supported is not included yet.

Smart Cutter for DV and DVB, released by FameRing, claimed to support AVCHD/MPEG2 frame accurate cutting and joining, only re-encode gops at the cut points. It is customized to cut and join AVCHD/MPEG2. It has no special video effects like Adobe Premiere does, it only cuts and splices video clips.

As a conclusion, we'd like to say the high road of AVCHD/MPEG editing is to not do it at all. Editing the AVCHD/MPEG is not very easy, and restricts your choice of tools. But as AVCHD/MPEG-like format is so popular today, we would hope for some frame accurate apparatuses fast and easy enough.
gnux
 
Posts: 1
Joined: Sat Sep 05, 2009 9:35 am

Re: Accurate editing AVCHD/MPEG without re-encoding

Postby shirleyyang » Thu Oct 22, 2009 8:28 am

Currently AVCHD Cutter is your best choice to cut AVCHD , which is a best Video Cutter that we are avilable.Apart from cutting AVCHD videos, you can also edit AVCHD at your will! Have a try!
shirleyyang
 
Posts: 1
Joined: Thu Oct 22, 2009 8:24 am

Re: Accurate editing AVCHD/MPEG without re-encoding

Postby carlrossen » Fri Feb 26, 2010 10:53 am

Is there a way to see where the keyframes are and to move to the next keyframe? If not, then these functions would be a big improvement. Key frames could be indicated by placing a colored frame around the frame thumbnail, and the should be a forward and backward "jump to keyframe" button and/or keyboard shortcuts. The encoding can be speeded up if one choose to cut on keyframes and in many cases it doesn't matter if the cut is a few frames sooner or later. But currently it doesn't appear to be possible to find the keyframes.

I was under the impression that there is always a keyframe placed at scene changes. This would mean that the example with a keyframe on each side of a commercial/program point would not occur. Is this not so?
carlrossen
 
Posts: 5
Joined: Tue Feb 23, 2010 8:44 pm

Re: Accurate editing AVCHD/MPEG without re-encoding

Postby admin » Fri Feb 26, 2010 2:08 pm

Dear carlrossen:
Thanks for your inspiring ideas.

Is there a way to see where the keyframes are and to move to the next keyframe?

Nice idea. It surely can be done. We will talk to our developers about this.

in many cases it doesn't matter if the cut is a few frames sooner or later.

This is correct in Mpeg2 processing. But in H.264/AVCHD, the gop is much bigger, a gop-accurate cut may be dozens of frames sooner or later.

there is always a keyframe placed at scene changes.

Under some scenes, this is correct, but not always. This depends on the intelligence of the video encoders.

Please feel free to post your further question and advice.
Thank you.

Best Regards,
FameRing Support Team
World's first H.264 AVCHD frame accurate cutter without re-encoding!
Presented by FameRing!
http://www.fame-ring.com/smart_cutter.html
admin
Site Admin
 
Posts: 714
Joined: Mon Jun 01, 2009 12:54 pm

Re: Accurate editing AVCHD/MPEG without re-encoding

Postby carlrossen » Sun Feb 28, 2010 6:40 pm

Thanks for your reply. If the GOPs are variable length and may be long there is an even greater need to know where they are. Jump to keyframe is a common function in many video tools, such as Virtualdub and Avidemux. The latter indicates the frame type when looking at a standard DVD MPEG-2 file which is very nice.
carlrossen
 
Posts: 5
Joined: Tue Feb 23, 2010 8:44 pm

Re: Accurate editing AVCHD/MPEG without re-encoding

Postby chel123 » Mon Aug 04, 2014 9:07 am

Hello!
What progress in keyframe viewing?
it would be useful to see the nearest keyframes at the current position of the timeline.
hope you will add this option in future builds.
thanks for your works.
chel123
 
Posts: 2
Joined: Mon Aug 04, 2014 8:56 am


Return to Other Discussions

Who is online

Users browsing this forum: No registered users and 1 guest

cron