LinuxTV Patchwork vdr -v ... --edit ignores -v to set videodir

login
register
mail settings
Submitter Marko Mäkelä
Date Dec. 16, 2013, 5:11 p.m.
Message ID <20131216171152.GA4675@x220>
Download mbox | patch
Permalink /patch/21152/
State New
Headers show

Comments

Marko Mäkelä - Dec. 16, 2013, 5:11 p.m.
Hi all,

I am not sure if this was reported already, but I encountered this bug 
when trying to edit a recording without setting up VDR:

./vdr -v /tmp/video --edit /tmp/video/Rec_name/2013-08-12.20.58.50.99.rec

Without the attached patch, VDR would try to create /srv/vdr/video, and 
would fail to cut the recording.

With the patch, VDR successfully cut the recording. The source files 
were in PES format, and also the new recording is in PES format. Based 
on a discussion from 2008, this is the expected behaviour. Is there some 
tool for converting old PES recordings to TS format?

	Marko
Marko Mäkelä - Dec. 21, 2013, 9:15 p.m.
On Mon, Dec 16, 2013 at 07:11:52PM +0200, Marko Mäkelä wrote:
>With the patch, VDR successfully cut the recording. The source files 
>were in PES format, and also the new recording is in PES format.  Based 
>on a discussion from 2008, this is the expected behaviour. Is there 
>some tool for converting old PES recordings to TS format?

Sorry for the stupid question; I learned later that the conversion from 
TS to PES is losing information, which may be hard to "make up" 
afterwards.

My use case is to play old VDR recordings in a Samsung SmartTV. For 
that, I created a VFAT file system on a usb-storage device. (If the file 
system is ext2, it will only work for the Samsung time shifting 
feature.) New VDR recordings in MPEG TS format play just fine as is. The 
old recordings had to be converted from PES to PS with the following 
script:

cat>$HOME/bin/pes2ps<<EOF
#!/bin/sh
exec mencoder -vc mpeg12 -oac copy -ovc copy -of mpeg \
-mpegopts format=mpeg2 -aid 0 -o "$@"
EOF

I converted a couple directories of TV series where each episode was 
stored in its own directory, named by the episode name. To do that, I 
did the following:

cd /path/to/video/Series_name
for i in */
do
   j="$(echo "${i%/}"|tr '~[]:;' '-()').,"
   pes2ps "/path/to/output/Series_name/$j.mpg" "$i"/*/0*.vdr
done

This will unfortunately lose all metadata except the episode name. I did 
not test recordings with subtitles yet.

Best regards,

	Marko

Patch

--- vdr.c	2013-10-16 12:46:36.000000000 +0300
+++ vdr.c	2013-12-16 18:47:42.526981566 +0200
@@ -331,6 +331,7 @@  int main(int argc, char *argv[])
		     }
		     break;
	   case 'e' | 0x100:
+                    SetVideoDirectory(VideoDirectory);
		     return CutRecording(optarg) ? 0 : 2;
	   case 'E': EpgDataFileName = (*optarg != '-' ? optarg : NULL);
		     break;

Privacy Policy