Opened 3 years ago

Last modified 4 months ago

#4145 new defect

when rebroadcasting/streaming to flv format with aac_adtstoasc bitstream filter, sound gets removed

Reported by: PyroDevil Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: rtmp
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
I tried to rebroadcast a twitch stream on another channel with livestreamer and ffmpeg, but the sound went missing on the second stream.
How to reproduce:
I started the stream like this:

% livestreamer -O www.twitch.tv/otherstream worst 2>/dev/null | ffmpeg -i - -c copy -bsf:a aac_adtstoasc -f flv "rtmp://live.twitch.tv/app/live_xxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
ffmpeg version 2.4.3 Copyright (c) 2000-2014 the FFmpeg developers
  built on Nov  2 2014 09:16:45 with gcc 4.9.1 (GCC) 20140903 (prerelease)
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-avisynth --enable-avresample --enable-fontconfig --enable-gnutls --enable-gpl --enable-libass --enable-libbluray --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libv4l2 --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-runtime-cpudetect --enable-shared --enable-swresample --enable-vdpau --enable-version3 --enable-x11grab
  libavutil      54.  7.100 / 54.  7.100
  libavcodec     56.  1.100 / 56.  1.100
  libavformat    56.  4.101 / 56.  4.101
  libavdevice    56.  0.100 / 56.  0.100
  libavfilter     5.  1.100 /  5.  1.100
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  0.100 /  3.  0.100
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  0.100 / 53.  0.100
Input #0, mpegts, from 'pipe:':
  Duration: N/A, start: 81647.996000, bitrate: 128 kb/s
  Program 1 
    Stream #0:0[0x100]: Audio: aac ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 128 kb/s
    Stream #0:1[0x101]: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p, 400x226, 20 fps, 20 tbr, 90k tbn, 2k tbc
    Stream #0:2[0x102]: Data: timed_id3 (ID3  / 0x20334449)
Output #0, flv, to 'rtmp://live.twitch.tv/app/live_xxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx':
  Metadata:
    encoder         : Lavf56.4.101
    Stream #0:0: Video: h264 ([7][0][0][0] / 0x0007), yuv420p, 400x226, q=2-31, 20 fps, 1k tbn, 90k tbc
    Stream #0:1: Audio: aac ([10][0][0][0] / 0x000A), 44100 Hz, stereo, 128 kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (copy)
  Stream #0:0 -> #0:1 (copy)
frame=  118 fps=0.0 q=-1.0 size=     143kB time=00:00:06.01 bitrate= 195.1kbits/s    
frame=  119 fps= 60 q=-1.0 size=     144kB time=00:00:06.04 bitrate= 195.7kbits/s    
frame=  197 fps= 38 q=-1.0 size=     245kB time=00:00:09.94 bitrate= 202.2kbits/s    
frame=  279 fps= 33 q=-1.0 size=     349kB time=00:00:14.03 bitrate= 203.7kbits/s    
frame=  316 fps= 27 q=-1.0 size=     387kB time=00:00:15.93 bitrate= 198.9kbits/s    
frame=  397 fps= 26 q=-1.0 size=     482kB time=00:00:19.99 bitrate= 197.5kbits/s    
frame=  479 fps= 27 q=-1.0 size=     577kB time=00:00:24.03 bitrate= 196.7kbits/s    
frame=  519 fps= 25 q=-1.0 size=     629kB time=00:00:26.03 bitrate= 198.1kbits/s    
frame=  598 fps= 24 q=-1.0 size=     727kB time=00:00:30.02 bitrate= 198.3kbits/s    
frame=  677 fps= 24 q=-1.0 size=     824kB time=00:00:33.97 bitrate= 198.8kbits/s    
frame=  718 fps= 23 q=-1.0 size=     870kB time=00:00:35.99 bitrate= 197.9kbits/s    
[flv @ 0x1297c80] Failed to update header with correct duration.
[flv @ 0x1297c80] Failed to update header with correct filesize.
frame=  755 fps= 22 q=-1.0 Lsize=     918kB time=00:00:37.90 bitrate= 198.4kbits/s    
video:282kB audio:592kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 4.998726%
Received signal 2: terminating.

And this is the came out of the other stream:

% livestreamer -O www.twitch.tv/mystream worst 2> /dev/null | ffmpeg -i -
ffmpeg version 2.4.3 Copyright (c) 2000-2014 the FFmpeg developers
  built on Nov  2 2014 09:16:45 with gcc 4.9.1 (GCC) 20140903 (prerelease)
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-avisynth --enable-avresample --enable-fontconfig --enable-gnutls --enable-gpl --enable-libass --enable-libbluray --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libv4l2 --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-runtime-cpudetect --enable-shared --enable-swresample --enable-vdpau --enable-version3 --enable-x11grab
  libavutil      54.  7.100 / 54.  7.100
  libavcodec     56.  1.100 / 56.  1.100
  libavformat    56.  4.101 / 56.  4.101
  libavdevice    56.  0.100 / 56.  0.100
  libavfilter     5.  1.100 /  5.  1.100
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  0.100 /  3.  0.100
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  0.100 / 53.  0.100
Input #0, mpegts, from 'pipe:':
  Duration: N/A, start: 138.000000, bitrate: N/A
  Program 1 
    Stream #0:0[0x101]: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p, 400x226, 20 fps, 20 tbr, 90k tbn, 2k tbc
    Stream #0:1[0x102]: Data: timed_id3 (ID3  / 0x20334449)
At least one output file must be specified

Change History (11)

comment:1 Changed 3 years ago by PyroDevil

  • Version changed from unspecified to 2.4.3

comment:2 Changed 3 years ago by cehoyos

Is the issue also reproducible with current FFmpeg git head?
Is network input and network output required to reproduce the issue? Or is it also reproducible with file input and / or file output?

comment:3 Changed 3 years ago by PyroDevil

I will try it with the git head now and report back.
I tested it with flv file output, but this file had a working audio channel. So at least output streaming is necessary to reproduce it.

Last edited 3 years ago by PyroDevil (previous) (diff)

comment:4 Changed 3 years ago by PyroDevil

Ok, I tried it with the git head version of ffmpeg, same result.

Streaming:

% livestreamer -O www.twitch.tv/otherstream worst 2>/dev/null | ffmpeg -i - -c copy -bsf:a aac_adtstoasc -f flv "rtmp://live.twitch.tv/app/live_xxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
ffmpeg version N-68129-g928322c Copyright (c) 2000-2014 the FFmpeg developers
  built on Dec  1 2014 13:02:26 with gcc 4.9.2 (GCC)
  configuration: --prefix=/usr --disable-static --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree --enable-shared --enable-x11grab
  libavutil      54. 15.100 / 54. 15.100
  libavcodec     56. 13.100 / 56. 13.100
  libavformat    56. 15.101 / 56. 15.101
  libavdevice    56.  3.100 / 56.  3.100
  libavfilter     5.  2.103 /  5.  2.103
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Input #0, mpegts, from 'pipe:':
  Duration: N/A, start: 43820.315000, bitrate: 114 kb/s
  Program 1 
    Stream #0:0[0x100]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 114 kb/s
    Stream #0:1[0x101]: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p, 400x226, 20 fps, 20 tbr, 90k tbn, 2k tbc
    Stream #0:2[0x102]: Data: timed_id3 (ID3  / 0x20334449)
Output #0, flv, to 'rtmp://live.twitch.tv/app/live_xxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx':
  Metadata:
    encoder         : Lavf56.15.101
    Stream #0:0: Video: h264 ([7][0][0][0] / 0x0007), yuv420p, 400x226, q=2-31, 20 fps, 1k tbn, 90k tbc
    Stream #0:1: Audio: aac ([10][0][0][0] / 0x000A), 44100 Hz, stereo, 114 kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (copy)
  Stream #0:0 -> #0:1 (copy)
frame=   78 fps=0.0 q=-1.0 size=     102kB time=00:00:03.99 bitrate= 208.5kbits/s    
frame=  118 fps=108 q=-1.0 size=     149kB time=00:00:06.01 bitrate= 203.4kbits/s    
frame=  158 fps= 37 q=-1.0 size=     204kB time=00:00:08.03 bitrate= 208.2kbits/s    
frame=  238 fps= 32 q=-1.0 size=     308kB time=00:00:12.00 bitrate= 210.2kbits/s    
frame=  275 fps= 26 q=-1.0 size=     356kB time=00:00:13.90 bitrate= 209.7kbits/s    
frame=  358 fps= 31 q=-1.0 size=     463kB time=00:00:18.04 bitrate= 210.4kbits/s    
frame=  398 fps= 29 q=-1.0 size=     513kB time=00:00:20.03 bitrate= 209.9kbits/s    
frame=  437 fps= 26 q=-1.0 size=     566kB time=00:00:21.96 bitrate= 211.2kbits/s    
frame=  516 fps= 26 q=-1.0 size=     673kB time=00:00:25.96 bitrate= 212.4kbits/s    
frame=  558 fps= 24 q=-1.0 size=     724kB time=00:00:27.98 bitrate= 211.9kbits/s    
frame=  637 fps= 24 q=-1.0 size=     826kB time=00:00:31.95 bitrate= 211.7kbits/s    
frame=  718 fps= 24 q=-1.0 size=     925kB time=00:00:36.03 bitrate= 210.2kbits/s    
frame=  758 fps= 23 q=-1.0 size=     979kB time=00:00:38.01 bitrate= 210.9kbits/s    
frame=  798 fps= 22 q=-1.0 size=    1033kB time=00:00:39.98 bitrate= 211.7kbits/s    
frame=  838 fps= 22 q=-1.0 size=    1083kB time=00:00:42.05 bitrate= 211.0kbits/s    
frame=  918 fps= 23 q=-1.0 size=    1187kB time=00:00:46.04 bitrate= 211.2kbits/s    
frame=  957 fps= 23 q=-1.0 size=    1237kB time=00:00:47.94 bitrate= 211.3kbits/s    
frame=  998 fps= 22 q=-1.0 size=    1293kB time=00:00:50.03 bitrate= 211.6kbits/s    
frame= 1078 fps= 22 q=-1.0 size=    1394kB time=00:00:54.03 bitrate= 211.4kbits/s    
frame= 1118 fps= 22 q=-1.0 size=    1444kB time=00:00:56.05 bitrate= 211.0kbits/s    
frame= 1198 fps= 22 q=-1.0 size=    1546kB time=00:01:00.04 bitrate= 210.9kbits/s    
frame= 1238 fps= 22 q=-1.0 size=    1599kB time=00:01:02.02 bitrate= 211.3kbits/s    
frame= 1278 fps= 21 q=-1.0 size=    1652kB time=00:01:04.04 bitrate= 211.4kbits/s    
[flv @ 0x10f6c80] Failed to update header with correct duration.
[flv @ 0x10f6c80] Failed to update header with correct filesize.
frame= 1358 fps= 21 q=-1.0 Lsize=    1761kB time=00:01:08.01 bitrate= 212.2kbits/s    
video:620kB audio:1063kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 4.644344%
Received signal 2: terminating.

and receiving:

% livestreamer -O www.twitch.tv/mystream worst 2>/dev/null | ffmpeg -i -
ffmpeg version N-68129-g928322c Copyright (c) 2000-2014 the FFmpeg developers
  built on Dec  1 2014 13:02:26 with gcc 4.9.2 (GCC)
  configuration: --prefix=/usr --disable-static --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree --enable-shared --enable-x11grab
  libavutil      54. 15.100 / 54. 15.100
  libavcodec     56. 13.100 / 56. 13.100
  libavformat    56. 15.101 / 56. 15.101
  libavdevice    56.  3.100 / 56.  3.100
  libavfilter     5.  2.103 /  5.  2.103
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Input #0, mpegts, from 'pipe:':
  Duration: N/A, start: 94.022000, bitrate: N/A
  Program 1 
    Stream #0:0[0x101]: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p, 400x226, 20 fps, 20 tbr, 90k tbn, 2k tbc
    Stream #0:1[0x102]: Data: timed_id3 (ID3  / 0x20334449)
At least one output file must be specified
Last edited 3 years ago by PyroDevil (previous) (diff)

comment:5 Changed 3 years ago by PyroDevil

  • Version changed from 2.4.3 to git-master

comment:6 Changed 3 years ago by PyroDevil

I also tried it without twitch in between, but the problem doesn't occur:

% livestreamer -O www.twitch.tv/otherstream worst 2>/dev/null | ffmpeg -i - -c copy -bsf:a aac_adtstoasc -f flv pipe:1 2>/dev/null | ffmpeg -i -
ffmpeg version N-68130-gb50e003 Copyright (c) 2000-2014 the FFmpeg developers
  built on Dec  1 2014 14:44:49 with gcc 4.9.2 (GCC)
  configuration: --prefix=/usr --disable-static --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree --enable-shared --enable-x11grab
  libavutil      54. 15.100 / 54. 15.100
  libavcodec     56. 13.100 / 56. 13.100
  libavformat    56. 15.101 / 56. 15.101
  libavdevice    56.  3.100 / 56.  3.100
  libavfilter     5.  2.103 /  5.  2.103
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Input #0, flv, from 'pipe:':
  Metadata:
    encoder         : Lavf56.15.101
  Duration: 00:00:00.00, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: h264 (Constrained Baseline), yuv420p, 400x226, 20 fps, 20 tbr, 1k tbn, 2k tbc
    Stream #0:1: Audio: aac, 44100 Hz, stereo, fltp, 127 kb/s
At least one output file must be specified

So could it be the rtmp protocol?

Last edited 3 years ago by PyroDevil (previous) (diff)

comment:7 Changed 3 years ago by PyroDevil

Now I tried using a file and streaming it to twitch. Everything went fine.
(Notice that I didn't use the aac_adtstoasc bitstream filter, because it's not necessary in this case)

Streaming:

% ffmpeg -i video.mkv -c copy -f flv "rtmp://live.twitch.tv/app/live_xxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
ffmpeg version N-68130-gb50e003 Copyright (c) 2000-2014 the FFmpeg developers
  built on Dec  1 2014 14:44:49 with gcc 4.9.2 (GCC)
  configuration: --prefix=/usr --disable-static --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree --enable-shared --enable-x11grab
  libavutil      54. 15.100 / 54. 15.100
  libavcodec     56. 13.100 / 56. 13.100
  libavformat    56. 15.101 / 56. 15.101
  libavdevice    56.  3.100 / 56.  3.100
  libavfilter     5.  2.103 /  5.  2.103
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Input #0, matroska,webm, from 'video.mkv':
  Metadata:
    COMPATIBLE_BRANDS: iso6mp41
    MAJOR_BRAND     : dash
    MINOR_VERSION   : 0
    ENCODER         : Lavf56.4.101
  Duration: 00:52:19.47, start: 0.033000, bitrate: 2939 kb/s
    Stream #0:0(und): Video: h264 (High), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 1k tbn, 60 tbc (default)
    Metadata:
      CREATION_TIME   : 2014-11-28 16:36:46
      LANGUAGE        : und
      HANDLER_NAME    : VideoHandler
    Stream #0:1(und): Audio: aac (LC), 44100 Hz, stereo, fltp (default)
    Metadata:
      CREATION_TIME   : 2014-11-28 16:36:23
      LANGUAGE        : und
      HANDLER_NAME    : SoundHandler
Output #0, flv, to 'rtmp://live.twitch.tv/app/live_xxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx':
  Metadata:
    COMPATIBLE_BRANDS: iso6mp41
    MAJOR_BRAND     : dash
    MINOR_VERSION   : 0
    encoder         : Lavf56.15.101
    Stream #0:0(und): Video: h264 ([7][0][0][0] / 0x0007), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 30 fps, 1k tbn, 1k tbc (default)
    Metadata:
      CREATION_TIME   : 2014-11-28 16:36:46
      LANGUAGE        : und
      HANDLER_NAME    : VideoHandler
    Stream #0:1(und): Audio: aac ([10][0][0][0] / 0x000A), 44100 Hz, stereo (default)
    Metadata:
      CREATION_TIME   : 2014-11-28 16:36:23
      LANGUAGE        : und
      HANDLER_NAME    : SoundHandler
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=    7 fps=0.0 q=-1.0 size=     197kB time=00:00:00.20 bitrate=7732.1kbits/s    
frame=   17 fps= 15 q=-1.0 size=     826kB time=00:00:00.51 bitrate=13246.4kbits/s    
frame=  151 fps= 64 q=-1.0 size=    2160kB time=00:00:05.01 bitrate=3527.9kbits/s    
frame=  185 fps= 51 q=-1.0 size=    2697kB time=00:00:06.10 bitrate=3617.4kbits/s    
frame=  302 fps= 70 q=-1.0 size=    3960kB time=00:00:10.00 bitrate=3241.8kbits/s    
frame=  334 fps= 69 q=-1.0 size=    4191kB time=00:00:11.07 bitrate=3100.0kbits/s    
frame=  346 fps= 64 q=-1.0 size=    4465kB time=00:00:11.47 bitrate=3188.8kbits/s    
frame=  381 fps= 63 q=-1.0 size=    4766kB time=00:00:12.67 bitrate=3079.9kbits/s    
frame=  403 fps= 62 q=-1.0 size=    5041kB time=00:00:13.37 bitrate=3087.5kbits/s    
frame=  429 fps= 61 q=-1.0 size=    5402kB time=00:00:14.23 bitrate=3109.0kbits/s    
frame=  452 fps= 58 q=-1.0 size=    5849kB time=00:00:15.00 bitrate=3194.0kbits/s    
frame=  509 fps= 61 q=-1.0 size=    6229kB time=00:00:16.90 bitrate=3018.8kbits/s    
frame=  536 fps= 60 q=-1.0 size=    6678kB time=00:00:17.81 bitrate=3071.9kbits/s    
frame=  564 fps= 60 q=-1.0 size=    7019kB time=00:00:18.76 bitrate=3064.9kbits/s    
[flv @ 0x13406a0] Failed to update header with correct duration.
[flv @ 0x13406a0] Failed to update header with correct filesize.
frame=  615 fps= 61 q=-1.0 Lsize=    7560kB time=00:00:20.45 bitrate=3027.4kbits/s    
video:6900kB audio:633kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.359983%
Received signal 2: terminating.

and receiving:

% livestreamer -O www.twitch.tv/mystream worst 2> /dev/null | ffmpeg -i -
ffmpeg version N-68130-gb50e003 Copyright (c) 2000-2014 the FFmpeg developers
  built on Dec  1 2014 14:44:49 with gcc 4.9.2 (GCC)
  configuration: --prefix=/usr --disable-static --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree --enable-shared --enable-x11grab
  libavutil      54. 15.100 / 54. 15.100
  libavcodec     56. 13.100 / 56. 13.100
  libavformat    56. 15.101 / 56. 15.101
  libavdevice    56.  3.100 / 56.  3.100
  libavfilter     5.  2.103 /  5.  2.103
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
[h264 @ 0x24d8740] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x24d8740] decode_slice_header error
[h264 @ 0x24d8740] no frame!
[h264 @ 0x24d8740] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x24d8740] decode_slice_header error
[h264 @ 0x24d8740] no frame!
[h264 @ 0x24d8740] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x24d8740] decode_slice_header error
[h264 @ 0x24d8740] no frame!
[h264 @ 0x24d8740] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x24d8740] decode_slice_header error
[h264 @ 0x24d8740] no frame!
[h264 @ 0x24d8740] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x24d8740] decode_slice_header error
[h264 @ 0x24d8740] no frame!
[h264 @ 0x24d8740] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x24d8740] decode_slice_header error
[h264 @ 0x24d8740] no frame!
[h264 @ 0x24d8740] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x24d8740] decode_slice_header error
[h264 @ 0x24d8740] no frame!
[h264 @ 0x24d8740] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x24d8740] decode_slice_header error
[h264 @ 0x24d8740] no frame!
[h264 @ 0x24d8740] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x24d8740] decode_slice_header error
[h264 @ 0x24d8740] no frame!
[h264 @ 0x24d8740] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x24d8740] decode_slice_header error
[h264 @ 0x24d8740] no frame!
[h264 @ 0x24d8740] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x24d8740] decode_slice_header error
[h264 @ 0x24d8740] no frame!
[h264 @ 0x24d8740] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x24d8740] decode_slice_header error
[h264 @ 0x24d8740] no frame!
[h264 @ 0x24d8740] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x24d8740] decode_slice_header error
[h264 @ 0x24d8740] no frame!
[h264 @ 0x24d8740] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x24d8740] decode_slice_header error
[h264 @ 0x24d8740] no frame!
[h264 @ 0x24d8740] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x24d8740] decode_slice_header error
[h264 @ 0x24d8740] no frame!
[h264 @ 0x24d8740] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x24d8740] decode_slice_header error
[h264 @ 0x24d8740] no frame!
[h264 @ 0x24d8740] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x24d8740] decode_slice_header error
[h264 @ 0x24d8740] no frame!
[h264 @ 0x24d8740] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x24d8740] decode_slice_header error
[h264 @ 0x24d8740] no frame!
[h264 @ 0x24d8740] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x24d8740] decode_slice_header error
[h264 @ 0x24d8740] no frame!
[h264 @ 0x24d8740] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x24d8740] decode_slice_header error
[h264 @ 0x24d8740] no frame!
[h264 @ 0x24d8740] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x24d8740] decode_slice_header error
[h264 @ 0x24d8740] no frame!
[h264 @ 0x24d8740] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x24d8740] decode_slice_header error
[h264 @ 0x24d8740] no frame!
Input #0, mpegts, from 'pipe:':
  Duration: N/A, start: 94.282789, bitrate: 247 kb/s
  Program 1 
    Stream #0:0[0x100]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 247 kb/s
    Stream #0:1[0x101]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 90k tbn, 60 tbc
    Stream #0:2[0x102]: Data: timed_id3 (ID3  / 0x20334449)
At least one output file must be specified
Last edited 3 years ago by PyroDevil (previous) (diff)

comment:8 Changed 3 years ago by PyroDevil

So I now have setup a local nginx server to receive the stream instead of twitch. On this server it works. Apparently it has something to do with the implementation of the communication between ffmpeg and the twitch servers.

Here is the streaming log:

% livestreamer -O www.twitch.tv/otherstream worst 2>/dev/null | ffmpeg -i - -c copy -bsf:a aac_adtstoasc -f flv "rtmp://localhost/live/test"
ffmpeg version N-68130-gb50e003 Copyright (c) 2000-2014 the FFmpeg developers
  built on Dec  1 2014 14:44:49 with gcc 4.9.2 (GCC)
  configuration: --prefix=/usr --disable-static --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree --enable-shared --enable-x11grab
  libavutil      54. 15.100 / 54. 15.100
  libavcodec     56. 13.100 / 56. 13.100
  libavformat    56. 15.101 / 56. 15.101
  libavdevice    56.  3.100 / 56.  3.100
  libavfilter     5.  2.103 /  5.  2.103
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Input #0, mpegts, from 'pipe:':
  Duration: N/A, start: 63896.314000, bitrate: 136 kb/s
  Program 1 
    Stream #0:0[0x100]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 136 kb/s
    Stream #0:1[0x101]: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p, 400x226, 20 fps, 20 tbr, 90k tbn, 2k tbc
    Stream #0:2[0x102]: Data: timed_id3 (ID3  / 0x20334449)
[tcp @ 0x1480700] Connection to tcp://localhost:1935 failed (Connection refused), trying next address
Output #0, flv, to 'rtmp://localhost/live/test':
  Metadata:
    encoder         : Lavf56.15.101
    Stream #0:0: Video: h264 ([7][0][0][0] / 0x0007), yuv420p, 400x226, q=2-31, 20 fps, 1k tbn, 90k tbc
    Stream #0:1: Audio: aac ([10][0][0][0] / 0x000A), 44100 Hz, stereo, 136 kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (copy)
  Stream #0:0 -> #0:1 (copy)
frame=  118 fps= 42 q=-1.0 size=     150kB time=00:00:06.06 bitrate= 202.4kbits/s    
frame=  198 fps= 33 q=-1.0 size=     246kB time=00:00:10.05 bitrate= 200.1kbits/s    
frame=  278 fps= 31 q=-1.0 size=     344kB time=00:00:14.04 bitrate= 200.6kbits/s    
frame=  358 fps= 26 q=-1.0 size=     438kB time=00:00:18.04 bitrate= 199.1kbits/s    
frame=  438 fps= 26 q=-1.0 size=     537kB time=00:00:22.05 bitrate= 199.3kbits/s    
frame=  478 fps= 24 q=-1.0 size=     585kB time=00:00:24.05 bitrate= 199.3kbits/s    
frame=  558 fps= 24 q=-1.0 size=     682kB time=00:00:28.05 bitrate= 199.1kbits/s    
frame=  596 fps= 23 q=-1.0 size=     728kB time=00:00:29.90 bitrate= 199.3kbits/s    
frame=  636 fps= 22 q=-1.0 size=     776kB time=00:00:31.95 bitrate= 199.1kbits/s    
frame=  718 fps= 22 q=-1.0 size=     879kB time=00:00:36.06 bitrate= 199.8kbits/s    
frame=  758 fps= 21 q=-1.0 size=     925kB time=00:00:37.98 bitrate= 199.5kbits/s    
frame=  836 fps= 22 q=-1.0 size=    1022kB time=00:00:41.95 bitrate= 199.6kbits/s    
frame=  878 fps= 21 q=-1.0 size=    1070kB time=00:00:43.97 bitrate= 199.3kbits/s    
frame=  958 fps= 22 q=-1.0 size=    1170kB time=00:00:48.04 bitrate= 199.5kbits/s    
frame=  998 fps= 21 q=-1.0 size=    1215kB time=00:00:49.96 bitrate= 199.1kbits/s    
[flv @ 0x1421ea0] Failed to update header with correct duration.
[flv @ 0x1421ea0] Failed to update header with correct filesize.
frame= 1077 fps= 21 q=-1.0 Lsize=    1313kB time=00:00:53.98 bitrate= 199.2kbits/s    
video:407kB audio:844kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 4.967333%
Received signal 2: terminating.

And here the receiving again:

% ffmpeg -i 'rtmp://localhost/live/test'
ffmpeg version N-68130-gb50e003 Copyright (c) 2000-2014 the FFmpeg developers
  built on Dec  1 2014 14:44:49 with gcc 4.9.2 (GCC)
  configuration: --prefix=/usr --disable-static --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree --enable-shared --enable-x11grab
  libavutil      54. 15.100 / 54. 15.100
  libavcodec     56. 13.100 / 56. 13.100
  libavformat    56. 15.101 / 56. 15.101
  libavdevice    56.  3.100 / 56.  3.100
  libavfilter     5.  2.103 /  5.  2.103
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
[tcp @ 0x1fe50c0] Connection to tcp://localhost:1935 failed (Connection refused), trying next address
[flv @ 0x1fe6000] Stream discovered after head already parsed
    Last message repeated 1 times
Input #0, flv, from 'rtmp://localhost/live/test':
  Metadata:
    Server          : NGINX RTMP (github.com/arut/nginx-rtmp-module)
    displayWidth    : 400
    displayHeight   : 226
    fps             : 20
    profile         : 
    level           : 
  Duration: 00:00:00.00, start: 23.893000, bitrate: N/A
    Stream #0:0: Audio: aac, 44100 Hz, stereo, fltp, 136 kb/s
    Stream #0:1: Data: none
    Stream #0:2: Video: h264 (Constrained Baseline), yuv420p, 400x226, 20 fps, 20 tbr, 1k tbn, 2k tbc
At least one output file must be specified

Now I am not sure how to proceed any further. Or have I tested it wrong by listening to the exact same rtmp address?

comment:9 follow-up: Changed 2 years ago by AleXoundOS

I confirm that the issue exists with ffmpeg 2.7.1.

comment:10 in reply to: ↑ 9 Changed 2 years ago by cehoyos

  • Keywords rtmp added

Replying to AleXoundOS:

I confirm that the issue exists with ffmpeg 2.7.1.

Please test current git head.

Can you debug what goes wrong communicating with twitch?

comment:11 Changed 4 months ago by ipacker

I believe YouTube? recently (June 2017) made changes to their ingestion system and this problem can now be seen against their rtmp receiver too. Previously YouTube? were accepting these streams.

It seems to be caused when taking a video/audio stream from HLS/MPEGTS and passing it to RTMP via codec copy and aac_adtstoasc. Re-encoding just the audio fixes the problem instantly.

Tested using latest git head from 14th June 2017.

Note: See TracTickets for help on using tickets.