Bug #3136
DVR filenames too long - limit filenames length
100%
Description
If I select "Include Subtitle In Filename" and the subtitle is very long
Example:
title = Long Island Medium - 1^TV
subtitle = St.6 Ep.7 'Il coach Theresa' - Theresa e Larry visitano il ristorante in cui mangiavano ogni giorno durante i loro appuntamenti. In seguito, Theresa aiuta una donna che sta tentando di lottare contro i suoi sentimenti...
the filename recorded that I get is like:
"Long-Island-Medium---1^TV.St.6-Ep.7-'Il-coach-Theresa'---Theresa-e-Larry-visitano-il-ristorante-in-cui-mangiavano-ogni-giorno-durante-i-loro-appuntamenti.-In-seguito,-Theresa-aiuta-una-donna-che-sta-tentando-di-lottare-contro-i-suoi-sentimenti....2015-10"
with no extension (so DLNA clients do not find it).
Also If I remove/delete it from the recording list, the entry is removed from the DVR finished recordings, but not from the disk.
Is there a way to limit the file length?
For example trim the subtitle length so that the full name gets recorded?
At the moment I'm using a NFS share on a Ext3 partition, so I think the max filename length should be 254:
For NTFS file system it's 255 characters
http://en.wikipedia.org/wiki/Ntfs
For Ext3 file system it's 254 characters
http://en.wikipedia.org/wiki/Ext3
For Ext4 file system it's 256 characters
http://en.wikipedia.org/wiki/Ext4
Files
History
Updated by g siviero about 9 years ago
from the log
Recording with subtitle:
dvr: /mnt/tv/Record/Real-Time/Long-Island-Medium---1^TV.St.6-Ep.7-'Il-coach-Theresa'---Theresa-e-Larry-visitano-il-ristorante-in-cui-mangiavano-ogni-giorno-durante-i-loro-appuntamenti.-In-seguito,-Theresa-aiuta-una-donna-che-sta-tentando-di-lottare-contro-i-suoi-sentimenti....2015-10- from adapter: "DiBcom 7000PC : DVB-T #0", network: "DVB-T", mux: "682MHz", provider: "Persidera", service: "Real Time"
Error when trying to remove recording:
"dvr: Unable to remove file '/mnt/tv/Record/Real-Time/Long-Island-Medium---1^TV.St.6-Ep.7-'Il-coach-Theresa'---Theresa-e-Larry-visitano-il-ristorante-in-cui-mangiavano-ogni-giorno-durante-i-loro-appuntamenti.-In-seguito,-Theresa-aiuta-una-donna-che-sta-tentando-di-lottare-contro-i-suoi-sentimenti....2015-10-' from disk -- Errore sconosciuto -36"
Recording without subtitle
dvr: /mnt/tv/Record/Real-Time/Long-Island-Medium---1^TV.2015-10-07.10-20.ts from adapter: "DiBcom 7000PC : DVB-T #0", network: "DVB-T", mux: "682MHz", provider: "Persidera", service: "Real Time"
Updated by g siviero about 9 years ago
I looked in src/dvr/dvr_rec.c and a check on the filename length is made actually.
The code is a bit complicated for me, but it looks like the filename includes the extension (/* Substitute extension /) at the time it is controlled for length and eventually trimmed (/ Check the maximum filename length */).
I think the resulting filename should keep the filename extension in any case, otherwise the file will be unusable.
So I think that the filename length control should be made on the filename without the extension, and the extension kept in any case.
Updated by saen acro about 9 years ago
Do you really need description of event in file name?
One of best solution is all that info to be contained in MKV "description"
Updated by g siviero about 9 years ago
If I use xmltv, the description (subtitle) in most cases contains the episode title/number and I find it very useful to have it in the file name.
For channels with EIT EPG info, sometimes the subtitle field contains also the description/plot of the episode and it may be very long.
I can disable the feature "subtitle in filename" for the recordings on these channels, but I think that if someone unknowingly enabled it, the system should generate anyway a valid filename, that is always keep the file extension.
If the file is saved without extension, it cannot be indexed by DLNA servers, so it cannot be directly played by DLNA clients.
If I rename it, the corresponding entry in tvheadend would go in the errors recording page.
It also looks like that if I remove from the completed recording page an entry corresponding to one of these files, the entry is removed but the file remains on the filesystem (NAS via NFS):
Oct 9 09:12:29 raspberrypi tvheadend20338: dvr: delete entry 191d9cae0c7621062b123836d01636a5 "Il nostro piccolo grande amore" on "Real Time" start time 2015-10-09 08:29:30, scheduled for recording by "192.168.1.72", retention 60 days
Oct 9 09:12:29 raspberrypi tvheadend20338: dvr: Unable to remove file '/mnt/tv/Record/Real-Time/Il-nostro-piccolo-grande-amore.2015-10-09.08-45.St.5-Ep.5-'La-prima-Festa-della-Mamma'---Per-Jen-e'-la-prima-Festa-della-Mamma-ma-purtroppo-deve-lavorare,-cosi'-Bill-aiuta-Will-a-realizzare-un-regalo-per-questa-mamma-davvero-speciale.-Inoltre,-la-coppia-c' from disk -- Errore sconosciuto -36
For the MKV part, I have to use the TS container/extension, because some of my DLNA clients do not recognize the MKV container.
I still have the description on the completed recordings page of tvheadend, so that is not an issue.
Updated by Jaroslav Kysela about 9 years ago
- Status changed from New to Fixed
- % Done changed from 0 to 100
Applied in changeset commit:tvheadend|dbeee1ca81ff39a7b09e4c0dbd391a73d6c75adc.
Updated by Jaroslav Kysela about 9 years ago
- Status changed from Fixed to New
- % Done changed from 100 to 0
Fixed in v4.1-572-gdbeee1c - the file name is cut before the extension.
Updated by g siviero about 9 years ago
Now the files have the extension but I'm still not able to remove them from the web interface
Oct 9 14:41:53 raspberrypi tvheadend32162: dvr: /mnt/tv/Record/Real-Time/Il-boss-delle-torte.2015-10-09.14-10.St.6-Ep.4-'Torta-sushi'---Buddy-e-il-suo-team-stanno-realizzando-una-torta-squisita-per-raccogliere-fondi-dopo-un-uragano-a-Hoboken.-In-seguito,-Buddy-crea-un-dolce-a-forma-di-barca-per-un-ristorante-giappones-1.ts from adapter: "DiBcom 7000PC : DVB-T #0", network: "DVB-T", mux: "682MHz", provider: "Persidera", service: "Real Time"
I get an "unknown error -36" message:
Oct 9 14:42:27 raspberrypi tvheadend32162: dvr: Unable to remove file '/mnt/tv/Record/Real-Time/Il-boss-delle-torte.2015-10-09.14-10.St.6-Ep.4-'Torta-sushi'---Buddy-e-il-suo-team-stanno-realizzando-una-torta-squisita-per-raccogliere-fondi-dopo-un-uragano-a-Hoboken.-In-seguito,-Buddy-crea-un-dolce-a-forma-di-barca-per-un-ristorante-giappones-1.ts' from disk -- Errore sconosciuto -36
the entry is removed from the web interface but not from the filesystem.
Other issue symptoms:
I record I file, for example I get:
Oct 9 14:54:04 raspberrypi tvheadend32162: dvr: /mnt/tv/Record/Real-Time/Il-boss-delle-torte.2015-10-09.14-45.St.6-Ep.5-'Vedo-doppio'---Buddy-e-la-famiglia-affrontano-una-corsa-contro-il-tempo-per-aprire-la-nuova-pasticceria.-Inoltre,-due-gemelle-identiche-chiedono-una-torta-di-compleanno_-ma-avranno-anche-gli-stessi-gu.ts from adapter: "DiBcom 7000PC : DVB-T #0", network: "DVB-T", mux: "682MHz", provider: "Persidera", service: "Real Time"
If I see it via "Windows explorer" I see the complete file name
"Il-boss-delle-torte.2015-10-09.14-45.St.6-Ep.5-'Vedo-doppio'---Buddy-e-la-famiglia-affrontano-una-corsa-contro-il-tempo-per-aprire-la-nuova-pasticceria.-Inoltre,-due-gemelle-identiche-chiedono-una-torta-di-compleanno_-ma-avranno-anche-gli-stessi-gu.ts"
But if I "download" the file in windows (via the web interface in Chrome) I get a file named
"Il-boss-delle-torte.2015-10-09.14-45.St.6-Ep.5-'Vedo-doppio'---Buddy-e-la-famiglia-affrontano-una-corsa-contro-il-tempo-per-aprire-la-nuova-pasticceria.-Inoltre,-due-gemelle-identiche-chiedono-una-torta-di-comple"
and Windows thinks that the extension is "-Inoltre,-due-gemelle-identiche-chiedono-una-torta-di-comple"
I can remove the files from Windows Explorer or from the command line.
Updated by Jaroslav Kysela about 9 years ago
- Status changed from New to Fixed
- % Done changed from 0 to 100
Applied in changeset commit:tvheadend|1ffad11881c63db416f2ee957740ab1a29d145b7.
Updated by Jaroslav Kysela about 9 years ago
- % Done changed from 100 to 0
Could you try v4.1-579-g1ffad11 ?
Updated by Jaroslav Kysela about 9 years ago
Only little note: There's no filename size limit for HTTP download - blame chrome.
Updated by g siviero about 9 years ago
- File Screenshot_download.png Screenshot_download.png added
Well, actually I also tested Firefox, both under Windows and under Ubuntu, and the download issue was present in both.
I will try the new release as soon as I can and let you know.
Thanks.
Updated by g siviero about 9 years ago
I tested 4.1-579~g1ffad11 and now I do not get the error "-36" when I delete a recording from the web interface, but now I cannot remove ANY recording from the web interface.
Updated by g siviero about 9 years ago
Ok, I tested version 4.1-579~g1ffad11 and I can again remove recordings with "normal length" filenames.
I still cannot download with correct name and cannot remove from the filesystem files with the "long" filename.
Should I open a different issue/ticket?
Updated by Jaroslav Kysela about 9 years ago
Could you retest with v4.1-592-g67b71ee ? Both issues should be resolved. Basically, one buffer was smaller than I expected (browser issue).
Updated by g siviero about 9 years ago
I confirm you that with version 4.1-593~g054fc2e files with long names (from subtitle in filename):
- are recorded with extension
- can be downloaded with correct name from web interface
- are correctly removed both from DVR finished recordings entries and filesystem
So far so good.
Thanks