Opened 13 years ago

Closed 12 years ago

#1326 closed defect (needs_more_info)

non-existing SPS XX referenced in buffering period - error while encoding UDP stream

Reported by: streamingguy Owned by:
Priority: important Component: undetermined
Version: git-master Keywords: udp
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by Michael Niedermayer)

Hello,

I am trying to encode UDP MPEG-TS H.264 stream and getting "non-existing SPS 0 referenced in buffering period" error continuously. After 1 or 2 hours of encoding, FFMPEG stops suddenly.

The error is occuring even if I write to a file. I tried with fifo_size and buffer_size options. But, no change in the error.

Below is the FFMPEG command I am using:

ffmpeg -y -i udp://@224.2.4.5:9900 -acodec libfaac -ac 2 -ab 64k -vcodec libx264 -f mpegts -threads 0 -async 2 -b:v 1200k udp://224.2.9.4:9900 2> logout.txt

Below is the truncated console output. Please find the attached log to see the complete console output.

ffmpeg version git-2012-05-12-70e9308 Copyright (c) 2000-2012 the FFmpeg developers
  built on May 12 2012 17:58:29 with gcc 4.6.1
  configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-version3 --enable-x11grab
  libavutil      51. 50.100 / 51. 50.100
  libavcodec     54. 21.101 / 54. 21.101
  libavformat    54.  4.100 / 54.  4.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 72.105 /  2. 72.105
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 11.100 /  0. 11.100
  libpostproc    52.  0.100 / 52.  0.100
[mpegts @ 0x15a6120] Unable to seek back to the start
[mp3 @ 0x15d6d60] Header missing
[h264 @ 0x15d09e0] non-existing SPS 0 referenced in buffering period
    Last message repeated 1 times
[h264 @ 0x15d09e0] non-existing PPS referenced
[h264 @ 0x15d09e0] non-existing SPS 0 referenced in buffering period
[h264 @ 0x15d09e0] non-existing PPS 0 referenced
[h264 @ 0x15d09e0] decode_slice_header error
[h264 @ 0x15d09e0] no frame!
[h264 @ 0x15d09e0] non-existing SPS 0 referenced in buffering period
    Last message repeated 1 times
[h264 @ 0x15d09e0] non-existing PPS referenced
[h264 @ 0x15d09e0] non-existing SPS 0 referenced in buffering period
[h264 @ 0x15d09e0] non-existing PPS 0 referenced
[h264 @ 0x15d09e0] decode_slice_header error
[h264 @ 0x15d09e0] no frame!
[h264 @ 0x15d09e0] non-existing SPS 0 referenced in buffering period
    Last message repeated 1 times
[h264 @ 0x15d09e0] non-existing PPS referenced
[h264 @ 0x15d09e0] non-existing SPS 0 referenced in buffering period
[h264 @ 0x15d09e0] non-existing PPS 0 referenced
[h264 @ 0x15d09e0] decode_slice_header error
[h264 @ 0x15d09e0] no frame!
[h264 @ 0x15d09e0] non-existing SPS 0 referenced in buffering period
    Last message repeated 1 times

......................

[h264 @ 0x15d09e0] mmco: unref short failure
    Last message repeated 1 times
[h264 @ 0x15d09e0] non-existing SPS 32 referenced in buffering period
    Last message repeated 5 times
[h264 @ 0x15d09e0] Increasing reorder buffer to 1
[h264 @ 0x15d09e0] non-existing SPS 32 referenced in buffering period
    Last message repeated 1 times
[h264 @ 0x15d09e0] mmco: unref short failure
    Last message repeated 1 times
[h264 @ 0x15d09e0] non-existing SPS 32 referenced in buffering period
    Last message repeated 7 times
[h264 @ 0x15d09e0] mmco: unref short failure
    Last message repeated 1 times
[h264 @ 0x15d09e0] non-existing SPS 32 referenced in buffering period
    Last message repeated 187 times
[mpegts @ 0x15a6120] max_analyze_duration 5000000 reached at 5016000
[mpegts @ 0x15a6120] Estimating duration from bitrate, this may be inaccurate
Input #0, mpegts, from 'udp://@224.2.4.5:9900':
  Duration: N/A, start: 89457.975100, bitrate: 128 kb/s
  Program 33 
    Metadata:
      service_name    : XXXXXX TV
      service_provider: XXXXXX Television
    Stream #0:0[0x86]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuvj420p, 704x576 [SAR 12:11 DAR 4:3], 66.40 fps, 50 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x120](tel): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16, 128 kb/s (hearing impaired)
[buffer @ 0x1a98400] w:704 h:576 pixfmt:yuvj420p tb:1/1000000 sar:12/11 sws_param:flags=2
[buffersink @ 0x1a5daa0] No opaque field provided
[libx264 @ 0x1829100] using SAR=12/11
[libx264 @ 0x1829100] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX
[libx264 @ 0x1829100] profile High, level 3.1
[libfaac @ 0x15e7180] channel_layout not specified
[mpegts @ 0x18289c0] muxrate VBR, pcr every 5 pkts, sdt every 200, pat/pmt every 40 pkts
Output #0, mpegts, to 'udp://224.2.9.4:9900':
  Metadata:
    encoder         : Lavf54.4.100
    Stream #0:0: Video: h264, yuvj420p, 704x576 [SAR 12:11 DAR 4:3], q=-1--1, 1200 kb/s, 90k tbn, 50 tbc
    Stream #0:1(tel): Audio: aac, 48000 Hz, stereo, s16, 64 kb/s (hearing impaired)
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> libx264)
  Stream #0:1 -> #0:1 (mp2 -> libfaac)
Press [q] to stop, [?] for help
[mp2 @ 0x15d6d60] Header missing
Error while decoding stream #0:1
[h264 @ 0x2714f00] non-existing SPS 32 referenced in buffering period
[h264 @ 0x2714f00] Missing reference picture
[h264 @ 0x2714f00] decode_slice_header error
[h264 @ 0x2759c20] non-existing SPS 32 referenced in buffering period
[h264 @ 0x27b9ca0] non-existing SPS 32 referenced in buffering period
[h264 @ 0x2819dc0] non-existing SPS 32 referenced in buffering period
[h264 @ 0x2819dc0] Missing reference picture
[h264 @ 0x2879f00] mmco: unref short failure
    Last message repeated 1 times
[h264 @ 0x2879f00] non-existing SPS 32 referenced in buffering period
[h264 @ 0x28da040] non-existing SPS 32 referenced in buffering period
[h264 @ 0x293a180] non-existing SPS 32 referenced in buffering period
[h264 @ 0x299a2c0] non-existing SPS 32 referenced in buffering period
[h264 @ 0x29fa400] mmco: unref short failure
    Last message repeated 1 times
[h264 @ 0x29fa400] non-existing SPS 32 referenced in buffering period
[h264 @ 0x2714f00] non-existing SPS 32 referenced in buffering period
[h264 @ 0x2759c20] non-existing SPS 32 referenced in buffering period
[h264 @ 0x27b9ca0] non-existing SPS 32 referenced in buffering period

...................................

[h264 @ 0x293a180] non-existing SPS 32 referenced in buffering period
[h264 @ 0x299a2c0] non-existing SPS 32 referenced in buffering period
[h264 @ 0x29fa400] non-existing SPS 32 referenced in buffering period
[h264 @ 0x2714f00] non-existing SPS 32 referenced in buffering period
frame=  109 fps=0.0 q=28.0 size=     226kB time=00:00:01.02 bitrate=1813.6kbits/s dup=73 drop=0    
non-existing SPS 32 referenced in buffering period
[h264 @ 0x27b9ca0] non-existing SPS 32 referenced in buffering period
[h264 @ 0x2819dc0] non-existing SPS 32 referenced in buffering period
[h264 @ 0x2879f00] non-existing SPS 32 referenced in buffering period
[h264 @ 0x28da040] non-existing SPS 32 referenced in buffering period

.....................................

[h264 @ 0x15d09e0] non-existing SPS 32 referenced in buffering period
[h264 @ 0x2714f00] non-existing SPS 32 referenced in buffering period
[h264 @ 0x15d09e0] non-existing SPS 32 referenced in buffering period
[h264 @ 0x2759c20] non-existing SPS 32 referenced in buffering period
frame= 1217 fps= 63 q=28.0 size=    3763kB time=00:00:23.18 bitrate=1330.0kbits/s dup=627 drop=0    
non-existing SPS 32 referenced in buffering period
[h264 @ 0x27b9ca0] non-existing SPS 32 referenced in buffering period
frame= 1229 fps= 63 q=32766.0 Lsize=    3971kB time=00:00:24.46 bitrate=1329.5kbits/s dup=634 drop=0    
video:3337kB audio:192kB global headers:0kB muxing overhead 12.526100%
[libx264 @ 0x1829100] frame I:6     Avg QP:22.80  size: 34017
[libx264 @ 0x1829100] frame P:859   Avg QP:23.86  size:  3576
[libx264 @ 0x1829100] frame B:364   Avg QP:28.27  size:   389
[libx264 @ 0x1829100] consecutive B-frames: 60.2%  0.3%  1.7% 37.8%
[libx264 @ 0x1829100] mb I  I16..4: 27.5% 31.1% 41.5%
[libx264 @ 0x1829100] mb P  I16..4:  2.3%  1.6%  1.2%  P16..4: 16.9%  4.7%  3.3%  0.0%  0.0%    skip:69.9%
[libx264 @ 0x1829100] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8: 18.9%  0.4%  0.1%  direct: 0.2%  skip:80.4%  L0:56.8% L1:41.6% BI: 1.7%
[libx264 @ 0x1829100] final ratefactor: 21.13
[libx264 @ 0x1829100] 8x8 transform intra:31.0% inter:65.9%
[libx264 @ 0x1829100] coded y,uvDC,uvAC intra: 46.9% 43.3% 16.3% inter: 6.3% 5.9% 0.4%
[libx264 @ 0x1829100] i16 v,h,dc,p: 17% 74%  2%  7%
[libx264 @ 0x1829100] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 25% 28%  3%  4%  5%  5%  5%  6%
[libx264 @ 0x1829100] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 11% 70%  7%  2%  2%  2%  2%  2%  2%
[libx264 @ 0x1829100] i8c dc,h,v,p: 55% 32% 12%  2%
[libx264 @ 0x1829100] Weighted P-Frames: Y:0.9% UV:0.5%
[libx264 @ 0x1829100] ref P L0: 71.1% 14.5%  7.4%  6.9%  0.1%
[libx264 @ 0x1829100] ref B L0: 94.8%  4.6%  0.6%
[libx264 @ 0x1829100] ref B L1: 96.3%  3.7%
[libx264 @ 0x1829100] kb/s:1112.29

Attachments (1)

FFMPEG_Out.txt (178.1 KB ) - added by streamingguy 13 years ago.
FFMPEG Console Output

Download all attachments as: .zip

Change History (10)

by streamingguy, 13 years ago

Attachment: FFMPEG_Out.txt added

FFMPEG Console Output

comment:1 by Carl Eugen Hoyos, 13 years ago

Component: FFmpegundetermined
Keywords: udp added; FFMPEG UDP removed
Version: 0.10.3git-master

Do you think this is a regression (this would make the ticket important)?

Is this only reproducible when using external encoders (libfaac, libx264) or also with internal encoders?
Is it also reproducible with -an or -vn?
Is the problem only reproducible if the input is udp or also if the input is a file?
Is the problem only reproducible if the output is udp or also if the output is a file?

comment:2 by streamingguy, 13 years ago

Thank you for quickly looking into this.

Do you think this is a regression (this would make the ticket important)? YES

Is this only reproducible when using external encoders (libfaac, libx264) or also with internal encoders? It is happenning even if try to use "-i" to get the stream information.

ffmpeg -i udp://224.2.9.4:9900

Is it also reproducible with -an or -vn? YES

Is the problem only reproducible if the input is udp or also if the input is a file? If the input is a file, there are no errors. Errors occurs only on UDP stream.

Is the problem only reproducible if the output is udp or also if the output is a file? The problem exists even for file output.

comment:3 by Michael Niedermayer, 13 years ago

Description: modified (diff)

comment:4 by Michael Niedermayer, 13 years ago

How can we reproduce this ?
The command just reads from udp, from where does this udp come ?
Can it be reproduced with a udp stream generated by a second ffmpeg instance ?
(to investigate and fix this we need a complete & reproduceable testcase)

comment:5 by streamingguy, 13 years ago

Hello Michael,

Thank you for your reply. The UDP stream comes from DVB Satellite receiver and I am able to reproduce it second ffmpeg instance.

To reproduce this, I can provide you the access to Ubuntu 11.10 console (where UDP stream is available) OR I can redirect the UDP stream to your IP.

Thanks

in reply to:  2 comment:6 by Carl Eugen Hoyos, 13 years ago

Replying to streamingguy:

Do you think this is a regression (this would make the ticket important)? YES

Then please use git bisect to find the version introducing the regression if you cannot provide a publicly available UDP address.

comment:7 by streamingguy, 13 years ago

Hello cehoyos,

Thank you for your reply! I tried with couple of git versions and I see the same issue. Is it possible to look at the stream, if I redirect the UDP stream to your IP or if I provide access to my machine, where you can access UDP stream?

Thank you for your time!

in reply to:  5 comment:8 by Michael Niedermayer, 12 years ago

Replying to streamingguy:

Thank you for your reply. The UDP stream comes from DVB Satellite receiver and I am able to reproduce it second ffmpeg instance.

Then please explain how you generate a UDP stream with a second ffmpeg instance and without DVB. Or if this is not the case then the awnser to my question is a no, not a yes.

If its just reproduceable with live UDP chance are there are reception, network or OS issues, but iam happy to look at udp packet capture if you upload something with which it is reproduceable.

comment:9 by Carl Eugen Hoyos, 12 years ago

Resolution: needs_more_info
Status: newclosed

Please reopen if you can add the missing information.

Note: See TracTickets for help on using tickets.