View Full Version : editing scenes out of blu-ray movies
davo_wavo
13th October 2010, 06:49
Hello Everyone,
There are a few of my blu-ray movies that I really like....but they have certain scenes in them that I think are stupid or pointless.
So I would like to edit those scenes out of the movies. Eventually, I'd like to learn to burn those edited movies onto new blu-ray disks, but I am not so concerned about that at this point. I would be happy enough just to access the edited movies on my HD for now.
I'll only need one audio track, and no subtitles for the movies.
Any relative advice, or links, would be greatly appreciated.
Thanks.
Inspector.Gadget
13th October 2010, 15:53
MultiAVCHD can do BD -> Edited BD stuff, I believe. For watching on your hard drive, I'd recommend doing the usual Blu-ray -> x264+audio-in-MKV workflow and then cutting the annoying scenes with mkvmergeGUI by timecodes. As an alternative, you can load your audio and video in Avisynth before encoding and delete scenes with Trim(). This does however force you to re-encode the audio.
If file size is no concern, then you can use MakeMKV directly on the disc to get a Matroska file of the main movie with audio and subs, and then cut that by timecode with MKVMergeGUI.
davo_wavo
13th October 2010, 20:10
Thanks for the response, Inspector Gadget.
About a month ago, I experimented with two different x264 mkv files in mkvMerge GUI, splitting in several places -- using I-frame timecodes. The first split came out perfect, but *all* other subsequent splits were off by a number of seconds (I remember one cut being off by 7 seconds). I read where someone else had the same problem. Have you heard of others being successful with this particular approach? I would love to be able to use it, if I could somehow get it to work right. I forget which program I used to establish the I-frames to be used for the splits, but I do remember it was kind of flaky....the video image would turn blank at times. Maybe the timecodes that it represented were wrong. I hope that I've made good enough sense here :)
Since I'm on the subject, what program would be recommended to use in order to establish proper I-frames to be used for splits/edits?
As for "the usual Blu-ray -> x264+audio-in-MKV workflow.....", what is the link for the instructions on how to do this? I remember seeing a relative thread here, but it was kind of old.
Thanks.
Inspector.Gadget
13th October 2010, 21:06
You may have to adjust your timecodes to be non I-frame so MKVMerge rounds to the desired I-frame; I'm not sure exactly how the internal logic works (ask Mosu). I'd start by picking a time that looks close enough, regardless of frame type, and adjusting from there if the cut is too early or late. Also, IIRC Blu-ray uses short GOPs so it shouldn't be too tough to hit "close enough" cuts. Avidemux will show frame type but won't be stable on H.264 until the 2.6 branch. I forget whether it shows timecodes.
As far as Blu-ray to x264, I typically break it down by video codec:
MPEG-2 Blu-ray -> Demux with eac3to to M2V -> Index with DGIndex -> Avisynth -> x264
VC-1 Blu-ray -> Demux with eac3to to MKV-> DGIndexNV or ffmsindex -> Avisynth -> x264
AVC Blu-ray -> Demux with eac3to to MKV -> DGAVCDec, DGIndexNV, or ffmsindex -> Avisynth -> x264
If I do anything to audio other than demux, I'll strip the core of an HD track with eac3to. For subs, I use SupRip to OCR to SRT and then mux the whole thing with MKVMerge. Most of the MPEG-4 GUIs in the relevant forum here wrap this workflow for you but I still prefer to do it manually.
davo_wavo
14th October 2010, 01:04
Thanks again Inspector.Gadget.
I've been playing around more with mkvmerge GUI. It looks like the I-frames are indeed about every 7 to 10 seconds, or so....which is weird (I used avidemux to locate I-frames, etc.). Mkvmerge will jump to the following I-frame regardless as to what b-frame, or p-frame you pursue using as a splitting point. :mad: No matter what frame you choose, it won't ever jump back to the previous I-frame when it splits.
Of course narrowing the split down to even one second wouldn't really be good enough for a reasonably smooth edit.
I guess I'll look into Avisynth next.
Regards,
Dave
Inspector.Gadget
14th October 2010, 02:31
Hmm...maybe an I frame versus IDR frame problem. I don't have any relevant experience, as most of the H.264-in-MKV that I edit is encoded by me without regard to Blu-ray specs.
davo_wavo
14th October 2010, 03:51
Just curious: So what have you seen as far as length-of-time between I-frames that you encode?
Also,
Using Avisynth along with VirtualDub and/or Windows Media Player, it looks like only one edit is allowed.....and there is another problem, too:
My code in my american.avs file [note: the american.mkv file is 4 gigs]:
DirectShowSource("American.mkv")
Trim(0,15524,false)
#Trim(82534,123405,false)
#Trim(146941,0,false)
.....I originally tried several trims, but this didn't work at all. With one trim, it works with the video, but the audio is very very slow. It sounds like someone's stomach is grumbling (even without attempting any trims.
from Avysynth site:
Trim (clip, int first_frame, int last_frame [, bool pad_audio])
Trim trims a video clip so that it includes only the frames first_frame through last_frame. The audio is similarly trimmed so that it stays synchronized. If you pass 0 for last_frame it means "end of clip." A negative value of last_frame returns the frames from first_frame to first_frame + (- last_frame-1). This is the only way to get the very first frame!
pad_audio (default true) causes the audio stream to be padded to align with the video stream. Otherwise the tail of a short audio stream is left so. When last_frame=0 and pad_audio=false the end of the two streams remains independent.
Inspector.Gadget
14th October 2010, 14:46
Don't use DirectShowSource for edit operations, as it is known not to be frame-accurate. FFMPEGSource should handle most Matroska-wrapped content well, provided you index it with ffmsindex first (also see the documentation's note about avoiding duplicate indexing operations when using ffms for audio input). If you have an H.264 stream that doesn't use certain types of interlaced coding (most Blu-ray streams are fine; all 23.976p, 24p, 30p, 60p, etc. sources are also fine), you can also demux from MKV and use the raw stream as input to DGAVCIndex and then the .dga as input to AVCSource().
Just curious: So what have you seen as far as length-of-time between I-frames that you encode?
It varies depending on x264's internal decisions, but I've usually been setting 250 as max and 25 as min GOP size to keep seeking time reasonable.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.