[FFmpeg-user] segment transcoded audio has blips - 2nd attempt

Derek Rachul drachul at gmail.com
Thu Dec 24 04:50:50 CET 2015


Sorry wasn't sure how to reply to the other thread (I wasn't subscribed at
the time, so I didn't get the reply directly.)

To reiterate, I'm trying to do segmented transcoding of both audio and
video and video has no problems doing this, but when I try to transcode the
audio, I get dropouts/blips at the boundaries of the segments.

Anyways, as requested here are the commands I've run, with the full ffmpeg
output:

### /tmp/ffmpeg/bin/ffmpeg -i /mnt/upload/movies/Sintel.2010.720p.mkv
-codec copy -f segment -t 20 -segment_time 8 out_%d.mp4
ffmpeg version N-77455-g4707497 Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 5.2.1 (Ubuntu 5.2.1-22ubuntu2) 20151010
  configuration: --prefix=/tmp/ffmpeg/build --pkg-config-flags=--static
--extra-cflags=-I/tmp/ffmpeg/build/include
--extra-ldflags=-L/tmp/ffmpeg/build/lib --bindir=/tmp/ffmpeg/bin
--enable-gpl --enable-libass --enable-nonfree
  libavutil      55. 11.100 / 55. 11.100
  libavcodec     57. 20.100 / 57. 20.100
  libavformat    57. 20.100 / 57. 20.100
  libavdevice    57.  0.100 / 57.  0.100
  libavfilter     6. 21.101 /  6. 21.101
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
Input #0, matroska,webm, from '/mnt/upload/movies/Sintel.2010.720p.mkv':
  Metadata:
    encoder         : libebml v1.0.0 + libmatroska v1.0.0
    creation_time   : 2011-04-24 17:20:33
  Duration: 00:14:48.03, start: 0.000000, bitrate: 6071 kb/s
    Chapter #0:0: start 0.000000, end 103.125000
    Metadata:
      title           : Chapter 01
    Chapter #0:1: start 103.125000, end 148.667000
    Metadata:
      title           : Chapter 02
    Chapter #0:2: start 148.667000, end 349.792000
    Metadata:
      title           : Chapter 03
    Chapter #0:3: start 349.792000, end 437.208000
    Metadata:
      title           : Chapter 04
    Chapter #0:4: start 437.208000, end 472.075000
    Metadata:
      title           : Chapter 05
    Chapter #0:5: start 472.075000, end 678.833000
    Metadata:
      title           : Chapter 06
    Chapter #0:6: start 678.833000, end 744.083000
    Metadata:
      title           : Chapter 07
    Chapter #0:7: start 744.083000, end 888.032000
    Metadata:
      title           : Chapter 08
    Stream #0:0(eng): Video: h264 (High), yuv420p(tv,
bt709/unknown/unknown), 1280x544, SAR 1:1 DAR 40:17, 24 fps, 24 tbr, 1k
tbn, 48 tbc
    Stream #0:1(eng): Audio: ac3, 48000 Hz, 5.1(side), fltp, 640 kb/s
    Metadata:
      title           : AC3 5.1 @ 640 Kbps
    Stream #0:2(ger): Subtitle: subrip
    Stream #0:3(eng): Subtitle: subrip
    Stream #0:4(spa): Subtitle: subrip
    Stream #0:5(fre): Subtitle: subrip
    Stream #0:6(ita): Subtitle: subrip
    Stream #0:7(dut): Subtitle: subrip
    Stream #0:8(pol): Subtitle: subrip
    Stream #0:9(por): Subtitle: subrip
    Stream #0:10(rus): Subtitle: subrip
    Stream #0:11(vie): Subtitle: subrip
[segment @ 0x2607f20] Codec for stream 0 does not use global headers but
container format requires global headers
[segment @ 0x2607f20] Codec for stream 1 does not use global headers but
container format requires global headers
[mp4 @ 0x26175e0] Codec for stream 0 does not use global headers but
container format requires global headers
[mp4 @ 0x26175e0] Codec for stream 1 does not use global headers but
container format requires global headers
[mp4 @ 0x26175e0] track 1: codec frame size is not set
Output #0, segment, to 'out_%d.mp4':
  Metadata:
    encoder         : Lavf57.20.100
    Chapter #0:0: start 0.000000, end 20.000000
    Metadata:
      title           : Chapter 01
    Stream #0:0(eng): Video: h264, yuv420p, 1280x544 [SAR 1:1 DAR 40:17],
q=2-31, 24 fps, 24 tbr, 12288 tbn, 24 tbc
    Stream #0:1(eng): Audio: ac3, 48000 Hz, 5.1(side), 640 kb/s
    Metadata:
      title           : AC3 5.1 @ 640 Kbps
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[mp4 @ 0x2796160] Codec for stream 0 does not use global headers but
container format requires global headers
[mp4 @ 0x2796160] Codec for stream 1 does not use global headers but
container format requires global headers
[mp4 @ 0x2796160] track 1: codec frame size is not set
frame=  482 fps=0.0 q=-1.0 Lsize=N/A time=00:00:20.00 bitrate=N/A speed=
223x
video:19190kB audio:1562kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: unknown

### /tmp/ffmpeg/bin/ffmpeg -y -i out_0.mp4 -map 0:1 -sn -dn -vn
-map_chapters -1 -map_metadata -1 -c:a aac -strict experimental aud_0.mp4
ffmpeg version N-77455-g4707497 Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 5.2.1 (Ubuntu 5.2.1-22ubuntu2) 20151010
  configuration: --prefix=/tmp/ffmpeg/build --pkg-config-flags=--static
--extra-cflags=-I/tmp/ffmpeg/build/include
--extra-ldflags=-L/tmp/ffmpeg/build/lib --bindir=/tmp/ffmpeg/bin
--enable-gpl --enable-libass --enable-nonfree
  libavutil      55. 11.100 / 55. 11.100
  libavcodec     57. 20.100 / 57. 20.100
  libavformat    57. 20.100 / 57. 20.100
  libavdevice    57.  0.100 / 57.  0.100
  libavfilter     6. 21.101 /  6. 21.101
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'out_0.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.20.100
  Duration: 00:00:10.42, start: 0.083000, bitrate: 8756 kb/s
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv,
bt709/unknown/unknown), 1280x544, 8114 kb/s, 24 fps, 24 tbr, 12288 tbn, 48
tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side),
fltp, 640 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
    Side data:
      audio service type: main
Output #0, mp4, to 'aud_0.mp4':
  Metadata:
    encoder         : Lavf57.20.100
    Stream #0:0: Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, 5.1(side),
fltp, 128 kb/s (default)
    Metadata:
      encoder         : Lavc57.20.100 aac
Stream mapping:
  Stream #0:1 -> #0:0 (ac3 (native) -> aac (native))
Press [q] to stop, [?] for help
size=      53kB time=00:00:03.41 bitrate= 127.9kbits/s speed=6.81x
 ^Msize=      98kB time=00:00:06.29 bitrate= 128.0kbits/s speed=6.27x
 ^Msize=     140kB time=00:00:08.93 bitrate= 128.1kbits/s speed=5.94x
 ^Msize=     164kB time=00:00:10.34 bitrate= 130.1kbits/s speed=5.78x
video:0kB audio:162kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 1.628830%
[aac @ 0x2d57ae0] Qavg: 342.997

### /tmp/ffmpeg/bin/ffmpeg -y -i out_1.mp4 -map 0:1 -sn -dn -vn
-map_chapters -1 -map_metadata -1 -c:a aac -strict experimental aud_1.mp4
ffmpeg version N-77455-g4707497 Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 5.2.1 (Ubuntu 5.2.1-22ubuntu2) 20151010
  configuration: --prefix=/tmp/ffmpeg/build --pkg-config-flags=--static
--extra-cflags=-I/tmp/ffmpeg/build/include
--extra-ldflags=-L/tmp/ffmpeg/build/lib --bindir=/tmp/ffmpeg/bin
--enable-gpl --enable-libass --enable-nonfree
  libavutil      55. 11.100 / 55. 11.100
  libavcodec     57. 20.100 / 57. 20.100
  libavformat    57. 20.100 / 57. 20.100
  libavdevice    57.  0.100 / 57.  0.100
  libavfilter     6. 21.101 /  6. 21.101
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'out_1.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.20.100
  Duration: 00:00:09.67, start: 10.419000, bitrate: 8165 kb/s
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv,
bt709/unknown/unknown), 1280x544, 7518 kb/s, 24 fps, 24 tbr, 12288 tbn, 48
tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side),
fltp, 640 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
    Side data:
      audio service type: main
Output #0, mp4, to 'aud_1.mp4':
  Metadata:
    encoder         : Lavf57.20.100
    Stream #0:0: Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, 5.1(side),
fltp, 128 kb/s (default)
    Metadata:
      encoder         : Lavc57.20.100 aac
Stream mapping:
  Stream #0:1 -> #0:0 (ac3 (native) -> aac (native))
Press [q] to stop, [?] for help
size=      28kB time=00:00:01.77 bitrate= 130.0kbits/s speed=3.53x
 ^Msize=      57kB time=00:00:03.60 bitrate= 129.1kbits/s speed=3.58x
 ^Msize=      86kB time=00:00:05.48 bitrate= 128.7kbits/s speed=3.64x
 ^Msize=     116kB time=00:00:07.38 bitrate= 128.6kbits/s speed=3.67x
 ^Msize=     145kB time=00:00:09.25 bitrate= 128.5kbits/s speed=3.68x
 ^Msize=     154kB time=00:00:09.66 bitrate= 130.5kbits/s speed=3.68x
video:0kB audio:152kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 1.650767%
[aac @ 0x36db740] Qavg: 130.559
### /tmp/ffmpeg/bin/ffmpeg -f concat -i out.cat -c copy segtest2.mp4
ffmpeg version N-77455-g4707497 Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 5.2.1 (Ubuntu 5.2.1-22ubuntu2) 20151010
  configuration: --prefix=/tmp/ffmpeg/build --pkg-config-flags=--static
--extra-cflags=-I/tmp/ffmpeg/build/include
--extra-ldflags=-L/tmp/ffmpeg/build/lib --bindir=/tmp/ffmpeg/bin
--enable-gpl --enable-libass --enable-nonfree
  libavutil      55. 11.100 / 55. 11.100
  libavcodec     57. 20.100 / 57. 20.100
  libavformat    57. 20.100 / 57. 20.100
  libavdevice    57.  0.100 / 57.  0.100
  libavfilter     6. 21.101 /  6. 21.101
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
Input #0, concat, from 'out.cat':
  Duration: N/A, start: 0.000000, bitrate: 127 kb/s
    Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1,
fltp, 127 kb/s
    Metadata:
      handler_name    : SoundHandler
[mp4 @ 0x2447180] Codec for stream 0 does not use global headers but
container format requires global headers
Output #0, mp4, to 'segtest2.mp4':
  Metadata:
    encoder         : Lavf57.20.100
    Stream #0:0(und): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, 5.1,
127 kb/s
    Metadata:
      handler_name    : SoundHandler
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
size=     318kB time=00:00:20.04 bitrate= 129.8kbits/s speed=1.15e+03x
video:0kB audio:313kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 1.412140%

Cheers,
Derek.


More information about the ffmpeg-user mailing list