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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > New and alternative a/v containers

Reply
 
Thread Tools Display Modes
Old 17th November 2006, 22:22   #1  |  Link
oddball
Registered User
 
Join Date: Jan 2002
Posts: 871
MKV x264 editor?

My search results are not giving me anything to work with. Is there an MKV editor (Show, play, cut, append, keyframe advance etc) for x264 MKV files?
oddball is offline   Reply With Quote
Old 17th November 2006, 23:21   #2  |  Link
killerhex
Registered User
 
Join Date: Dec 2005
Posts: 375
not exactly

to edit the x264 you probbably will have to extract it first
killerhex is offline   Reply With Quote
Old 18th November 2006, 00:21   #3  |  Link
oddball
Registered User
 
Join Date: Jan 2002
Posts: 871
That would throw any audio and subs out of sync. I am very surprised there is no proper solution yet.
oddball is offline   Reply With Quote
Old 18th November 2006, 11:49   #4  |  Link
bond
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
bond is offline   Reply With Quote
Old 18th November 2006, 13:43   #5  |  Link
LeMoi
Registered User
 
Join Date: Sep 2004
Location: France
Posts: 215
MKVToolnix can append/cut mkv files...
LeMoi is offline   Reply With Quote
Old 18th November 2006, 23:46   #6  |  Link
shon3i
BluRay Maniac
 
shon3i's Avatar
 
Join Date: Dec 2005
Posts: 1,710
Quote:
Originally Posted by LeMoi View Post
MKVToolnix can append/cut mkv files...
Yes but without visual control.
shon3i is offline   Reply With Quote
Old 18th November 2006, 23:49   #7  |  Link
LeMoi
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:
DirectShowSource("file.mkv",fps=xx)
then you'll be able to see picture with its tilecodes
LeMoi is offline   Reply With Quote
Old 26th September 2007, 14:11   #8  |  Link
szabi
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
szabi is offline   Reply With Quote
Old 28th September 2007, 14:19   #9  |  Link
SpAwN_gUy
Junglist
 
SpAwN_gUy's Avatar
 
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)
SpAwN_gUy is offline   Reply With Quote
Old 29th September 2007, 19:51   #10  |  Link
szabi
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
szabi is offline   Reply With Quote
Old 29th September 2007, 22:51   #11  |  Link
chros
Registered User
 
chros's Avatar
 
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
chros is offline   Reply With Quote
Old 29th September 2007, 23:05   #12  |  Link
LeMoi
Registered User
 
Join Date: Sep 2004
Location: France
Posts: 215
And i can add that, if you want to know the milliseconds, just press CTRL+G when you are at the frame, and exact time will be displayed
LeMoi is offline   Reply With Quote
Old 30th September 2007, 00:02   #13  |  Link
Placio74
VideoAudio
 
Placio74's Avatar
 
Join Date: Feb 2007
Location: Poland
Posts: 214
Quote:
Originally Posted by bond View Post
there is no solution for mkv

try remuxing to mp4 and edit it in avidemux
Now Avidemux can open, edit and save MKV (with AVC).

Still problem with display image when use slider (not when use arrows), but...
Placio74 is offline   Reply With Quote
Old 30th September 2007, 00:27   #14  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Germany
Posts: 7,328
Quote:
Originally Posted by Placio74 View Post
Still problem with display image when use slider (not when use arrows), but...
Try Tools -> Rebuild Frames

Last edited by LoRd_MuldeR; 30th September 2007 at 00:32.
LoRd_MuldeR is online now   Reply With Quote
Old 30th September 2007, 01:47   #15  |  Link
Placio74
VideoAudio
 
Placio74's Avatar
 
Join Date: Feb 2007
Location: Poland
Posts: 214
Quote:
Originally Posted by LoRd_MuldeR View Post
Try Tools -> Rebuild Frames
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
Placio74 is offline   Reply With Quote
Old 30th September 2007, 04:31   #16  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
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
foxyshadis is offline   Reply With Quote
Old 30th September 2007, 12:25   #17  |  Link
chros
Registered User
 
chros's Avatar
 
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 ...
chros is offline   Reply With Quote
Old 30th September 2007, 14:13   #18  |  Link
pcjco04
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.
pcjco04 is offline   Reply With Quote
Old 30th September 2007, 14:56   #19  |  Link
Placio74
VideoAudio
 
Placio74's Avatar
 
Join Date: Feb 2007
Location: Poland
Posts: 214
Quote:
Originally Posted by chros View Post
...
But it's far from perfect: ...
Yes. Not perfect, but... You try latest SVN build (rev 3600 at this moment)?
Placio74 is offline   Reply With Quote
Old 30th September 2007, 17:47   #20  |  Link
chros
Registered User
 
chros's Avatar
 
Join Date: Mar 2002
Posts: 556
Quote:
Originally Posted by Placio74 View Post
Yes. Not perfect, but... You try latest SVN build (rev 3600 at this moment)?
Yes, I have tried rev 3600 build by LoRd_MuldeR ...

@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.
chros is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 15:20.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.