Re: [CinCVS] Length of MPEG2 files

2007-05-28 Thread mskala
On Sun, 22 Apr 2007, Scott C. Frase wrote:
> Mark,

It's actually Matthew or Matt...

> Thanks for taking the time to investigate this.  It will be a big help
> to get it resolved.

Okay, after doing more careful tests, I think I've determined that for a
change, it's all the *other* software that's broken, not Cinelerra.  Here
are my frame counts for the same file containing an MPEG2 Elementary
Stream extracted from one chapter of a DVD:

mpeg3toc/mpeg3dump:  18309
transcode:   17572
mplayer (default):   18068
mplayer -fps 29.97:  18314

The audio for the same chapter, when extracted and played, takes 610.63
seconds, which at 29.97 frames per second works out to 18300 frames.
Cinelerra agrees with mpeg3toc/mpeg3dump.  So although none of these match
up perfectly, Cinelerra seems to be closest to correct; I think it's the
other packages that are at fault.  (There go a couple days' worth of CPU
time I already spent processing the footage with transcode and mencoder,
but sorting this issue out is probably worth it.)

Before doing the audio test I experimented with modifying the file
libmpeg3/mpeg3vtrack.c, which contains the routine that mpeg3toc uses to
record frames in its index.  I was able to get a TOC file with frame count
very close to transcode's (I didn't write down the exact number) by making
it store the previous frame's offset in a static variable and then
silently return without recording a new frame, if it were called a second
time with the same offset.  So it definitely appears that most if not all
of the discrepancy comes from some frames being somehow duplicated or read
twice.  I've also gotten some messages about duplicate frames from
mencoder when trying to process this file.  So all is clearly not well
with the file.  Maybe it is at least partly soft-pulldown after all, and
different software has different ways of dealing with that.  But based on
the audio length evidence, I think that these duplicate frames are
supposed to be there, and Cinelerra is correctly handling them.

I made a clip of the start of the file using dd, which was the only
software for clipping it about which I was confident of not changing the
format at all.  That clip is here:
   http://ansuz.sooke.bc.ca/temporary/ev-clip.m2v
if anyone wants to take a look at it.  Grab it soon, because I won't leave
it up indefinitely.  It's just barely long enough to show clear
discrepancies among the software packages, and that also is just long
enough to include one of the spots where mplayer complains about
telecining and frame rate changes.  I don't know if that's a coincidence,
or critical to what's going on.  Frame counts for the sample clip:

mplayer: 241
mplayer -fps 29.970: 244
transcode:   230
mpeg3toc/mpeg3dump:  245
cinelerra:   245

The content is the start of title 1, chapter 2, of ADV Films's North
American release of Neon Genesis Evangelion Collection 0:3.

> By the way, what tools are you using to investigate the toc?  (Maybe I
> can learn something new)?

What I did was look at the files with less and try to figure out the
format from that.  It seems pretty clear that there's a header and then a
bunch of 8-byte numbers that increment from zero.  Then to look for
duplicates I wrote a Perl one-liner.
-- 
Matthew Skala
[EMAIL PROTECTED]Embrace and defend.
http://ansuz.sooke.bc.ca/

___
Cinelerra mailing list
Cinelerra@skolelinux.no
https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra


Re: [CinCVS] Length of MPEG2 files

2007-05-28 Thread Scott C. Frase
Mark,
Thanks for taking the time to investigate this.  It will be a big help
to get it resolved.

By the way, what tools are you using to investigate the toc?  (Maybe I
can learn something new)?

scott


On Mon, 2007-05-28 at 14:55 -0400, [EMAIL PROTECTED] wrote:
> On Sat, 21 Apr 2007, Scott C. Frase wrote:
> > I've noticed similar things with DVD resolution MPEG2 video, though I am
> > not sure what to do about it.
> 
> I did some more investigating and found that the .toc file, which consists
> mostly of 8-byte records, has a few of those records records repeated
> twice.  The number of repeated records in the .toc seems to be pretty
> close to the number of extra frames Cinelerra sees as compared to my other
> software.  I probably won't be able to try this until I get home tonight
> (am currently sshed in from work), but I plan to try hacking mpeg3toc to
> detect when it's about to write a record that duplicates the previous one
> it wrote, and just not do that.
> 
> I also determined that Cinelerra's view of the video is already off by
> several frames before the first point at which mplayer starts complaining
> about weird telecine settings, so I think I can rule out telecine
> weirdness as the cause of the issue.


___
Cinelerra mailing list
Cinelerra@skolelinux.no
https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra


[CinCVS] [Bug 422] Translate Video Effect Crops Image

2007-05-28 Thread bugzilla-daemon
http://bugs.cinelerra.org/show_bug.cgi?id=422


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID




--- Comment #1 from [EMAIL PROTECTED]  2007-05-28 23:19 +2 ---
Use the Camera to pick up parts of a large picture and to pan around the
picture.


-- 
Configure bugmail: http://bugs.cinelerra.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

___
Cinelerra mailing list
Cinelerra@skolelinux.no
https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra


[CinCVS] [Bug 419] Stop/pause button do not stop sliders and time counter, impossible to do a pause

2007-05-28 Thread bugzilla-daemon
http://bugs.cinelerra.org/show_bug.cgi?id=419


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID




--- Comment #3 from [EMAIL PROTECTED]  2007-05-28 23:16 +2 ---
Go to Preferences, Playback. Select "Stop playback locks up".


-- 
Configure bugmail: http://bugs.cinelerra.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

___
Cinelerra mailing list
Cinelerra@skolelinux.no
https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra


Re: [CinCVS] Length of MPEG2 files

2007-05-28 Thread mskala
On Sat, 21 Apr 2007, Scott C. Frase wrote:
> I've noticed similar things with DVD resolution MPEG2 video, though I am
> not sure what to do about it.

I did some more investigating and found that the .toc file, which consists
mostly of 8-byte records, has a few of those records records repeated
twice.  The number of repeated records in the .toc seems to be pretty
close to the number of extra frames Cinelerra sees as compared to my other
software.  I probably won't be able to try this until I get home tonight
(am currently sshed in from work), but I plan to try hacking mpeg3toc to
detect when it's about to write a record that duplicates the previous one
it wrote, and just not do that.

I also determined that Cinelerra's view of the video is already off by
several frames before the first point at which mplayer starts complaining
about weird telecine settings, so I think I can rule out telecine
weirdness as the cause of the issue.
-- 
Matthew Skala
[EMAIL PROTECTED]Embrace and defend.
http://ansuz.sooke.bc.ca/

___
Cinelerra mailing list
Cinelerra@skolelinux.no
https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra


Re: [CinCVS] Length of MPEG2 files

2007-05-28 Thread Scott C. Frase
Matthew,
I've noticed similar things with DVD resolution MPEG2 video, though I am
not sure what to do about it.

scott

http://crazedmuleproductions.blogspot.com

On Mon, 2007-05-28 at 12:38 -0400, [EMAIL PROTECTED] wrote:
> I have an MPEG2 video ES file created by demuxing an NTSC DVD.  Some of
> the frames in it are the result of telecining, but I don't care about that
> - at this point, I want to treat it as 29.97fps progressive.  I'm pretty
> sure that none of this file is soft-telecine (with 23.976 fps stored in
> the stream and the DVD player expected to perform the pulldown to generate
> 29.970).  It seems to be a mixture of 29.970 progressive and 29.970 hard
> telecine.  However, I'm not certain of that; I haven't found a good way of
> testing it.
> 
> When I try to load the file in Cinelerra, it takes up about 610 seconds on
> the timeline.  That's both if I read the .m2v directly or if I
> pre-generate a .toc file with mpeg3toc.  But all the other software I have
> that can read .m2v files (namely, transcode and mplayer) report it as
> being 586 seconds in length.  Cinelerra reads it as about 4% longer than
> the other software.  This creates problems because I'm using transcode and
> custom software to create a visual index of my footage which I'll then use
> while editing with Cinelerra; I need the frame counts to be the same
> between the two.
> 
> When I ripped the DVDs I discarded the audio track because I didn't need
> it, but I plan to go back and re-rip the audio from this chapter so I can
> verify its length; that may give me some clue as to how long the video is
> actually supposed to be.  At this point, though, it looks like Cinelerra's
> MPEG reader is counting frames incorrectly.  Is there anything I can do
> about it?


___
Cinelerra mailing list
Cinelerra@skolelinux.no
https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra


[CinCVS] Length of MPEG2 files

2007-05-28 Thread mskala
I have an MPEG2 video ES file created by demuxing an NTSC DVD.  Some of
the frames in it are the result of telecining, but I don't care about that
- at this point, I want to treat it as 29.97fps progressive.  I'm pretty
sure that none of this file is soft-telecine (with 23.976 fps stored in
the stream and the DVD player expected to perform the pulldown to generate
29.970).  It seems to be a mixture of 29.970 progressive and 29.970 hard
telecine.  However, I'm not certain of that; I haven't found a good way of
testing it.

When I try to load the file in Cinelerra, it takes up about 610 seconds on
the timeline.  That's both if I read the .m2v directly or if I
pre-generate a .toc file with mpeg3toc.  But all the other software I have
that can read .m2v files (namely, transcode and mplayer) report it as
being 586 seconds in length.  Cinelerra reads it as about 4% longer than
the other software.  This creates problems because I'm using transcode and
custom software to create a visual index of my footage which I'll then use
while editing with Cinelerra; I need the frame counts to be the same
between the two.

When I ripped the DVDs I discarded the audio track because I didn't need
it, but I plan to go back and re-rip the audio from this chapter so I can
verify its length; that may give me some clue as to how long the video is
actually supposed to be.  At this point, though, it looks like Cinelerra's
MPEG reader is counting frames incorrectly.  Is there anything I can do
about it?
-- 
Matthew Skala
[EMAIL PROTECTED]Embrace and defend.
http://ansuz.sooke.bc.ca/

___
Cinelerra mailing list
Cinelerra@skolelinux.no
https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra