Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] cut_in_place.cc v0.1 - Cut recordings with minimal copying



  Hi all,

  For a long time I have meant to implement an alternative cutting method
which would not copy everything.  If you use small file size for vdr
recordings, like the minimum of 100 MB, you usually would not have to copy
all files but most of them you could just move to another name or truncate
or partially copy.  This is what I have now implemented:

  http://www.iki.fi/hyvatti/dvb/

  Of course it is dangerous, as the original recording is destroyed in the
process and it is irreversible.  It would be possible to write a backup
copy of destroyed files and move whole destroyed files to safety and
implement an undo, but I have no time for that.

  Anyway, the benefits are large: editing any long movie takes now not
more than 20-30 seconds of my time.  Most of the files are preserved as
they are and only those files that happen to contain cutting marks are
partially copied or just truncated.  Copying also happens inside the file,
so no additional space is used.

  I wrote this in one day so there must be some bugs left. Also the
handling of video stream is not fully compatible with standard VDR
editing. Differencies are not big:

     * There is something funny with the last editing mark of cut recording,
       vdr does not want to go there.
     * I do not modify the frame flags like VDR does where there are broken
       frames at cutpoints. Instead I drop all other frames than Iframes. The
       above must be because of this.

  Anyway, I have now tested this with a couple recordings and it worked,
so it works at least sometimes but may of course still destroy your
recordings.

  To install this program, compile it, place it somewhere and add this
line to your /video/reccmds.conf:

Cut in place : /usr/local/bin/cut_in_place

  After that the command is available in recordings menu.  You need to set
the Maximum recording size to 100MB or something small anyway in
Recordings menu to fully enjoy faster cutting times.

Any suggestions, please feel free to email me!  Klaus, sorry for not
implementing this inside vdr, but it would have been too complicated for
me to do that.  I think that would be the ultimate place to do it though.

Cheers,
Jaakko

-- 
Foreca Ltd                                           Jaakko.Hyvatti@foreca.com
Pursimiehenkatu 29-31 B, FIN-00150 Helsinki, Finland     http://www.foreca.com




Home | Main Index | Thread Index