Log in

View Full Version : Stills from AVS?


lark
14th April 2005, 01:04
i guess rb takes stills directly from the original VOBs and not using the avs. would it be a big job to encode them from the avs? i just got an interlaced frame wouldn't like to see that for half a sec :-(
instead i'd like to add a deinterlacer into the avs and get a 'clean' frame.

as my other wishes, this is not high priority.

regards
t :)

jdobbs
14th April 2005, 03:55
You could put this in as a filter:

SelectEvery(12,1)

But you will also have to force the encoding be all I-Frames.

lark
14th April 2005, 11:36
and RB would make sure that the clip has the correct length even tho it has only 1/12 of the frames?
cool.

thx
t :)

jdobbs
14th April 2005, 11:55
Not sure, I'd have to try it. Actually this would probably be better for PAL:

SelectEvery(25,2,0,12)

and NTSC (FILM):

SelectEvery(24,2,0,12)

or NTSC (29.97fps):

SelectEvery(30,2,0,15)

This command slows the encode dramatically... that's the main reason I decided to use I-FRAMES from the original.

You'd also have to add "Action=2" to the REBUILDER.INI file for that specific segment. Again -- they'd have to be encoded as all I-FRAMES. In CCE I think you can do that by setting gop_m=0 and gop_nm=0 in the ECL file.

Try it and let me know how it comes out. But my guess is you'll get a lot more combed/interlaced frames than you got by using the original I-FRAMES.

lark
14th April 2005, 12:42
ok, thx, i'll give it a try during the next night ;-)

You'd also have to add "Action=2" to the REBUILDER.INI file for that specific segment.
i guess you mean the REBUILDER.INF file ;-)
but wouldn't that instruct rb to take the stills from the vobs?
or did you mean that i'll add that after encoding, so that rebuilding phase knows, how to deal with the segment?

But my guess is you'll get a lot more combed/interlaced frames than you got by using the original I-FRAMES.
i didn't quite get this. obviously i'm going to add a deinterlacer into the AVS...

regards
t :)

jdobbs
14th April 2005, 15:40
but wouldn't that instruct rb to take the stills from the vobs? Hmmm... yes it would. It wouldn't work.

lark
14th April 2005, 18:48
i almost got there, but not quite ;-)
1st of all, it was SelectEvery(25,0,12).
then i had to change frame_last & encode_last in the ecl file to correspond new frame count (459). and finally gop_m=1 and gop_nm=1 to get only I-frames.

that's about encoding. fine & done.

for rebuilding, i had to add
Action=2
Stills=459

to the rebuilder.inf and i managed to rebuild the dvd,
but when i tried to play it, that segment played (fast forwarded) in 20 secs or so (perhaps 18.36s) and the last frame was shown until the end of the segment (audio was fine).

any idea, how to stretch the video to correct length?

regards
t :)

jdobbs
14th April 2005, 18:55
No... the reason it is playing so fast is because the PTSs in the video are set for every 25th of a second... (3600 clock ticks) -- they would have to be manipulated to be set for 45000 ticks...

lark
15th April 2005, 08:37
thx, that explains, why the segment's video played for 36s (not 18s as i said earlier).

obviously the questions is, is there any neat way to change the PTSs?

regards
t :)

lark
15th April 2005, 14:42
if i've understood correctly, those PTS codes are added when the dvd is rebuilt since they are in the video pack header and not in the mpeg sequence header.

that makes me wonder, why rb didn't manipulate those for my m2v even tho the action was set to 2... how does it know that it must do that for m2v's that have been extracted by itself?

regards
t :)

jdobbs
15th April 2005, 15:41
Yep. They're in the extension to the PES headers. It's a little tricky trying to change them. It may have just a PTS and sometimes a DTS/PTS. The two MSBs of the byte at offset 7 tell you which is true. The MPUCODER site is a good reference.


When using the I-Frames from the original stream, you just have to insert new values.

PTS values are calculated based upon frame rate when RB is rebuilding. It needs to know when that isn't true in order to change the timing of the DTS/PTS.

lark
15th April 2005, 15:57
how does rb know that it should patch the PTS values i.e. that the segment contains stills every 1/s sec and not the whole movie (e.g. 25fps)?

i thought that setting action=2 would be enough, but obviously it wasn't.

or does it just remove all but the I frame from every video pack and just use the PTS time that was already in the vide pack? that's nice & clever. but why does it make the m2v file in the first place for such segments? and why didn't it do the same thing fot my segment?

regards
t :)