Am Thursday 24 August 2006 10:34 schrieb anopheles: > Hi guys Hello Brian.
> I've been using a script to help me process dvbcut files - > it realigns the cut positions within the MPG file saved from dvbcut. > > This allows me to > a) test the edit points in the final MPG > b) reconstruct the chapter timestamps if I originally forgot to save them. > > If you are interested you can find this script here: > http://www.clr.eclipse.co.uk/dvbcut/recut/ > (requires python) I had a look at your script. I did not read the whole source code, but looking at your comments there might be one error inside. From your code: > read a dvbcut control file from given file > and recalculate the cut points presuming that the control file > has already been applied. > Write new version of cutfile to cut_filename.new > > start 100 > end 200 > start 300 > end 400 > becomes > start 0 > end 99 > start 99 > end 198 The calculation is not correct. The new marks should become 0,100,100,200. Just see that for corresponding start and stop marks, the quantity stop-start (which is the number of pictures for that cut) should stay constant. So from the original values 200-100 must be equal to 100-0. (It is not equal to 99-0.) And then... sorry to say, but you would have a much easier life if you made use of the Python XML module. (See the attached script.) > However, I also note that the final STOP mark is always a few frames (i.e. > more than one) beyond the end of the MPG file, as though dvbcut has stopped > short of the desired position. > > Can anyone explain this? Is this just the down to the old discussion of > whether the STOP mark is in or out of the cut? I guess the treatment of the DVCBUT file by the script is correct (apart from that off-by-one thing). I would guess the point is, that when re-reading the mpg file into DVCBUT, it doesn't read it in full. When I remember correctly, the indexer of DVBCUT stops at an I-Frame and ignores the last P/B-Frames in the file. This is, I must admit, an unneccessary limitation which probably originates from my usual usage of DVBCUT, using huge bulk TS-Files as source. There you don't mind missing a few frames in the end... a future improved implementation should not have this limitation. Bye, Sven. -- Sven Over Stephanienstr. 9 76133 Karlsruhe GERMANY Telefon: 0721-9204199 http://www.svenover.de/
recut.py
Description: application/python
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ DVBCUT-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dvbcut-user
