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 > Video Encoding > MPEG-4 Encoder GUIs

Reply
 
Thread Tools Search this Thread Display Modes
Old 4th July 2006, 00:45   #1  |  Link
tomos
Registered User
 
Join Date: Feb 2002
Location: UK
Posts: 534
Want to use MEGUI/x264 for something but cant.

Right now, i encode my caps 3 at a time for 1 dvd. i use x264 via vdubmod to encode. basically, i do 1 pass across all 3 clips together, and the 2nd pass to individual clips.

i.e 1st pass frame 1 - 30
and 2nd pass - frame 1 - 10, then another clip from frame 11 - 20, and 3rd clip frame 21 - 30.

to get better quality i would like to use megui with x264 as opposed to vfw but i need to be able to split the encoded mp4 video file.

i cant see any way of doing this in megui. only using zones which afaik, doesnt create seperate files. i've also checked mkvmerge and while it does let me specify a time to split the file, it isnt frame specific.

ok, that took a lot more writing than i though
anyone know anyway of doing what i need here? either frame specific cutting on mp4 video files, or using megui to split the video as above?

Last edited by tomos; 4th July 2006 at 00:52.
tomos is offline   Reply With Quote
Old 4th July 2006, 01:33   #2  |  Link
berrinam
Registered User
 
berrinam's Avatar
 
Join Date: Apr 2005
Posts: 1,740
You can't do it frame-accurately while also keeping the frame allocation decided by the first pass, unless you are exceptionally lucky, because you can only split on GOP boundaries, which are determined by the first pass.

So you have a few choices:
  • Encode the whole video as two passes and then cut it. You'll just have to accept the slightly inaccurate splitting.
  • Encode with CRF (constant quality) and ignore filesize.
  • Do a test encode of the three segments with CRF. This will then give you an idea of the relative sizes to make each of the files. Then, keep those relative sizes, but scale them down to fit the target size you want. That gives you the 'optimum' bitrate for each of your three segments. Then, just encode 2pass at those bitrates.
berrinam is offline   Reply With Quote
Old 4th July 2006, 14:55   #3  |  Link
tomos
Registered User
 
Join Date: Feb 2002
Location: UK
Posts: 534
ta for the reply,

constant quality is simply not an option really. the other options of encoding each segment individually is also not something i could do. i want to spread the bitrate over the entire video and this would defeat that purpose.

on a positive note, i tried the splitting in mkvmerge and while it wasnt perfect, it wasnt noticeable to me so i'll use that. as long as i keep the original timestamps i should be ok with that i think
tomos is offline   Reply With Quote
Old 4th July 2006, 16:00   #4  |  Link
sysKin
Registered User
 
sysKin's Avatar
 
Join Date: Jun 2002
Location: Adelaide, Australia
Posts: 1,167
Quote:
Originally Posted by tomos
i.e 1st pass frame 1 - 30
and 2nd pass - frame 1 - 10, then another clip from frame 11 - 20, and 3rd clip frame 21 - 30.
AAAh wait - so you used the original 1st pass all the time but with different clips for second pass? This could never work! unless you cut the first pass manually at corresponding frames (which should not work either because frame-accurate stuff in VfW doesn't work).
__________________
Visit #xvid or #x264 at irc.freenode.net
sysKin is offline   Reply With Quote
Old 4th July 2006, 18:39   #5  |  Link
tomos
Registered User
 
Join Date: Feb 2002
Location: UK
Posts: 534
works in VFW with x264 and divx/xvid
tomos is offline   Reply With Quote
Old 4th July 2006, 22:47   #6  |  Link
berrinam
Registered User
 
berrinam's Avatar
 
Join Date: Apr 2005
Posts: 1,740
Quote:
Originally Posted by tomos
ta for the reply,

constant quality is simply not an option really. the other options of encoding each segment individually is also not something i could do. i want to spread the bitrate over the entire video and this would defeat that purpose.
My third suggestion would allow the bitrate to be spread while encoding properly. Perhaps you misunderstood: use crf to find out the ratio of the required bitrates, and then you take the job of the rate control and choose the bitrates for each segment accordingly. But since you've had success with mkvmerge, it doesn't matter.

Quote:
works in VFW with x264 and divx/xvid
It probably seemed to work, but the bitrate distribution would be wrong, causing much worse quality than possible.
berrinam is offline   Reply With Quote
Old 6th July 2006, 10:14   #7  |  Link
sysKin
Registered User
 
sysKin's Avatar
 
Join Date: Jun 2002
Location: Adelaide, Australia
Posts: 1,167
Quote:
Originally Posted by tomos
works in VFW with x264 and divx/xvid
It absolutely 100% does not work on XviD I mean sure, encoding kept going, but the result was absolutely random (except for the first clip of course) and quality was horrible.

It's amazing what some people can think of >_<

In short: you could not do it in VfW and you can't do it with MeGUI either........

[edit] this is perhaps a good proof that XviD's 2pass2 must do some sanity checks on video - same resolution and length (+/- couple of frames for b-frame lag safety) are a must...
__________________
Visit #xvid or #x264 at irc.freenode.net

Last edited by sysKin; 6th July 2006 at 10:19.
sysKin is offline   Reply With Quote
Old 7th July 2006, 15:40   #8  |  Link
tomos
Registered User
 
Join Date: Feb 2002
Location: UK
Posts: 534
the only thing now that i need to fix, is to be able to insert a keyframe to make the splitting a little more precise. would 'zones' help at all in this?

i mean could i just add the different sections into megui as zones but leave settings in there as default, encode as normal with 2 passes and then split with mkvmerge?
tomos is offline   Reply With Quote
Old 7th July 2006, 23:53   #9  |  Link
berrinam
Registered User
 
berrinam's Avatar
 
Join Date: Apr 2005
Posts: 1,740
There's no way to force a keyframe at a specific location in x264 (that I'm aware of).
berrinam is offline   Reply With Quote
Old 8th July 2006, 02:06   #10  |  Link
tomos
Registered User
 
Join Date: Feb 2002
Location: UK
Posts: 534
i was hoping that since, i assume, zones let you have different quality/bitrate for different sections - wouldnt that *have* to have a keyframe to seperate the zones?
tomos is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 12:43.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.