Opened 7 years ago

Last modified 7 years ago

#6914 new defect

Two Smoothstreaming Outputs

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

Description

Summary of the bug:
Hello!

I'm using the tee option to use the same encoding options for different outputs. I need to have two SmoothStreaming outputs, but for some reason I can´t.

I'm using cuda from nvidia.
How to reproduce:

ffmpeg -nostdin -loglevel verbose -hwaccel_device 0 -hwaccel cuvid -c:v h264_cuvid -y -re -i udp://239.255.0.21:2122?pkt_size=1316\&buffer_size=409600\&fifo_size=1000000\&overrun_nonfatal=1 -f tee -map i:0x2b -c:a libfdk_aac -ac 2 -bsf:a aac_adtstoasc -b:a: 64k -map 0:v -filter:v:0 scale_npp=w=1920:h=1080 -c:v:0 h264_nvenc -preset llhq -bf 2 -g 50 -keyint_min 50 -forced-idr 1 -aud 1 -strict_gop 1 -b:v:0 2000k -maxrate:0 2160k -bufsize:0 5000k -bsf:v h264_mp4toannexb -map 0:v -filter:v:1 scale_npp=w=1920:h=1080 -c:v:1 h264_nvenc -preset llhq -bf 2 -g 50 -keyint_min 50 -forced-idr 1 -aud 1 -strict_gop 1 -b:v:1 2500k -maxrate:1 2700k -bufsize:1 6250k -bsf:v h264_mp4toannexb -metadata:s:a:0 language=spa "[f=ismv]http://192.168.1.69/Teledoce_HD_0/Teledoce_HD.isml/Streams(video)|[f=ismv]http://192.168.1.69/Teledoce_HD_1/Teledoce_HD.isml/Streams(video)"

I'm having as error, but I don't know if it has any sense:

av_interleaved_write_frame(): Operation not permitted

Thanks!

Change History (3)

comment:1 by Carl Eugen Hoyos, 7 years ago

Keywords: ffmpeg nvidia cuda smoothstreaming outputs removed

Please provide a simplified command line that allows to reproduce the issue together with the complete, uncut console output to make this a valid ticket.

comment:2 by Facundo, 7 years ago

Complete input & output:

root@ubuntu:/code/src# ffmpeg -nostdin -loglevel verbose -hwaccel_device 0 -hwaccel cuvid -c:v h264_cuvid -y -re -i udp://239.255.0.22:2224?pkt_size=1316\&buffer_size=409600\&fifo_size=1000000\&overrun_nonfatal=1 -c:a libfdk_aac -ac 2 -bsf:a aac_adtstoasc -b:a 64k -filter:v scale_npp=w=1920:h=1080 -c:v h264_nvenc -preset llhq -g 50 -keyint_min 50 -b:v 2000k -maxrate 2160k -bufsize 5000k -f tee -map 0:a -map 0:v "[movflags=isml+frag_keyframe:f=ismv]http://192.168.1.69/FX_HD_0/FX_HD_0.isml/Streams(video)|[movflags=isml+frag_keyframe:f=ismv]http://192.168.1.69/FX_HD_1/FX_HD_1.isml/Streams(video)"ffmpeg version N-89317-gda49cdf Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.5) 20160609
  configuration: --prefix=/usr/local/ffmpeg_build --extra-cflags='-I/usr/local/ffmpeg_build/include -I/usr/local/cuda/include/' --disable-yasm --extra-ldflags='-L/usr/local/ffmpeg_build/lib -L/usr/local/cuda/lib64/' --bindir=/usr/local/bin --extra-libs=-ldl --enable-nvenc --enable-cuda --enable-libnpp --enable-cuvid --enable-gpl --enable-libx264 --enable-libfdk-aac --enable-nonfree --enable-version3
  libavutil      56.  3.100 / 56.  3.100
  libavcodec     58.  6.101 / 58.  6.101
  libavformat    58.  2.103 / 58.  2.103
  libavdevice    58.  0.100 / 58.  0.100
  libavfilter     7.  5.100 /  7.  5.100
  libswscale      5.  0.101 /  5.  0.101
  libswresample   3.  0.101 /  3.  0.101
  libpostproc    55.  0.100 / 55.  0.100
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] decode_slice_header error
[h264 @ 0x3a3e5a0] no frame!
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] decode_slice_header error
[h264 @ 0x3a3e5a0] no frame!
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] decode_slice_header error
[h264 @ 0x3a3e5a0] no frame!
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] decode_slice_header error
[h264 @ 0x3a3e5a0] no frame!
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] decode_slice_header error
[h264 @ 0x3a3e5a0] no frame!
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] decode_slice_header error
[h264 @ 0x3a3e5a0] no frame!
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] decode_slice_header error
[h264 @ 0x3a3e5a0] no frame!
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] decode_slice_header error
[h264 @ 0x3a3e5a0] no frame!
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] decode_slice_header error
[h264 @ 0x3a3e5a0] no frame!
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] decode_slice_header error
[h264 @ 0x3a3e5a0] no frame!
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] decode_slice_header error
[h264 @ 0x3a3e5a0] no frame!
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] decode_slice_header error
[h264 @ 0x3a3e5a0] no frame!
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] decode_slice_header error
[h264 @ 0x3a3e5a0] no frame!
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] decode_slice_header error
[h264 @ 0x3a3e5a0] no frame!
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] decode_slice_header error
[h264 @ 0x3a3e5a0] no frame!
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] decode_slice_header error
[h264 @ 0x3a3e5a0] no frame!
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] decode_slice_header error
[h264 @ 0x3a3e5a0] no frame!
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] decode_slice_header error
[h264 @ 0x3a3e5a0] no frame!
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] decode_slice_header error
[h264 @ 0x3a3e5a0] no frame!
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] decode_slice_header error
[h264 @ 0x3a3e5a0] no frame!
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] SPS unavailable in decode_picture_timing
[h264 @ 0x3a3e5a0] non-existing PPS 0 referenced
[h264 @ 0x3a3e5a0] decode_slice_header error
[h264 @ 0x3a3e5a0] no frame!
[h264 @ 0x3a3e5a0] Reinit context to 1920x1088, pix_fmt: yuv420p
[mpegts @ 0x3a19520] DTS 7381876790 < 7381881294 out of order
[h264 @ 0x3a3e5a0] Increasing reorder buffer to 2
[mpegts @ 0x3a19520] max_analyze_duration 5000000 reached at 5024000 microseconds st:2
Input #0, mpegts, from 'udp://239.255.0.22:2224?pkt_size=1316&buffer_size=409600&fifo_size=1000000&overrun_nonfatal=1':
  Duration: N/A, start: 82019.725844, bitrate: N/A
  Program 257 
    Stream #0:0[0x134c]: Video: h264 (Main), 1 reference frame ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, top first, left), 1920x1080 (1920x1088) [SAR 1:1 DAR 16:9], 29.97 fps, 59.94 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x134d](spa): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, 5.1(side), fltp, 384 kb/s
    Stream #0:2[0x134f](eng): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, stereo, fltp, 128 kb/s
    Stream #0:3[0x1351](spa): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
[h264_cuvid @ 0x3a37c80] Initializing cuvid hwaccel
[AVBSFContext @ 0x45c1320] The input looks like it is Annex B already
[h264_cuvid @ 0x3a37c80] CUVID capabilities for h264_cuvid:
[h264_cuvid @ 0x3a37c80] 8 bit: supported: 1, min_width: 48, max_width: 4096, min_height: 16, max_height: 4096
[h264_cuvid @ 0x3a37c80] 10 bit: supported: 0, min_width: 0, max_width: 0, min_height: 0, max_height: 0
[h264_cuvid @ 0x3a37c80] 12 bit: supported: 0, min_width: 0, max_width: 0, min_height: 0, max_height: 0
Stream mapping:
  Stream #0:1 -> #0:0 (ac3 (native) -> aac (libfdk_aac))
  Stream #0:2 -> #0:1 (ac3 (native) -> aac (libfdk_aac))
  Stream #0:0 -> #0:2 (h264 (h264_cuvid) -> h264 (h264_nvenc))
[h264_cuvid @ 0x3a37c80] Initializing cuvid hwaccel
[h264_cuvid @ 0x3a37c80] Formats: Original: cuda | HW: cuda | SW: nv12
[graph_1_in_0_2 @ 0x3acafe0] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:0x3
[format_out_0_1 @ 0x3acae20] auto-inserting filter 'auto_resampler_0' between the filter 'Parsed_anull_0' and the filter 'format_out_0_1'
[auto_resampler_0 @ 0x3abdc80] ch:2 chl:stereo fmt:fltp r:48000Hz -> ch:2 chl:stereo fmt:s16 r:48000Hz
[graph_0_in_0_1 @ 0x4835240] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:0x60f
[format_out_0_0 @ 0x48391c0] auto-inserting filter 'auto_resampler_0' between the filter 'Parsed_anull_0' and the filter 'format_out_0_0'
[auto_resampler_0 @ 0x48372a0] ch:6 chl:5.1(side) fmt:fltp r:48000Hz -> ch:2 chl:stereo fmt:s16 r:48000Hz
[graph 2 input from stream 0:0 @ 0x48388e0] w:1920 h:1080 pixfmt:cuda tb:1/90000 fr:30000/1001 sar:1/1 sws_param:flags=2
[Parsed_scale_npp_0 @ 0x48c7600] w:1920 h:1080 -> w:1920 h:1080
[h264_nvenc @ 0x3a44720] Loaded Nvenc version 8.0
[h264_nvenc @ 0x3a44720] Nvenc initialized successfully
[ismv @ 0x498dfc0] Empty MOOV enabled; disabling automatic bitstream filtering
[tee @ 0x3fe8ae0] filename:'http://192.168.1.69/FX_HD_0/FX_HD_0.isml/Streams(video)' format:ismv
[tee @ 0x3fe8ae0]     stream:0 codec:aac type:audio bsfs: null
[tee @ 0x3fe8ae0]     stream:1 codec:aac type:audio bsfs: null
[tee @ 0x3fe8ae0]     stream:2 codec:h264 type:video bsfs: null
[ismv @ 0x499cf20] Empty MOOV enabled; disabling automatic bitstream filtering
[tee @ 0x3fe8ae0] filename:'http://192.168.1.69/FX_HD_1/FX_HD_1.isml/Streams(video)' format:ismv
[tee @ 0x3fe8ae0]     stream:0 codec:aac type:audio bsfs: null
[tee @ 0x3fe8ae0]     stream:1 codec:aac type:audio bsfs: null
[tee @ 0x3fe8ae0]     stream:2 codec:h264 type:video bsfs: null
Output #0, tee, to '[movflags=isml+frag_keyframe:f=ismv]http://192.168.1.69/FX_HD_0/FX_HD_0.isml/Streams(video)|[movflags=isml+frag_keyframe:f=ismv]http://192.168.1.69/FX_HD_1/FX_HD_1.isml/Streams(video)':
  Metadata:
    encoder         : Lavf58.2.103
    Stream #0:0(spa): Audio: aac (libfdk_aac), 48000 Hz, stereo, s16, delay 2048, 64 kb/s
    Metadata:
      encoder         : Lavc58.6.101 libfdk_aac
    Stream #0:1(eng): Audio: aac (libfdk_aac), 48000 Hz, stereo, s16, delay 2048, 64 kb/s
    Metadata:
      encoder         : Lavc58.6.101 libfdk_aac
    Stream #0:2: Video: h264 (h264_nvenc) (Main), 1 reference frame, cuda(left), 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 2000 kb/s, 29.97 fps, 29.97 tbn, 29.97 tbc
    Metadata:
      encoder         : Lavc58.6.101 h264_nvenc
    Side data:
      cpb: bitrate max/min/avg: 2160000/0/2000000 buffer size: 4000000 vbv_delay: -1
*** 32 dup!
[tee @ 0x3fe8ae0] Slave muxer #0 failed, aborting.33 bitrate=N/A dup=32 drop=0 speed=   1x     
[tee @ 0x3fe8ae0] All tee outputs failed.
av_interleaved_write_frame(): Broken pipe
No more output streams to write to, finishing.
frame=  976 fps= 30 q=26.0 Lsize=N/A time=00:00:32.56 bitrate=N/A dup=32 drop=0 speed=   1x    
video:8482kB audio:478kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Input file #0 (udp://239.255.0.22:2224?pkt_size=1316&buffer_size=409600&fifo_size=1000000&overrun_nonfatal=1):
  Input stream #0:0 (video): 1915 packets read (21508094 bytes); 945 frames decoded; 
  Input stream #0:1 (audio): 992 packets read (1523712 bytes); 992 frames decoded (1523712 samples); 
  Input stream #0:2 (audio): 994 packets read (508928 bytes); 994 frames decoded (1526784 samples); 
  Input stream #0:3 (subtitle): 1 packets read (14 bytes); 
  Total: 3902 packets (23540748 bytes) demuxed
Output file #0 ([movflags=isml+frag_keyframe:f=ismv]http://192.168.1.69/FX_HD_0/FX_HD_0.isml/Streams(video)|[movflags=isml+frag_keyframe:f=ismv]http://192.168.1.69/FX_HD_1/FX_HD_1.isml/Streams(video)):
  Output stream #0:0 (audio): 1488 frames encoded (1523712 samples); 1490 packets muxed (244751 bytes); 
  Output stream #0:1 (audio): 1491 frames encoded (1526784 samples); 1491 packets muxed (244829 bytes); 
  Output stream #0:2 (video): 976 frames encoded; 976 packets muxed (8685698 bytes); 
  Total: 3957 packets (9175278 bytes) muxed
[h264_nvenc @ 0x3a44720] Nvenc unloaded
Conversion failed!
Last edited 7 years ago by Facundo (previous) (diff)

comment:3 by Carl Eugen Hoyos, 7 years ago

Is this issue only reproducible with hardware decoding or also with default (software) decoding?
Is this issue only reproducible with hardware encoding or also with software encoding?
Is network input needed to reproduce or can the issue be reproduced with file input?

Note: See TracTickets for help on using tickets.