[FFmpeg-trac] #3139(ffserver:new): ffserver says invalid stream index after feed file reaches maximum value in rtsp live streaming
FFmpeg
trac at avcodec.org
Wed Jun 10 03:02:38 CEST 2015
#3139: ffserver says invalid stream index after feed file reaches maximum value in
rtsp live streaming
----------------------------------+------------------------------------
Reporter: Ashutosh | Owner:
Type: defect | Status: new
Priority: normal | Component: ffserver
Version: 2.6.2 | Resolution:
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
----------------------------------+------------------------------------
Changes (by retrry):
* version: 2.0.2 => 2.6.2
Comment:
I ran into this same problem, using freshly compiled ffmpeg 2.6.3. I tried
to use native mpeg4 encoder and libx264 encoder - both have same result.
After some time it trows error: Invalid stream index. I think this is
connected to ffm file size, because as you increase size of ffm file you
can delay the problem. I add my ffserver.conf, ffserver log and ffmpeg
command with console output. Do you need any additional information?
ffserver.conf
{{{
HTTPPort 8090
HTTPBindAddress 127.0.0.1
MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 100000
CustomLog -
<Feed feed1.ffm>
File /tmp/feed1.ffm
FileMaxSize 40M
ACL allow 127.0.0.1
</Feed>
<Stream image>
Format mpegts
Feed feed1.ffm
VideoCodec mpeg4
VideoFrameRate 25
PixelFormat yuv420p
VideoSize 1280x720
VideoBitRate 500
AVOptionVideo preset ultrafast
AVOptionVideo profile baseline
AVOptionVideo level 3.0
NoAudio
</Stream>
<Stream stat.html>
Format status
# Only allow local people to get the status
ACL allow 127.0.0.1
ACL allow 192.168.0.0 192.168.255.255
</Stream>
}}}
ffserver log
{{{
[root at my-secret-vps ~]# ffserver -d
ffserver version 2.6.3 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.8.3 (GCC) 20140911 (Red Hat 4.8.3-9)
configuration: --prefix=/usr --bindir=/usr/bin
--datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg
--libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2
-g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-
strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64
-mtune=generic' --enable-bzlib --disable-crystalhd --enable-gnutls
--enable-libass --enable-libcdio --enable-libdc1394 --disable-indev=jack
--enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal
--enable-libopenjpeg --enable-libopus --enable-libpulse --enable-
libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora
--enable-libvorbis --enable-libv4l2 --enable-libx264 --enable-libxvid
--enable-x11grab --enable-avfilter --enable-avresample --enable-postproc
--enable-pthreads --disable-static --enable-shared --enable-gpl --disable-
debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect
libavutil 54. 20.100 / 54. 20.100
libavcodec 56. 26.100 / 56. 26.100
libavformat 56. 25.101 / 56. 25.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 11.102 / 5. 11.102
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
/etc/ffserver.conf:27: Setting default value for video bit rate tolerance
= 125000. Use NoDefaults to disable it.
/etc/ffserver.conf:27: Setting default value for video rate control
equation = tex^qComp. Use NoDefaults to disable it.
/etc/ffserver.conf:27: Setting default value for video max rate = 1000000.
Use NoDefaults to disable it.
/etc/ffserver.conf:27: Setting default value for video buffer size =
1000000. Use NoDefaults to disable it.
Wed Jun 10 02:43:07 2015 FFserver started.
Wed Jun 10 02:43:14 2015 127.0.0.1 - - New connection: GET /feed1.ffm
Wed Jun 10 02:43:14 2015 127.0.0.1 - - [GET] "/feed1.ffm HTTP/1.1" 200
4175
Wed Jun 10 02:43:14 2015 127.0.0.1 - - New connection: POST /feed1.ffm
Wed Jun 10 02:43:22 2015 127.0.0.1 - - New connection: GET /image
Wed Jun 10 02:53:32 2015 [ffm @ 0x76ab60]invalid stream index 137
Wed Jun 10 02:54:14 2015 [ffm @ 0x76ab60]invalid stream index 58
Wed Jun 10 02:54:14 2015 [ffm @ 0x76ab60]invalid stream index 154
Wed Jun 10 02:54:14 2015 [ffm @ 0x76ab60]invalid stream index 196
Wed Jun 10 02:54:14 2015 [ffm @ 0x76ab60]invalid stream index 242
Wed Jun 10 02:54:14 2015 [ffm @ 0x76ab60]invalid stream index 120
Wed Jun 10 02:54:14 2015 [ffm @ 0x76ab60]invalid stream index 8
Wed Jun 10 02:54:14 2015 [ffm @ 0x76ab60]invalid stream index 225
Wed Jun 10 02:54:14 2015 [ffm @ 0x76ab60]invalid stream index 189
Wed Jun 10 02:54:14 2015 [ffm @ 0x76ab60]invalid stream index 162
Wed Jun 10 02:54:14 2015 [ffm @ 0x76ab60]invalid stream index 155
Wed Jun 10 02:54:14 2015 [ffm @ 0x76ab60]invalid stream index 229
Wed Jun 10 02:54:15 2015 [ffm @ 0x76ab60]invalid stream index 128
Wed Jun 10 02:54:16 2015 [ffm @ 0x76ab60]invalid stream index 208
Wed Jun 10 02:54:16 2015 [ffm @ 0x76ab60]invalid stream index 168
Wed Jun 10 02:54:16 2015 [mpegts @ 0x76a2f0]H.264 bitstream error,
startcode missing, size 12388932 data 7E367323
Wed Jun 10 02:54:19 2015 [ffm @ 0x76ab60]invalid stream index 42
}}}
ffmpeg to ffserver log
{{{
[root at my-secret-vps ~]# /usr/bin/ffmpeg -loop 1 -i /srv/img.jpg
-force_key_frames 'expr:gte(t,n_forced*2)' -nostats -nostdin
http://127.0.0.1:8090/feed1.ffm
ffmpeg version 2.6.3 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.8.3 (GCC) 20140911 (Red Hat 4.8.3-9)
configuration: --prefix=/usr --bindir=/usr/bin
--datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg
--libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2
-g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-
strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64
-mtune=generic' --enable-bzlib --disable-crystalhd --enable-gnutls
--enable-libass --enable-libcdio --enable-libdc1394 --disable-indev=jack
--enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal
--enable-libopenjpeg --enable-libopus --enable-libpulse --enable-
libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora
--enable-libvorbis --enable-libv4l2 --enable-libx264 --enable-libxvid
--enable-x11grab --enable-avfilter --enable-avresample --enable-postproc
--enable-pthreads --disable-static --enable-shared --enable-gpl --disable-
debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect
libavutil 54. 20.100 / 54. 20.100
libavcodec 56. 26.100 / 56. 26.100
libavformat 56. 25.101 / 56. 25.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 11.102 / 5. 11.102
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, image2, from '/srv/img.jpg':
Duration: 00:00:00.04, start: 0.000000, bitrate: 53390 kb/s
Stream #0:0: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown),
1280x720, 25 fps, 25 tbr, 25 tbn, 25 tbc
[swscaler @ 0x248fe80] deprecated pixel format used, make sure you did set
range correctly
[libx264 @ 0x24a9f00] frame MB size (80x45) > level limit (1620)
[libx264 @ 0x24a9f00] MB rate (90000) > level limit (40500)
[libx264 @ 0x24a9f00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0x24a9f00] profile Constrained Baseline, level 3.0
Output #0, ffm, to 'http://127.0.0.1:8090/feed1.ffm':
Metadata:
creation_time : now
encoder : Lavf56.25.101
Stream #0:0: Video: h264 (libx264), yuv420p, 1280x720, q=-1--1, 500
kb/s, 25 fps, 1000k tbn, 25 tbc
Metadata:
encoder : Lavc56.26.100 libx264
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
}}}
ffmpeg from ffserver log
{{{
[root at my-secret-vps ~]# /usr/bin/ffmpeg -analyzeduration 10000000
-probesize 50000000 -i http://127.0.0.1:8090/image -i
http://127.0.0.1:8000/radio.mp3 -vcodec copy -acodec aac -strict
experimental -ar 11025 -ab 96000 -ar 48000 -profile:a aac_low -hls_wrap
100 -hls_time 10 -nostats -nostdin radio.m3u8
ffmpeg version 2.6.3 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.8.3 (GCC) 20140911 (Red Hat 4.8.3-9)
configuration: --prefix=/usr --bindir=/usr/bin
--datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg
--libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2
-g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-
strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64
-mtune=generic' --enable-bzlib --disable-crystalhd --enable-gnutls
--enable-libass --enable-libcdio --enable-libdc1394 --disable-indev=jack
--enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal
--enable-libopenjpeg --enable-libopus --enable-libpulse --enable-
libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora
--enable-libvorbis --enable-libv4l2 --enable-libx264 --enable-libxvid
--enable-x11grab --enable-avfilter --enable-avresample --enable-postproc
--enable-pthreads --disable-static --enable-shared --enable-gpl --disable-
debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect
libavutil 54. 20.100 / 54. 20.100
libavcodec 56. 26.100 / 56. 26.100
libavformat 56. 25.101 / 56. 25.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 11.102 / 5. 11.102
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
[h264 @ 0x1d9e5e0] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x1d9e5e0] decode_slice_header error
[h264 @ 0x1d9e5e0] no frame!
[h264 @ 0x1d9e5e0] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x1d9e5e0] decode_slice_header error
[h264 @ 0x1d9e5e0] no frame!
[h264 @ 0x1d9e5e0] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x1d9e5e0] decode_slice_header error
[h264 @ 0x1d9e5e0] no frame!
[h264 @ 0x1d9e5e0] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x1d9e5e0] decode_slice_header error
[h264 @ 0x1d9e5e0] no frame!
[h264 @ 0x1d9e5e0] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x1d9e5e0] decode_slice_header error
[h264 @ 0x1d9e5e0] no frame!
[h264 @ 0x1d9e5e0] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x1d9e5e0] decode_slice_header error
[h264 @ 0x1d9e5e0] no frame!
[h264 @ 0x1d9e5e0] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x1d9e5e0] decode_slice_header error
[h264 @ 0x1d9e5e0] no frame!
[h264 @ 0x1d9e5e0] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x1d9e5e0] decode_slice_header error
[h264 @ 0x1d9e5e0] no frame!
[h264 @ 0x1d9e5e0] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x1d9e5e0] decode_slice_header error
[h264 @ 0x1d9e5e0] no frame!
[h264 @ 0x1d9e5e0] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x1d9e5e0] decode_slice_header error
[h264 @ 0x1d9e5e0] no frame!
Input #0, mpegts, from 'http://127.0.0.1:8090/image':
Duration: N/A, start: 46034.159822, bitrate: N/A
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: h264 (Constrained Baseline) ([27][0][0][0]
/ 0x001B), yuv420p, 1280x720, 25 fps, 25 tbr, 90k tbn, 50 tbc
[mp3 @ 0x1da25a0] Header missing
Last message repeated 1 times
Input #1, mp3, from 'http://127.0.0.1:8000/radio.mp3':
Metadata:
icy-br : 140
icy-irc : shoutcast
icy-name : Hit Radio
icy-pub : 1
StreamTitle :
Duration: N/A, start: 0.000000, bitrate: 167 kb/s
Stream #1:0: Audio: mp3, 44100 Hz, stereo, s16p, 167 kb/s
Output #0, hls, to 'radio.m3u8':
Metadata:
encoder : Lavf56.25.101
Stream #0:0: Video: h264 ([27][0][0][0] / 0x001B), yuv420p, 1280x720,
q=2-31, 25 fps, 25 tbr, 90k tbn, 25 tbc
Stream #0:1: Audio: aac, 48000 Hz, stereo, fltp, 96 kb/s
Metadata:
encoder : Lavc56.26.100 aac
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #1:0 -> #0:1 (mp3 (native) -> aac (native))
[mpegts @ 0x1d98ea0] Thread message queue blocking; consider raising the
thread_queue_size option (current value: 8)
[mp3 @ 0x1dc2820] Header missing
[mp3 @ 0x1dbd6c0] Thread message queue blocking; consider raising the
thread_queue_size option (current value: 8)
Error while decoding stream #1:0: Invalid data found when processing input
[mp3 @ 0x1dc2820] Header missing
Error while decoding stream #1:0: Invalid data found when processing input
[mp3 @ 0x1dc2820] incomplete frame
Error while decoding stream #1:0: Invalid data found when processing input
[NULL @ 0x1d9e5e0] sps_id 32 out of range
[NULL @ 0x1d9e5e0] pps_id 311 out of range
[NULL @ 0x1d9e5e0] SEI type 0 size 1248 truncated at 80
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/3139#comment:2>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list