[FFmpeg-user] Combining -copyts with segmentation gives unexpected results

Jarno Suni sunijarno at gmail.com
Tue Dec 20 11:39:50 EET 2022


Ok, here is an example command:

$ ffmpeg -i http://volosatoff.ru:8008/euro.opus -c copy -copyts -t 25
-f segment -segment_time 10 -reset_timestamps 0 -strftime 0
recording-%05d.opus

Output in terminal:

ffmpeg version 4.4.2-1sergeyd9.9~18.04.1 Copyright (c) 2000-2021 the
FFmpeg developers
  built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
  configuration: --prefix=/usr --extra-version='1sergeyd9.9~18.04.1'
--libdir=/usr/lib/i386-linux-gnu --shlibdir=/usr/lib/i386-linux-gnu
--incdir=/usr/include/i386-linux-gnu --arch=i386 --enable-gpl
--enable-version3 --enable-nonfree --disable-libtesseract
--disable-stripping --enable-gnutls --enable-libaom --enable-libass
--enable-libbluray --enable-libcaca --enable-libcdio
--enable-libcodec2 --enable-libdav1d --enable-libfdk-aac
--enable-libfontconfig --enable-libfreetype --enable-libgme
--enable-libgsm --enable-libmp3lame --enable-libopenjpeg
--enable-libopus --enable-libpulse --enable-libshine
--enable-libsnappy --enable-libsoxr --enable-libspeex
--enable-libtheora --enable-libtwolame --enable-libvorbis
--enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2
--enable-libxvid --enable-lv2 --enable-omx --enable-openal
--enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm
--enable-libiec61883 --enable-frei0r --enable-libx264 --enable-libmfx
--enable-ffnvcodec --enable-nvenc --enable-nvdec
--ignore-tests='hapenc-hap-none,hapenc-hapa-none,hapenc-hapq-none'
--enable-shared
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
[ogg @ 0x9541480] 636 bytes of comment header remain
Input #0, ogg, from 'http://volosatoff.ru:8008/euro.opus':
  Metadata:
    icy-br          : 128
    icy-description : EuroDance 90s (Opus 128 kbps)
    icy-genre       : EuroDance
    icy-name        : VOLOSATOE RADIO
    icy-pub         : 1
    icy-url         : http://fm.spb.ru
  Duration: N/A, start: 14371671.000000, bitrate: N/A
  Stream #0:0: Audio: opus, 48000 Hz, stereo, fltp
    Metadata:
      ENCODER         : opusenc from opus-tools 0.2-3-gf5f571b
      ENCODER_OPTIONS : --bitrate 128
[segment @ 0x9552e00] Opening 'recording-00000.opus' for writing
Output #0, segment, to 'recording-%05d.opus':
  Metadata:
    icy-br          : 128
    icy-description : EuroDance 90s (Opus 128 kbps)
    icy-genre       : EuroDance
    icy-name        : VOLOSATOE RADIO
    icy-pub         : 1
    icy-url         : http://fm.spb.ru
    encoder         : Lavf58.76.100
  Stream #0:0: Audio: opus, 48000 Hz, stereo, fltp
    Metadata:
      ENCODER         : opusenc from opus-tools 0.2-3-gf5f571b
      ENCODER_OPTIONS : --bitrate 128
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
size=N/A time=00:00:00.00 bitrate=N/A speed=   0x
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: unknown

It produces one small file, not two 10 s files and one 5 s file or something.
If you leave the -t option out, the command produces small (less than
1kB) files fast, not one in 10 s. You can try these by a more fresh
ffmpeg executable.


More information about the ffmpeg-user mailing list