Hello,

I am trying to cut MJPEG AVI files into pieces and then put them back together again. I need it to do processing on parts of the video using external software (ImageMagick). I cut the pieces using this command:

lavtrans -o piece1.avi -f a cut.eli

and the edit list looks like:

LAV Edit List
PAL
1
/full/path/to/mjpeg/file.avi
0 0 100

which should fetch the fist 100 frames and save them to a new avi file. Then I cut another piece from the same source movie:

LAV Edit List
PAL
1
/full/path/to/mjpeg/file.avi
0 101 200

which should fetch the next 100 frames and save them to a seperate avi. Then I merge them back again:

LAV Edit List
PAL
2
/full/path/to/piece1.avi
/full/path/to/piece2.avi
0 0 1000000
1 0 1000000

which puts the two pieces together. I use a frame count of '1000000' because the edit lists are generated by a script that does not know the actual frame count of the pieces that it needs to put together.

The problem is that the final result is not seemless. When I examine the output with glav, I can see that there is one duplicate frame inserted at the position where the cut was done. Also, the sound has a small discontinuity (you can hear a click) which is probably the result of having a duplicate frame.

Since there is no documentation on the file format of edit lists, I had to guess some things, like how the frame range is specified. It's clear that the second number is the offset, but the third number can either be a frame count or the number of the last frame. I guess the latter is correct, as it yields the most 'seamless' edits.

I played a bit with the frame ranges in the edit lists, but I failed to get a seamless end result. Does anyone know how to cut/paste video fragments in a truely seamless way?

Thanks a lot,

Dik


------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ Mjpeg-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/mjpeg-users

Reply via email to