VideoHelp Forum




+ Reply to Thread
Results 1 to 21 of 21
  1. Hello everyone,

    I have two .m2ts files. What I want to do is replace two scenes in file A with two scenes from file B. The scenes are the exact same length and the audio will not be changed in file A.

    What I'd like to know is A) is this possible to do without a lengthly re-encode, B) which tools I would need, and C) how to do it.

    Any help would be appreciated. Thank you.

    Michael
    Quote Quote  
  2. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    I haven't seen anything that does AVC smart editing nicely, so the short answer is maybe, but with work.

    The best I could offer at this stage would be to demux a copy of the audio from file A and put it to one side. Use AVI Demux to do your editing. It will be a matter of loading file A, cutting everything from the first edit point onwards, appending file B, trimming out everything from file B you don't need, appending file A and trimming off the start and end sections you don need, appending file B (again) and trimming it down to the scene you want, and finally, appending file A (yet again) and deleting everything up to the section you want to keep (so you have File A, File B, File A, File B, File A, with eash instance trimmed to be just the bits you want). Once that is done, save the result as a new file with Video and Audio set to Copy. Check your edits and see that the quality is OK. Load the new file, then go into the audio menu and replace the edited audio with the original audio and save a new copy which will hopefully all line up. This is all speculation, as I haven't tried it myself, but in theory it should work.

    AFAIK, all the major editors will insist on re-encoding AVC material at this stage.
    Read my blog here.
    Quote Quote  
  3. Member edDV's Avatar
    Join Date
    Mar 2004
    Location
    Northern California, USA
    Search Comp PM
    It is possible to cut on I frames. That would give +/- 0.5sec edit accuracy (15 frame GOP). Others can suggest software to do this.
    Recommends: Kiva.org - Loans that change lives.
    http://www.kiva.org/about
    Quote Quote  
  4. Originally Posted by guns1inger View Post
    I haven't seen anything that does AVC smart editing nicely, so the short answer is maybe, but with work.

    The best I could offer at this stage would be to demux a copy of the audio from file A and put it to one side. Use AVI Demux to do your editing. It will be a matter of loading file A, cutting everything from the first edit point onwards, appending file B, trimming out everything from file B you don't need, appending file A and trimming off the start and end sections you don need, appending file B (again) and trimming it down to the scene you want, and finally, appending file A (yet again) and deleting everything up to the section you want to keep (so you have File A, File B, File A, File B, File A, with eash instance trimmed to be just the bits you want). Once that is done, save the result as a new file with Video and Audio set to Copy. Check your edits and see that the quality is OK. Load the new file, then go into the audio menu and replace the edited audio with the original audio and save a new copy which will hopefully all line up. This is all speculation, as I haven't tried it myself, but in theory it should work.

    AFAIK, all the major editors will insist on re-encoding AVC material at this stage.
    I followed the steps in AVI Demux up until I'm saving the file, but I am not sure what to choose as the Video container. I have Video and Audio set to copy, but the default container is AVI. There was no m2ts option and some of the options (such as MPEG) wouldn't let me save the file. Is there a specific container that I should choose?
    Quote Quote  
  5. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    MKV. This can then be converted back to M2TS without encoding
    Read my blog here.
    Quote Quote  
  6. Originally Posted by guns1inger View Post
    MKV. This can then be converted back to M2TS without encoding
    Just by renaming the extension or is there a particular way I should do it?
    Quote Quote  
  7. Open the mkv in tsmuxer then select avchd output.
    Quote Quote  
  8. Originally Posted by dylz View Post
    Open the mkv in tsmuxer then select avchd output.
    Ok, I'll give that a go. One thing I've noticed in AVI Demux is that when I set my start and end points and make a cut, one frame remains from the scene I've cut even though I've made sure to set the start/end points to the exact frame. Is there a reason for this?
    Quote Quote  
  9. Select the end cut point one frame longer. just cut until you get all the video you want to keep.
    Quote Quote  
  10. Originally Posted by dylz View Post
    Select the end cut point one frame longer. just cut until you get all the video you want to keep.
    Ok, I'll give that a try. Thanks.
    Quote Quote  
  11. So I've tried to save the file with MKV as the container, but I get the following error message "Keyframe Error: The beginning frame is not a key frame. Please move the A marker."

    Even if I Rebuild I & B Frames from the Tools menu I still get the same error. Any ideas on how I should proceed?
    Quote Quote  
  12. One thing I've noticed in AVI Demux is that when I set my start and end points and make a cut, one frame remains from the scene I've cut even though I've made sure to set the start/end points to the exact frame. Is there a reason for this?
    It's not possible to get frame accuracy with this method

    See post #3

    You have to cut just before I-frames (keyframes) at the end of a GOP . If you navigate by the << and >> buttons, you will automatically snap to keyframes. Those are the positions you're allowed to cut, you will notice the frame type identified as "I"

    You can try videoredo 4 beta (beta testing, but still buggy. It smart renders, so it is frame accurate - only the frames within a cut GOP are re-encoded)
    Quote Quote  
  13. Originally Posted by poisondeathray View Post
    One thing I've noticed in AVI Demux is that when I set my start and end points and make a cut, one frame remains from the scene I've cut even though I've made sure to set the start/end points to the exact frame. Is there a reason for this?
    It's not possible to get frame accuracy with this method

    See post #3

    You have to cut just before I-frames (keyframes) at the end of a GOP . If you navigate by the << and >> buttons, you will automatically snap to keyframes. Those are the positions you're allowed to cut, you will notice the frame type identified as "I"

    You can try videoredo 4 beta (beta testing, but still buggy. It smart renders, so it is frame accurate - only the frames within a cut GOP are re-encoded)
    So if I can't get frame accuracy with that method, then that means I'm pretty limited as far making my cuts correct?

    As mentioned in my initial post, all I need to do is replace two scenes in my .m2ts file with scenes from another. I know I said I was looking for a method without re-encoding but I'm willing to re-encode some if I have to. Basically I'm just looking for the quickest and most efficient way to do it regardless of how it has to be done. Are there any other programs that can do this same smart re-encoding? I would like to use free programs if possible.
    Quote Quote  
  14. Yes, you're limited in your cuts with this method. You can ONLY cut in those specific places.

    There are no free programs that smart render AVC/h.264 . Even paid programs don't do it properly at this point in time.

    Vegas pro can smart render avchd but it's quite hit & miss in my experience (more miss than hit). Videoredo beta is the closest so far in development towards having a working smart rendering engine

    If the cuts weren't on I-frames, and the timing is critical for you, then the easiest way would be to use an NLE like vegas or premiere pro . There aren't any good free non linear editors at this point in time

    You can do it with avisynth + free encoders, but this requires scripting and the avisynth learning curve is a bit steep
    Quote Quote  
  15. I have Final Cut Pro, but I know it doesn't natively edit AVCHD files which means I would have to re-encode the files to get them in there. I'll give VideoRedo a try but if that doesn't work it looks like I'll have to go the re-encode route, unless anyone has any other suggestions.
    Quote Quote  
  16. FCP doesn't natively edit AVCHD (the next release is supposed to) , but "native edit" doesn't mean smart render. They are different concepts. "Smart Render" means untouched segments get passed through. Only things like transitions, effects, get re-rendered. Cuts within a GOP for long GOP formats only re-render the few frames around the cutsite within the GOP (instead of re-encoding the whole file). Smart render is what all editors want . All native edit means is the ability to edit without transcoding to an intermediate like prores
    Quote Quote  
  17. Yeah, sorry I knew what you meant. I just meant to say that it can't even import the footage without a re-encode anyways.
    Quote Quote  
  18. Member turk690's Avatar
    Join Date
    Jul 2003
    Location
    ON, Canada
    Search Comp PM
    Working with AVCHD is always a resource-hungry, inexact (frame-wise) scenario, and as I've experienced, try as you might, there is really no smart-render choice anywhere. The best workaround for me always has simply been to transcode into an intermediate format with something like NeoScene. This way, any destruction to quality is held to a minimum, editing can now be frame-exact, and the whole process is way faster. Loosely compared, it's like encoding a *.jpg back to *.bmp before tinkering with it; the quality will not improve but degradation while editing is less than if opened and saved to *.jpg. Converting AVCHD to *.avi in the same manner is one extra-huffing step in NLE and can create humongous files but AVCHD, as it stands now, is virtually a fact of life where video is concerned and anyone even dabbling in it in some way will have to get a transcoding app sooner or later. Possibly until we have 256 CPU cores and all that, expecting to native edit and smart render AVCHD (even with a program that says it does) to be a fun and smooth experience is presently unrealistic.
    For the nth time, with the possible exception of certain Intel processors, I don't have/ever owned anything whose name starts with "i".
    Quote Quote  
  19. Originally Posted by turk690 View Post
    Working with AVCHD is always a resource-hungry, inexact (frame-wise) scenario, and as I've experienced, try as you might, there is really no smart-render choice anywhere. The best workaround for me always has simply been to transcode into an intermediate format with something like NeoScene. This way, any destruction to quality is held to a minimum, editing can now be frame-exact, and the whole process is way faster. Loosely compared, it's like encoding a *.jpg back to *.bmp before tinkering with it; the quality will not improve but degradation while editing is less than if opened and saved to *.jpg. Converting AVCHD to *.avi in the same manner is one extra-huffing step in NLE and can create humongous files but AVCHD, as it stands now, is virtually a fact of life where video is concerned and anyone even dabbling in it in some way will have to get a transcoding app sooner or later. Possibly until we have 256 CPU cores and all that, expecting to native edit and smart render AVCHD (even with a program that says it does) to be a fun and smooth experience is presently unrealistic.
    Thanks for the reply. Since I have Final Cut, would converting to an Apple ProRes codec work just as well? Also, what would be the best process to get the file back to an AVCHD format from Final Cut once it's edited?
    Quote Quote  
  20. prores 422 will give similar functionality to neoscene , both are 10-bit 4:2:2 Y'CbCr formats

    you're not doing any serious editing, just swapping 2 scenes, so using an intermediate might be a waste of time IMO (but you don't really have a choice right now with final cut)

    I think you export using compressor and the blu-ray template (I don't think there is one strictly for AVCHD) - I would ask in the mac forum for specifics, as I don't use final cut much and I don't have a mac at home
    Quote Quote  
  21. Originally Posted by poisondeathray View Post
    prores 422 will give similar functionality to neoscene , both are 10-bit 4:2:2 Y'CbCr formats

    you're not doing any serious editing, just swapping 2 scenes, so using an intermediate might be a waste of time IMO (but you don't really have a choice right now with final cut)

    I think you export using compressor and the blu-ray template (I don't think there is one strictly for AVCHD) - I would ask in the mac forum for specifics, as I don't use final cut much and I don't have a mac at home
    Thanks. I'll ask around in that forum once I'm ready to export.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!