[FFmpeg-user] Matroska has different starting DTS/PTS after stream copy from mov after rescale

Kieran O Leary kieran.o.leary at gmail.com
Wed Jul 13 12:25:19 EEST 2016


Hi Carl,

yet again thanks for quick reply.

On Wed, Jul 13, 2016 at 10:11 AM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
> Kieran O Leary <kieran.o.leary <at> gmail.com> writes:
>
>> 1. Rescale 2048*1536 v210.mov to 4096*3072 (Source PTS/DTS
>> and rescaled PTS/DTS start at 0)
>> 2. Stream copy to matroska (PTS/DTS start at 1)
>
> Why is this an issue?

To be honest, I don't know enough about PTS and DTS to know if it is
an issue. My understanding is that it is really more of an issue for
inter frame codecs that would use b/p frames. It was just an anomaly
that I've never encountered before and thought I'd report it.
> Did you test -copyts?

I didn't , but I just tried it (perhaps incorrectly) and it appeared
to have no effect as the PTS/DTS started at 1 again.

ffmpeg -i /Volumes/Stardom/kieran_tests/bug/4k.mov -c copy -copyts
/Volumes/Stardom/kieran_tests/bug/4k.mkv

ffmpeg version git-2016-06-21-9204a84 Copyright (c) 2000-2016 the
FFmpeg developers

  built with Apple LLVM version 7.3.0 (clang-703.0.31)

  configuration: --prefix=/usr/local/Cellar/ffmpeg/HEAD
--enable-shared --enable-pthreads --enable-gpl --enable-version3
--enable-hardcoded-tables --enable-avresample --cc=clang
--host-cflags= --host-ldflags= --enable-opencl --enable-libx264
--enable-libmp3lame --enable-libxvid --enable-libfreetype
--enable-ffplay --disable-lzma --enable-libopenjpeg
--disable-decoder=jpeg2000
--extra-cflags=-I/usr/local/Cellar/openjpeg/1.5.2_1/include/openjpeg-1.5
--enable-vda

  libavutil      55. 24.100 / 55. 24.100

  libavcodec     57. 46.100 / 57. 46.100

  libavformat    57. 38.102 / 57. 38.102

  libavdevice    57.  0.101 / 57.  0.101

  libavfilter     6. 46.102 /  6. 46.102

  libavresample   3.  0.  0 /  3.  0.  0

  libswscale      4.  1.100 /  4.  1.100

  libswresample   2.  1.100 /  2.  1.100

  libpostproc    54.  0.100 / 54.  0.100

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
'/Volumes/Stardom/kieran_tests/bug/4k.mov':

  Metadata:

    major_brand     : qt

    minor_version   : 512

    compatible_brands: qt

    encoder         : Lavf57.38.102

  Duration: 00:00:00.04, start: 0.000000, bitrate: 6441633 kb/s

    Stream #0:0(eng): Video: v210 (v210 / 0x30313276), yuv422p10le,
4096x3072, 6492782 kb/s, 24 fps, 24 tbr, 12288 tbn, 12288 tbc
(default)

    Metadata:

      handler_name    : DataHandler

      encoder         : Lavc57.46.100 v210

      timecode        : 01:00:53:12

    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
mono, fltp, 6 kb/s (default)

    Metadata:

      handler_name    : DataHandler

    Stream #0:2(eng): Data: none (tmcd / 0x64636D74), 0 kb/s

    Metadata:

      handler_name    : DataHandler

      timecode        : 01:00:53:12

File '/Volumes/Stardom/kieran_tests/bug/4k.mkv' already exists.
Overwrite ? [y/N] y

[matroska @ 0x7f95a8811e00] Using AVStream.codec to pass codec
parameters to muxers is deprecated, use AVStream.codecpar instead.

    Last message repeated 1 times

Output #0, matroska, to '/Volumes/Stardom/kieran_tests/bug/4k.mkv':

  Metadata:

    major_brand     : qt

    minor_version   : 512

    compatible_brands: qt

    encoder         : Lavf57.38.102

    Stream #0:0(eng): Video: v210 (v210 / 0x30313276), yuv422p10le,
4096x3072, q=2-31, 6492782 kb/s, 24 fps, 24 tbr, 1k tbn, 12288 tbc
(default)

    Metadata:

      handler_name    : DataHandler

      encoder         : Lavc57.46.100 v210

      timecode        : 01:00:53:12

    Stream #0:1(eng): Audio: aac (LC) ([255][0][0][0] / 0x00FF), 48000
Hz, mono, 6 kb/s (default)

    Metadata:

      handler_name    : DataHandler

Stream mapping:

  Stream #0:0 -> #0:0 (copy)

  Stream #0:1 -> #0:1 (copy)

Press [q] to stop, [?] for help

frame=    1 fps=0.0 q=-1.0 Lsize=   33025kB time=00:00:00.02
bitrate=12297363.3kbits/s speed=0.186x

video:33024kB audio:0kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: 0.003327%


Best,

Kieran.


More information about the ffmpeg-user mailing list