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

Lucian Muresan lucianm at users.sourceforge.net
Thu Apr 1 11:45:09 CEST 2010


On 28.03.2010 18:12, Eric Valette wrote:
> On 28/03/2010 17:45, Eric Valette wrote:
>> On 28/03/2010 17:23, Lars Bläser wrote:
> 
>> Granted. However, merging with cat *.ts > complete.ts + trying a single
>> pass mkv conversion fails miserably (allhough I have very up to date
>> ffmpeg version).
>>
>> See fourth message in this threads ffmpeg complain with non monotone
>> timestamps and simply hang the computer.
> 
> I just tryed remuxing the .ts (and removing unneeded languages and
> subtitles) file to another .ts before converting to matroska and it works!
> 
> cat 00001.ts  00002.ts > merged.ts
> ffmpeg -y -ss 00:01:06 -map 0.0 -map 0.1 -i merged.ts -vcodec copy
> -sameq -acodec copy simplified1.ts
> ffmpeg -y -i simplified1.ts  -vcodec copy -sameq -acodec copy -async 2
> -f matroska 1.mkv
> 
> Much simpler indeed and no risk to have a small glitch in the meddle of
> the cut.

Where do you take that time offset value from? I'm also working on such
kind of scripts right now, because I want to remux especially HD
recordings to MKV. In the case of movies broadcasted by ARD HD or ZDF HD
(720p at 50Hz), they are full of so-called filler-NALUs, which can be
removed just by muxing into MKV not directly by ffmpeg, but by mkvmerge,
which shrinks a 10GB movie to about 3GB. My problem is still A/V sync,
all the original TS chunks (I also record into 200MB pieces, because of
fast editing in VDR) show video delays for each audio track of over 1
second, which is also very noticeable ion the final converted MKV. The
delays are reported both by tsMuxeR and mediainfo see for example the
"Video delay" value below:

mediainfo 00001.ts
General
ID                               : 8008
Complete name                    : 00001.ts
Format                           : MPEG-TS
File size                        : 200 MiB
Duration                         : 2mn 6s
Overall bit rate                 : 13.3 Mbps

Video
ID                               : 6010 (0x177A)
Menu ID                          : 132 (0x84)
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : High at L4.0
Format settings, CABAC           : Yes
Format settings, ReFrames        : 5 frames
Duration                         : 2mn 5s
Bit rate                         : 11.5 Mbps
Width                            : 1 280 pixels
Height                           : 720 pixels
Display aspect ratio             : 16:9
Frame rate                       : 50.000 fps
Resolution                       : 8 bits
Colorimetry                      : 4:2:0
Scan type                        : Progressive
Bits/(Pixel*Frame)               : 0.249
Stream size                      : 172 MiB (86%)
Color primaries                  : BT.709-5, BT.1361, IEC 61966-2-4,
SMPTE RP177
Transfer characteristics         : BT.709-5, BT.1361
Matrix coefficients              : BT.709-5, BT.1361, IEC 61966-2-4 709,
SMPTE RP177

Audio #1
ID                               : 6020 (0x1784)
Menu ID                          : 132 (0x84)
Format                           : MPEG Audio
Format version                   : Version 1
Format profile                   : Layer 2
Duration                         : 2mn 5s
Bit rate mode                    : Constant
Bit rate                         : 256 Kbps
Channel(s)                       : 2 channels
Sampling rate                    : 48.0 KHz
Video delay                      : -1s 340ms
Stream size                      : 3.84 MiB (2%)
Language                         : German
Language, more info              : Clean effects

Audio #2
ID                               : 6021 (0x1785)
Menu ID                          : 132 (0x84)
Format                           : MPEG Audio
Format version                   : Version 1
Format profile                   : Layer 2
Duration                         : 2mn 5s
Bit rate mode                    : Constant
Bit rate                         : 256 Kbps
Channel(s)                       : 2 channels
Sampling rate                    : 48.0 KHz
Video delay                      : -1s 344ms
Stream size                      : 3.84 MiB (2%)
Language                         : German
Language, more info              : Clean effects

Audio #3
ID                               : 6022 (0x1786)
Menu ID                          : 132 (0x84)
Format                           : AC-3
Format/Info                      : Audio Coding 3
Duration                         : 2mn 5s
Bit rate mode                    : Constant
Bit rate                         : 448 Kbps
Channel(s)                       : 2 channels
Channel positions                : Front: L R
Sampling rate                    : 48.0 KHz
Video delay                      : -1s 486ms
Stream size                      : 6.73 MiB (3%)
Language                         : German
Language, more info              : Clean effects




More information about the vdr mailing list