[FFmpeg-user] No luck with live stream from ffmpeg to ffserver

W Jansen widojansen at gmail.com
Mon May 4 09:09:12 CEST 2015


On Sun, May 3, 2015 at 9:47 PM, En Figureo Canal <figureo56.com at gmail.com>
wrote:

> Can someone please guide me to get this working.
>
> I can easily stream to rtmp server: ustream and even nginx but can't really
> feed ffserver and get
>
> av_interleaved_write_frame(): Unknown error
>
>
> and have run out of patience trying to get this working. I'll really
> appreciate if someone can please help me out with this problem.
>
> Thanks in advanced for your time.
>
> On Sat, May 2, 2015 at 6:50 PM, En Figureo Canal <figureo56.com at gmail.com>
> wrote:
>
> > I haven’t had much luck deploying ffserver, nothing works out for me
> > streaming live from ffmpeg to ffserver. Had different problems, I don’t
> > know if my configuration is correct but, can’t really get ffsever to do
> > what I need and things are just frustrating me.
> >
> > The last error message I’m getting is av_interleaved_write_frame():
> > Unknown error along with Past duration too large. I’ve read somewhere
> > saying that it might be incompatible versions of ffmpeg, which I found
> odd
> > and stupid.
> >
> > I believed ffmpeg should work with any current version.
> >
> > First, I’m trying to do a live stream using a capture card I’ve installed
> > and/or using VidBlaster but, haven’t been able. Audio can be done easily
> > but not Video.
> >
> > Here’s my ffmpeg conf:
> >
> >
> > <Feed channel2.ffm>
> >>         File /root/channel2.ffm
> >>         FileMaxSize 64M
> >> </Feed>
> >>
> >> <Stream channel2.sdp>
> >>         Feed channel2.ffm
> >>
> >>         Format rtp
> >>
> >>         VideoCodec libx264
> >> #       VideoFrameRate 30
> >> #       VideoSize 640x360
> >>         VideoBitRate 1000
> >>
> >>         # Audio settings
> >>         AudioCodec libmp3lame #libfdk_aac
> >>         AudioSampleRate 41000
> >>         AudioBitRate 96
> >>         AudioChannels 2 #this is creating problem
> >>  #      AVOptionAudio flags +global_header
> >>
> >>         MaxTime 0
> >>         AVOptionVideo me_range 16
> >>         AVOptionVideo qdiff 4
> >>         AVOptionVideo qmin 4
> >>         AVOptionVideo qmax 40
> >>         #AVOptionVideo good
> >> #       AVOptionVideo flags +global_header
> >>
> >>         # Streaming settings
> >>         PreRoll 10
> >>         StartSendOnKey
> >>
> >> NoDefaults
> >>
> >> </Stream>
> >
> >
> > When I send the feed to the server I get the previous mentioned error.
> > What exactly am I doing wrong? I’ve tried different combinations to send
> > the feed but nothing works, this is the last conf to send to the server:
> >
> >
> >
> > Ffmpeg –re –rtbufsize 1500M –f dshow –I video=”input”:audio=”input”
> > –acodec libmp3lame –ar 44100 –ab 96k –vcodec libx264 –f flv
> > http://ip:8090/channel2.ffm
> >
> >
> > I've even tried feeding a video from my pc to the server, and still no
> > luck.
> >
> >
> > Please guide me to the correct path to get this working, thanks.
> >
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>

Hi,

My suggestion would be a minimum ffserver config and put all transcode
parameters in ffmpeg with -override_ffserver.
That way it is easier to find out what goes wrong while ffserver keeps
running.

I assume your input stream is ok as you say you stream to other servers.
Otherwise test with 'ffprobe <input stream>'.

Setup ffserver.conf like this:
HTTPPort xxxxx
HTTPBindAddress 0.0.0.0

<Feed channel2.ffm>
File /tmp/channel2.ffm
FileMaxSize 64M
</Feed>

<Stream channel.ts>
Feed channel2.ffm
</Feed>

<Stream status,html>
Format status
</Stream>

Run ffserver in daemon mode and see what is going on on the status page
<serverip:port/status.html>

Then start to feed it with ffmpeg command like

ffmpeg -v debug -i <input stream> -c:v copy -c:a copy -override_ffserver -f
mpegts <ffserver ip:port/channel2.ffm>

You can easily change the transcode settings. I am not sure what you want
to do.
>From your previous email I assume your input is RTMP and you want change it
to RTSP. My example has a MPEG-TS output.

This way you isolate what goes wrong. FFserver keeps running and ffmpeg
will give you some clue.

Wido


More information about the ffmpeg-user mailing list