Mailing List archive

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

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



Am Montag, 12. Juli 2004 13:09 schrieb Jaakko Hyvätti:
>   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.

Just a little suggestion to implement a "safe mode" which would make the undo 
function unneeded:

What if you create another recording directory (just like the normal cutter 
does), hardlink (or even just symlink) all unchanged files to it (giving them 
new names if necessary), leave out skipped files, and copy the data of 
partially cut files over. This would copy a little more than the your 
solution, but a lot less than the original implementation. Hardlinking would 
have the advantage that needed blocks will not be deleted when the uncut 
recording is deleted. Well one drawback is that it will only work on 
filesystems that support links of some kind.

Anyways, great work! 

Greetings,
Sascha





Home | Main Index | Thread Index