Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
|
#4 | Link |
|
Moderator
![]() Join Date: Nov 2001
Posts: 9,780
|
there is no solution for mkv
try remuxing to mp4 and edit it in avidemux
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau) I know, that I know nothing (Socrates) MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide) Ogg Theora | Ogg Vorbis use WM9 today and get Micro$oft controlling the A/V market tomorrow for free |
|
|
|
|
|
#7 | Link | |
|
Registered User
Join Date: Sep 2004
Location: France
Posts: 215
|
Indeed.
You can find your cutting points with virtualdub, if you have AviSynth installed, create an .avs file, with this line Quote:
|
|
|
|
|
|
|
#8 | Link |
|
Registered User
Join Date: Nov 2004
Posts: 24
|
Hy
I run into the same situation. I tried using virtualdub and vdubmod as well but mkv file can not be opened by them. I found this this topic about usage of avisynth but DirectShowSource("file.mkv",fps=xx) did not work. The movie was encoded by x264. The last post is almost 1 year old I hope any solution exist for this problem. Such a solution would be nice like xvid-avi cutting, appending with virtualdub. ![]() Bye szabi |
|
|
|
|
|
#9 | Link |
|
Junglist
Join Date: May 2003
Location: Belarus, Minsk
Posts: 293
|
the strange thing is... like you can not predict key-frames.. even through script in VDM..
today i've managed to cut with mkvtoolnix,.. but.. i can't define where are the keyframes... parts ar or too short.. or too big.. (5k to 2Mb for 720p content)
__________________
Rule Number 6: Concentrate!!! (c)Hercules, Disney "I like to build planes.... in the air" (c) some ADV. tutorials How to Setup agent-based encoding with x264farm (the easy way) |
|
|
|
|
|
#10 | Link |
|
Registered User
Join Date: Nov 2004
Posts: 24
|
Hy
Probable you are right, there is no key frame checking possibility over avisynth script, so it would not work. Anyway I was using mkvtoolnix for splitting my x264-mkv movie. I checked where is the point in the movie which is good for splitting. (to avoid splitting in any continuous dialog or unbroken event ... and so on). When I found it, I gave this splitting position by the mkvtoolninix's function "after this duration". I was waiting for the end of this splitting, and realised that the point is not the same I marked. I did it severeal times, the splitting time was changed every time a little bit. Somtimes I got a wrong splitting point or a non workable second part or oversized part of movie. After several attempt I got a good solution. It would be nice like xvid-avi with vdub. Key-frame can be found easily, and the predicted size of the splitted movie is shown so the splitting is successful after first attempt. It is strange for me, there is no video editing program which can not give me the key-frame position with visual control in an x264-mkv movie. Imho vdub should be developed for good handling this situation, not only any avi movie but any mkv movie as well. ![]() Or mkvtoolnix should have a more advanced splitting function with visual control and key-frame stepping potential with predicted splitted movie size. ![]() Bye szabi |
|
|
|
|
|
#11 | Link |
|
Registered User
Join Date: Mar 2002
Posts: 556
|
Guide: How to cut out a portion of an mkv file from keyframe to keyframe?
Scenario:
- clip length (eg. foo.mkv): 60 min - the wanted part is in the middle: 35:05-37:42 (so it's 2 mins and 37 seconds) Required tool: - current mkvmerge (with gui) - current MPC Cutting: find out the cutting points (you must know where the keyframe is !) - use MPC with the built-in mkv splitter !!! (not Haali's one) - now you can seek to keyframes with: SHIFT+mouse or SHIFT+arrows - so seek to the closest keyframe before the cut point (where you want to cut), and look at the time at the bottom of MPC window (eg: it displays 35:00). Of course it's a rough value (we don't know anything about milliseconds), but it's not a problem ... - then seek back to the previous keyframe and see the time now (eg.: 34:50, so the clip has keyframes at every 10 seconds) - that's it !!! Now you can pick up any timecode between these 2 value, since mkvmerge automatically grab the next keyframe !!! - repeat this procedure with the 2nd cut point (at the end, eg. 37:45) - so you can enter these 2 values in mkvmerge's "...after timecodes" box: eg: 00:34:53,00:37:45 - so we got 3 files |
|
|
|
|
|
#14 | Link | |
|
Software Developer
Join Date: Jun 2005
Location: Germany
Posts: 7,328
|
Quote:
__________________
MPlayer for Win32 | Avidemux for Win32 | LameXP Audio Encoder | x264 explained | F@H | My Specs Last edited by LoRd_MuldeR; 30th September 2007 at 00:32. |
|
|
|
|
|
|
#15 | Link |
|
VideoAudio
Join Date: Feb 2007
Location: Poland
Posts: 214
|
Thank you very much!
![]() It work. Some other... wrong audio tag for Vorbis when copy audio (MKV>MKV or OGM>MKV) - A_MS/ACM. Edit: Mistake. I'm forgot install latest build. Above observation not relate to rev 3600. However, Avidemux is first editor to directly edit MKV's (contain AVC video) with visual control.
Last edited by Placio74; 1st October 2007 at 07:37. Reason: Correction |
|
|
|
|
|
#16 | Link |
|
ангел смерти
![]() Join Date: Nov 2004
Location: Oceanborn
Posts: 7,598
|
Ah, the newest version does seem to support avc w/b-frames in mkv better, cool. Still some issues with seeking backward (the frame before a keyframe will be replaced with the frame ahead instead) but seeking forward again it works fine. Quick-seeking along the timeline is still off quite a bit, but a single seek back will correct it.
I suppose I should report to mean, not here.
__________________
There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order. ~ Ed Howdershelt |
|
|
|
|
|
#17 | Link |
|
Registered User
Join Date: Mar 2002
Posts: 556
|
Well this is a wonderful news ... !!!
But it's far from perfect: I have tried to cut an anime x264-HE-AAC encode (b-frames), and it decodes wrongly on the preview window (no matter which mode I have choosen, and whether I'va applied the Rebuild command). And the cut-file has the right audio segment but not the video ... So till it works perfectly, I try to convince Mosu to implement a cut feature based on timecodes (I think already almost everything is implemented in mkvmerge for it) without visual control ...
|
|
|
|
|
|
#18 | Link |
|
Registered User
Join Date: Mar 2004
Posts: 43
|
MPC + mkvmerge to split MKV with AVC
Hi,
For anime with AVC, I use to remove opening and ending with MPC for the visual control (I pause the video , then seek with SHIFT+LEFT or SHIFT+RIGHT to find what time I have to cut) and a DOS script using mkvmerge to split the video. Code:
@ECHO OFF
set mkvmerge="%ProgramFiles%\Divx_Prog\megui\tools\mkvmerge\mkvmerge.exe"
if "%~1" == "" (
SET INPUT=
SET /P INPUT=INPUT ?
) else (
SET INPUT=%1
)
if "%2" == "" (
SET OpStart=
SET /P OpStart= Opening Start Time [0:00.000] ?
) else (
SET OpStart=%2
)
if "%OpStart%" == "" SET OpStart=0
if "%3" == "" (
SET OpEnd=
SET /P OpEnd= Opening End Time [1:30.000] ?
) else (
SET OpEnd=%3
)
if "%OpEnd%" == "" SET OpEnd=1:30.000
if "%4" == "" (
SET EndStart=
SET /P EndStart= Ending Start Time [0:00.000] ?
) else (
SET EndStart=%4
)
if "%EndStart%" == "" SET EndStart=0
if "%OpStart%" == "0" (
if "%OpEnd%" == "0" (
if not "%EndStart%" == "0" (
%mkvmerge% -o %INPUT%_new.mkv %INPUT% --split timecodes:%EndStart%
del /Q %INPUT%_new-002.mkv
)
) else (
if not "%EndStart%" == "0" (
%mkvmerge% -o %INPUT%_new.mkv %INPUT% --split timecodes:%OpEnd%,%EndStart%
del /Q %INPUT%_new-001.mkv %INPUT%_new-003.mkv
) else (
%mkvmerge% -o %INPUT%_new.mkv %INPUT% --split timecodes:%OpEnd%
del /Q %INPUT%_new-001.mkv
)
)
) else (
if not "%EndStart%" == "0" (
%mkvmerge% -o %INPUT%_new.mkv %INPUT% --split timecodes:%OpStart%,%OpEnd%,%EndStart%
) else (
%mkvmerge% -o %INPUT%_new.mkv %INPUT% --split timecodes:%OpStart%,%OpEnd%
)
%mkvmerge% -o %INPUT%_new.mkv %INPUT%_new-001.mkv +%INPUT%_new-003.mkv
del /Q %INPUT%_new-001.mkv %INPUT%_new-002.mkv %INPUT%_new-003.mkv %INPUT%_new-004.mkv
)
Last edited by pcjco04; 12th June 2008 at 23:28. |
|
|
|
|
|
#20 | Link | |
|
Registered User
Join Date: Mar 2002
Posts: 556
|
Quote:
@pcjco04: thank you for your script, I'll look into it ... EDIT: Perhaps you can read this topic too ... (http://forum.doom9.org/showthread.php?t=63956) Last edited by chros; 30th September 2007 at 19:23. |
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|