Log in

View Full Version : splitting onto two CDs quiet difficult sometimes...


crOOk
17th March 2003, 19:13
Some people might say this is the job of a stats editor. Well, it is. But wouldn't it make encoding of two CD rips a lot easier if XviD would automatically insert ONE keyframe right in the middle of the movie. Let's say, if the movie's going to be 1200000kB, a keyframe at 600000kB would be very useful for splitting purposes, wouldn't it? I sometimes have to encode the middle of a movie a second time, e.g. when CD1 is 707000kB and CD2 is 727000kB (like it was the case today). I guess my request will be turned down anyway, but at least I tried...

doug_s
17th March 2003, 19:44
I haven't tried it but the statsreader included with the windows version of xvid looks like it has a way to insert a keyframe at a specific place in the second pass output.

Has anybody tried it ?

crOOk
17th March 2003, 19:54
The problem is, you don't want to insert a keyframe at a certain point in the movie, but after a specific number of bytes...

ookzDVD
18th March 2003, 08:58
I've been using Ogmuxer for splitting with no problem.

kilg0r3
18th March 2003, 09:57
I have also been experiencing difficulties since the time when the b-frame code had been introduced.

No matter if I use Nic's Ogg Cutter or VDM, I basically never really know where, in the movie, I really am. Jumping to kframes doesnt help. If I do so and then seek forward for only one frame the next frame shown belongs to an entirely different scene.

zulu
18th March 2003, 09:59
Originally posted by crOOk
The problem is, you don't want to insert a keyframe at a certain point in the movie, but after a specific number of bytes...
if you want the keyframe in the middle of your movie why don't you set it at number_of_frames/2 ?

kilg0r3
18th March 2003, 11:34
he wants it in the middle of the bitstream. in order to have two equally large chunks of data. the frame number is irrelevant in this context.

kilg0r3
18th March 2003, 11:35
Originally posted by ookzDVD
I've been using Ogmuxer for splitting with no problem.

I.e., you live with stalled frames at the beginning of the second part. Right?

zulu
18th March 2003, 11:53
Originally posted by kilg0r3
he wants it in the middle of the bitstream. in order to have two equally large chunks of data. the frame number is irrelevant in this context.
hehe..you're right of course...time to get a cup of coffee and wake up :D

bilu
18th March 2003, 12:12
http://cyrius.bunkus.org


Example :

OGMCutter -c 0 -s 702M "C:\My Big File.ogm"

will open the OGM file, try to find where to cut (on video keyframes of course) to
obtain files not exceeding 702MB, and then create each part.
Each file's name will end with " - Part %n%.ogm" where %n% is the number of the part.


Best regards,
Bilu

Didée
18th March 2003, 12:35
Now what if you have one of those "five-to-ten-minutes-sequences-without-one-single-keyframe" just in the middle of your movie ...

bilu
18th March 2003, 12:45
That's not a problem.

Since it can't exceed 702 MB (in the example) it will cut BEFORE that scene :)

Bilu

kilg0r3
18th March 2003, 12:56
Originally posted by bilu
That's not a problem.

Since it can't exceed 702 MB (in the example) it will cut BEFORE that scene :)

Bilu

Remains a problem because the resulting second part won't fit on the second cd if the sequence is too long.

A tool that could construct a key iframe from a preceding sequence IPP...P and substitute an existing pframe with the constructed iframe would be cool. But it is one of those things that quite probabely will never be coded.

Or, an extension of a statsfile viewer/editor that can do the following things

Scale the stats file according to ...
(a) ... the desired final file size _and_
(b) ... the chosen curve algorithm

Audio Stream(s)
(a) Load the relevant Audio files (mp3, vorbis, aac, ...)
(b) Parse the audio file(s). For, most of them are vbr. so that, playing time is not constantly related to filesize _or_
(c) It assumes CBR encoding -> inaccuracy

Editing
Progi should let you scroll through entire file while indicating the amount of 'passed by' data and let you insert a keyframe at the wished position
IIRC if you load the first pass into vdm and load the relvant audio files, you can easily determine the frame where to cut because vdm shows the 'passed by' amount of bits.

EDIT: this does not work of course since the first pass video i not scaled:o. It seems, however, to be a simple feature, to multiply the first pass size with the compression ratio and to indicate the resulting figure beside the actual size of the video. This pertains only to linear scaling of course.

bilu
18th March 2003, 13:18
I think VDMod could handle well such a feature.
Why don't you try submitting a proposal there? ;)

Bilu

crOOk
18th March 2003, 15:00
@kilg0r3

Thanx for the support, I couldn't have explained the problem more accurate.

JasonFly
18th March 2003, 23:04
I personnaly use Oggcut to cut ogm files( sometimes with two or more audio tracks and it works perfectly.

That's true that it's not very fast in front of VdubMod but I'm not sure that VdubMod is free of bugs in cutting ogm or ogg files whereas Oggcut has been made by Tobias if I remember well and it works perfectly.

I use the following procedure:
Frst I use Vdubmod(because it is very useful for this) to cut my final ogm file(video + audio) approximately at 700Mb(using save segmented avi at 700Mb).
Then I try to locate a good keyframe near to the vdubmod splitting point.
And then I cut usong oggcut by setting the keyframe where i want to cut.

That's also true that oggcut is not very "easy" to set the correct keyframe.Theere is jsut a slider to move through the whole film and it not very easy to catch the wanted keyframe.
But it's possible and the result is perfect.

PS:
For the second part of the movie you have to select the previous keyframe because oggcut will always cut starting to the next keyframe you have selected.
This is not happening for the first part because you select the beginning of the movie(like in vdub:go to start...)

Well, I have shared my experinece and I hope this will help you.

bilu
18th March 2003, 23:45
@JasonFly

The problem that crOOk and kilg0r3 are complaining is not about cutting on a keyframe, but putting a keyframe exactly at the middle of the stream so they can have two splits with the same size. Doing it your way (it's mine too ;) ) has the risk of getting a long scene without keyframes that would make one of the splits too long.

Best regards,
Bilu

JasonFly
18th March 2003, 23:57
Yes, i have understand but I don't see any interest to cut exactly at the middle.
Nothing is manking me angry than a cut in a bad place(I mean in the middle of a scene)
Cutting exactly at the half size doesn't give you many chance to fall at a corect place.I managed not to loss more than 5-15 MB of space on with my method and 15 is more or less 20-40 s of a movie on two cd.I rarely have trouble cutting in an appropriate place with this.

But that's true that this doesn't answer to the topic so, sorry.

kilg0r3
19th March 2003, 09:00
Originally posted by bilu
complaining
Please bilu try to avoid the word 'complain'. It is apt to make touchy people start raving with rage. many a flame war has been started by it.:)

bilu
19th March 2003, 11:00
OK :) Allways learning ... :D

Bilu

crOOk
19th March 2003, 18:35
originally posted by JasonFly
I managed not to loss more than 5-15 MB of space on with my method

That is about 2% the size of an eighty minute cdr...

originally posted by crOOk
I sometimes have to encode the middle of a movie a second time, e.g. when CD1 is 707000kB and CD2 is 727000kB

@JasonFly
Some people, including me, think losing 2% of space is way too much. Especially when encoding long movies having an undersized result is just not an option to those who care about quality ;)

JasonFly
19th March 2003, 19:20
That's a point of view and i respect it.

PS
When I say 5-15Mb I talk on a two cd encode and 5-15 is the total that is wasted on the 2cds.
It's only 1% on the total space and that hasn't a high inluence on quality for "normal" long movie (<3h00).
For those movies, the bitrate is quite high and this quality usually fits my wish.

crOOk
20th March 2003, 18:03
originally posted by JasonFly
That's a point of view and i respect it.

And so do I. :)

torsius
24th March 2003, 23:55
i too used to dread the splitting of movies that i had sized exactly to fit precisely on 2 cd's or whatever, but i ran into a fantastic tool called AVIMUX. it has a fantastic option of splitting avi's into specified chunks while it muxes video with mp3/ac3/dts whatever :)

recommend you give it a shot, and usually tell xvid to pop in a keyframe every 30 seconds or so, so as to aviod very long stretches without a keyframe that can cause some nasty artifacting along with the problem of splitting if that is necessary.

sorry, it's actually called Avi-Mux GUI, check it out

crOOk
3rd April 2003, 16:11
THX for your suggestion, I'll try AVIMUX GUI next time I'm doing a 2CD encode.