[vdr] making VDR ext4-ready

jori.hamalainen at teliasonera.com jori.hamalainen at teliasonera.com
Mon Jun 8 13:11:57 CEST 2009

>> On 07.06.2009 01:58, Marcel Witte wrote:
>> So ext4 seems to be perfect for a video-partition, but to make it more 
>> perfect, it would be nice if VDR could use the fallocate()-systemcall 
>> as mentioned in the article. This would prevent fragmentation in the file

> Udo wrote:
>Sounds like a good plan, but unfortunately fallocate requires you to know
>advance how big a file will be. This is not true for VDR recordings. And if
>you fallocate with too small or too big sizes, you'll end up with
>or smaller chunks of unused space again. (All in all, this is probably only
>important for concurrent recordings anyway.)

Well you can predict file size for certain extent. As VDR has the split
option built in. That is the maximum filesize.

- If you have 1h10min timer.
- Allocate 1st file upto split size
- Calculate average BW at the same time you are recording
  - You could even store this
- If file is too small, allocate new file for remaining time with average BW
+ overhead

If you have 10min timer (or short timer which will cause filesize under
split size)
- if you store average BW what channels are having you could allocate
directly estimated size

Naturally this is not 100% accurate, and would cause some big size

For EXT4 it would be nice:
- fallocate(4GB)
- open file for write
- close file after 3GB
- automatic fdeallocate(1GB)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5933 bytes
Desc: not available
Url : http://www.linuxtv.org/pipermail/vdr/attachments/20090608/67a1f128/attachment.bin 

More information about the vdr mailing list