[FFmpeg-user] Error while encoding UDP H.264 stream

streamingguy sasidhar.nelapati at gmail.com
Sun May 20 08:07:34 CEST 2012


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. I read through few posts
on this mailing list and tried those suggestions. But, still not able to fix
this. Please help in fixing this 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. 

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


--
View this message in context: http://ffmpeg-users.933282.n4.nabble.com/Error-while-encoding-UDP-H-264-stream-tp4646646.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.


More information about the ffmpeg-user mailing list