[vdr] merging correctly several .ts files to a single ts file or better mkv

Klaus Schmidinger Klaus.Schmidinger at tvdr.de
Sun Mar 28 17:34:53 CEST 2010


On 28.03.2010 17:23, Lars Bla"ser wrote:
> Eric Valette wrote:
>> On 28/03/2010 15:16, Klaus Schmidinger wrote:
>>
>>> I just made a recording with a 1MB file size and cat'ed the files
>>> together. The result played just fine on my FF-DVBS card.
>> It indeed works with xbmc, not with smplayer. Anyway I've found a way to
>> make it work (and now I will have only one chunk) :
>>
>> ffmpeg -y -ss 00:17:00 -map 0.0 -map 0.1 -i 00001.ts  -vcodec copy
>> -sameq -acodec copy simplified1.ts
>> ffmpeg -y -i simplified1.ts  -vcodec copy -sameq -acodec copy -async 2
>> -f matroska 1.mkv
>> ...
>> ffmpeg -t 00:14:10 -y -map 0.0 -map 0.1 -i 00004.ts  -vcodec copy -sameq
>> -acodec copy simplified4.ts
>> ffmpeg -y -i simplified4.ts  -vcodec copy -sameq -acodec copy -async 2
>> -f matroska 4.mkv
>>
>> mkvmerge --title Foo 1.mkv +2.mkv +3.mkv +4.mkv -o foo.mkv
> 
> vdr does not look for any strukture of a recorded file it just cut's
> when the byte conter limit for a file is reached
> ...

VDR starts each file with an I-frame:

bool cRecorder::NextFile(void)
{
  if (recordFile && frameDetector->IndependentFrame()) { // every file shall start with an independent frame
     if (fileSize > MEGABYTE(off_t(Setup.MaxVideoFileSize)) || RunningLowOnDiskSpace()) {
        recordFile = fileName->NextFile();
        fileSize = 0;
        }
     }
  return recordFile != NULL;
}


Klaus



More information about the vdr mailing list