Discussion:
[FFmpeg-user] No luck with live stream from ffmpeg to ffserver
En Figureo Canal
2015-05-02 22:50:25 UTC
Permalink
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.
En Figureo Canal
2015-05-03 19:47:54 UTC
Permalink
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.
Post by En Figureo Canal
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.
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.
<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
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.
W Jansen
2015-05-04 07:09:12 UTC
Permalink
Post by En Figureo Canal
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.
Post by En Figureo Canal
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.
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
Post by En Figureo Canal
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.
<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
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
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
En Figureo Canal
2015-05-04 13:32:24 UTC
Permalink
Thanks W Jansen for replying.

I've done what you requested, I would like to do a live stream from my pc
to our network. My PC has a video capture card and would like to send the
feed to a server in our LAN so, others can watch certain videos during a
seminar.

I started with a simple configuration and still can't get it to work.

Here's the output of the command you requested, I'm still lost.
copy -bsf:v h264_mp4toannexb -acodec copy -override_ffserver -f mpegts
http://172.16.0.3:8090/channel2.ffm
ffmpeg version 2.6.git Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.7 (Debian 4.7.2-5)
configuration: --prefix=/root/ffmpeg_build --pkg-config-flags=--static
--extra-cflags=-I/root/ffmpeg_build/include
--extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin --enable-gpl
--enable-libass --enable-libfdk-aac --enable-libfreetype
--enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis
--enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree
libavutil 54. 23.101 / 54. 23.101
libavcodec 56. 35.101 / 56. 35.101
libavformat 56. 31.100 / 56. 31.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 14.100 / 5. 14.100
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with
argument 'debug'.
Reading option '-i' ... matched as input file with argument
'videos/david-diaz.mp4'.
Reading option '-vcodec' ... matched as option 'vcodec' (force video codec
('copy' to copy stream)) with argument 'copy'.
Reading option '-bsf:v' ... matched as option 'bsf' (A comma-separated
list of bitstream filters) with argument 'h264_mp4toannexb'.
Reading option '-acodec' ... matched as option 'acodec' (force audio codec
('copy' to copy stream)) with argument 'copy'.
Reading option '-override_ffserver' ... matched as option
'override_ffserver' (override the options from ffserver) with argument '1'.
Reading option '-f' ... matched as option 'f' (force format) with argument
'mpegts'.
Reading option 'http://172.16.0.3:8090/channel2.ffm' ... matched as
output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument debug.
Applying option override_ffserver (override the options from ffserver)
with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input file videos/david-diaz.mp4.
Successfully parsed a group of options.
Opening an input file: videos/david-diaz.mp4.
probed with size=2048 and score=100
pos: 53738 bytes read:65536 seeks:0
pos: 366677 bytes read:373112 seeks:0 frames:11
major_brand : M4V
minor_version : 1
compatible_brands: M4V mp42isom
creation_time : 2014-05-01 02:41:00
Duration: 00:02:08.38, start: 0.000000, bitrate: 4153 kb/s
Stream #0:0(eng), 10, 1/24000: Video: h264 (Baseline), 2 reference
frames (avc1 / 0x31637661), yuv420p(tv, left), 1280x720 [SAR 1:1 DAR 16:9],
1001/48000, 3994 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default)
creation_time : 2014-05-01 02:41:00
handler_name : Mainconcept MP4 Video Media Handler
encoder : AVC Coding
Stream #0:1(eng), 1, 1/48000: Audio: aac (LC) (mp4a / 0x6134706D),
48000 Hz, stereo, fltp, 157 kb/s (default)
creation_time : 2014-05-01 02:41:00
handler_name : Mainconcept MP4 Sound Media Handler
Successfully opened the file.
Parsing a group of options: output file
http://172.16.0.3:8090/channel2.ffm.
Applying option vcodec (force video codec ('copy' to copy stream)) with
argument copy.
Applying option bsf:v (A comma-separated list of bitstream filters) with
argument h264_mp4toannexb.
Applying option acodec (force audio codec ('copy' to copy stream)) with
argument copy.
Applying option f (force format) with argument mpegts.
Successfully parsed a group of options.
Opening an output file: http://172.16.0.3:8090/channel2.ffm.
Using network protocols without global network initialization. Please use
avformat_network_init(), this will become mandatory later.
Last message repeated 1 times
Transfer-Encoding: chunked
User-Agent: Lavf/56.31.100
Accept: */*
Connection: close
Host: 172.16.0.3:8090
Icy-MetaData: 1
Successfully opened the file.
every 40 pkts
major_brand : M4V
minor_version : 1
compatible_brands: M4V mp42isom
encoder : Lavf56.31.100
Stream #0:0(eng), 0, 1/90000: Video: h264, 1 reference frame (avc1 /
0x31637661), yuv420p(left), 1280x720 (0x0) [SAR 1:1 DAR 16:9], 1001/24000,
q=2-31, 3994 kb/s, 23.98 fps, 23.98 tbr, 90k tbn, 23.98 tbc (default)
creation_time : 2014-05-01 02:41:00
handler_name : Mainconcept MP4 Video Media Handler
encoder : AVC Coding
Stream #0:1(eng), 0, 1/90000: Audio: aac (mp4a / 0x6134706D), 48000
Hz, stereo, 157 kb/s (default)
creation_time : 2014-05-01 02:41:00
handler_name : Mainconcept MP4 Sound Media Handler
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
av_interleaved_write_frame(): Connection reset by peer
No more output streams to write to, finishing.
frame= 10 fps=0.0 q=-1.0 Lsize= 165kB time=00:00:00.41
bitrate=3238.1kbits/s
video:305kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: unknown
Input stream #0:0 (video): 10 packets read (312519 bytes);
Input stream #0:1 (audio): 1 packets read (420 bytes);
Total: 11 packets (312939 bytes) demuxed
Output stream #0:0 (video): 10 packets muxed (312555 bytes);
Output stream #0:1 (audio): 1 packets muxed (420 bytes);
Total: 11 packets (312975 bytes) muxed
0 frames successfully decoded, 0 decoding errors
Conversion failed!
Thanks again for replying.
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 <
Post by En Figureo Canal
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.
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
Post by En Figureo Canal
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
Post by En Figureo Canal
and/or using VidBlaster but, haven’t been able. Audio can be done
easily
Post by En Figureo Canal
but not Video.
<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
Post by En Figureo Canal
the feed but nothing works, this is the last conf to send to the
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
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>'.
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
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
W Jansen
2015-05-04 14:44:22 UTC
Permalink
Post by En Figureo Canal
Thanks W Jansen for replying.
I've done what you requested, I would like to do a live stream from my pc
to our network. My PC has a video capture card and would like to send the
feed to a server in our LAN so, others can watch certain videos during a
seminar.
I started with a simple configuration and still can't get it to work.
Here's the output of the command you requested, I'm still lost.
copy -bsf:v h264_mp4toannexb -acodec copy -override_ffserver -f mpegts
http://172.16.0.3:8090/channel2.ffm
ffmpeg version 2.6.git Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.7 (Debian 4.7.2-5)
configuration: --prefix=/root/ffmpeg_build --pkg-config-flags=--static
--extra-cflags=-I/root/ffmpeg_build/include
--extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin --enable-gpl
--enable-libass --enable-libfdk-aac --enable-libfreetype
--enable-libmp3lame --enable-libopus --enable-libtheora
--enable-libvorbis
--enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree
libavutil 54. 23.101 / 54. 23.101
libavcodec 56. 35.101 / 56. 35.101
libavformat 56. 31.100 / 56. 31.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 14.100 / 5. 14.100
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with
argument 'debug'.
Reading option '-i' ... matched as input file with argument
'videos/david-diaz.mp4'.
Reading option '-vcodec' ... matched as option 'vcodec' (force video
codec
('copy' to copy stream)) with argument 'copy'.
Reading option '-bsf:v' ... matched as option 'bsf' (A comma-separated
list of bitstream filters) with argument 'h264_mp4toannexb'.
Reading option '-acodec' ... matched as option 'acodec' (force audio
codec
('copy' to copy stream)) with argument 'copy'.
Reading option '-override_ffserver' ... matched as option
'override_ffserver' (override the options from ffserver) with argument
'1'.
Reading option '-f' ... matched as option 'f' (force format) with
argument
'mpegts'.
Reading option 'http://172.16.0.3:8090/channel2.ffm' ... matched as
output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument debug.
Applying option override_ffserver (override the options from ffserver)
with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input file videos/david-diaz.mp4.
Successfully parsed a group of options.
Opening an input file: videos/david-diaz.mp4.
probed with size=2048 and score=100
pos: 53738 bytes read:65536 seeks:0
pos: 366677 bytes read:373112 seeks:0 frames:11
major_brand : M4V
minor_version : 1
compatible_brands: M4V mp42isom
creation_time : 2014-05-01 02:41:00
Duration: 00:02:08.38, start: 0.000000, bitrate: 4153 kb/s
Stream #0:0(eng), 10, 1/24000: Video: h264 (Baseline), 2 reference
frames (avc1 / 0x31637661), yuv420p(tv, left), 1280x720 [SAR 1:1 DAR
16:9],
1001/48000, 3994 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc
(default)
creation_time : 2014-05-01 02:41:00
handler_name : Mainconcept MP4 Video Media Handler
encoder : AVC Coding
Stream #0:1(eng), 1, 1/48000: Audio: aac (LC) (mp4a / 0x6134706D),
48000 Hz, stereo, fltp, 157 kb/s (default)
creation_time : 2014-05-01 02:41:00
handler_name : Mainconcept MP4 Sound Media Handler
Successfully opened the file.
Parsing a group of options: output file
http://172.16.0.3:8090/channel2.ffm.
Applying option vcodec (force video codec ('copy' to copy stream)) with
argument copy.
Applying option bsf:v (A comma-separated list of bitstream filters) with
argument h264_mp4toannexb.
Applying option acodec (force audio codec ('copy' to copy stream)) with
argument copy.
Applying option f (force format) with argument mpegts.
Successfully parsed a group of options.
Opening an output file: http://172.16.0.3:8090/channel2.ffm.
Using network protocols without global network initialization. Please use
avformat_network_init(), this will become mandatory later.
Last message repeated 1 times
Transfer-Encoding: chunked
User-Agent: Lavf/56.31.100
Accept: */*
Connection: close
Host: 172.16.0.3:8090
Icy-MetaData: 1
Successfully opened the file.
pat/pmt
every 40 pkts
major_brand : M4V
minor_version : 1
compatible_brands: M4V mp42isom
encoder : Lavf56.31.100
Stream #0:0(eng), 0, 1/90000: Video: h264, 1 reference frame (avc1 /
0x31637661), yuv420p(left), 1280x720 (0x0) [SAR 1:1 DAR 16:9],
1001/24000,
q=2-31, 3994 kb/s, 23.98 fps, 23.98 tbr, 90k tbn, 23.98 tbc (default)
creation_time : 2014-05-01 02:41:00
handler_name : Mainconcept MP4 Video Media Handler
encoder : AVC Coding
Stream #0:1(eng), 0, 1/90000: Audio: aac (mp4a / 0x6134706D), 48000
Hz, stereo, 157 kb/s (default)
creation_time : 2014-05-01 02:41:00
handler_name : Mainconcept MP4 Sound Media Handler
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
av_interleaved_write_frame(): Connection reset by peer
No more output streams to write to, finishing.
frame= 10 fps=0.0 q=-1.0 Lsize= 165kB time=00:00:00.41
bitrate=3238.1kbits/s
video:305kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: unknown
Input stream #0:0 (video): 10 packets read (312519 bytes);
Input stream #0:1 (audio): 1 packets read (420 bytes);
Total: 11 packets (312939 bytes) demuxed
Output stream #0:0 (video): 10 packets muxed (312555 bytes);
Output stream #0:1 (audio): 1 packets muxed (420 bytes);
Total: 11 packets (312975 bytes) muxed
0 frames successfully decoded, 0 decoding errors
Conversion failed!
Thanks again for replying.
On Sun, May 3, 2015 at 9:47 PM, En Figureo Canal <
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 <
Post by En Figureo Canal
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
Post by En Figureo Canal
know if my configuration is correct but, can’t really get ffsever to
do
Post by En Figureo Canal
what I need and things are just frustrating me.
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
Post by En Figureo Canal
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
Post by En Figureo Canal
and/or using VidBlaster but, haven’t been able. Audio can be done
easily
Post by En Figureo Canal
but not Video.
<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.
Post by En Figureo Canal
What exactly am I doing wrong? I’ve tried different combinations to
send
Post by En Figureo Canal
the feed but nothing works, this is the last conf to send to the
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
Post by En Figureo Canal
luck.
Please guide me to the correct path to get this working, thanks.
_______________________________________________
ffmpeg-user mailing list
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>'.
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
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Is it somehow possible that I can test with david-diaz.mp4 as I think it is
a file?
Wido
En Figureo Canal
2015-05-04 17:15:35 UTC
Permalink
W Jansen.

Definitely, I get the same problem with any file even capturing video from
capture card. But, here's the link to the file so you can download it and
test: http://www.figureo56.com/images/david-diaz.mp4

I first tested with files in case that worked I would proceed to live
stream with capture video.


Thanks a lot for taking time to help me out on this. I really appreciate it.
Post by En Figureo Canal
Thanks W Jansen for replying.
I've done what you requested, I would like to do a live stream from my pc
to our network. My PC has a video capture card and would like to send the
feed to a server in our LAN so, others can watch certain videos during a
seminar.
I started with a simple configuration and still can't get it to work.
Here's the output of the command you requested, I'm still lost.
-vcodec
Post by En Figureo Canal
copy -bsf:v h264_mp4toannexb -acodec copy -override_ffserver -f mpegts
http://172.16.0.3:8090/channel2.ffm
ffmpeg version 2.6.git Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.7 (Debian 4.7.2-5)
configuration: --prefix=/root/ffmpeg_build
--pkg-config-flags=--static
Post by En Figureo Canal
--extra-cflags=-I/root/ffmpeg_build/include
--extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin
--enable-gpl
Post by En Figureo Canal
--enable-libass --enable-libfdk-aac --enable-libfreetype
--enable-libmp3lame --enable-libopus --enable-libtheora
--enable-libvorbis
--enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree
libavutil 54. 23.101 / 54. 23.101
libavcodec 56. 35.101 / 56. 35.101
libavformat 56. 31.100 / 56. 31.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 14.100 / 5. 14.100
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with
argument 'debug'.
Reading option '-i' ... matched as input file with argument
'videos/david-diaz.mp4'.
Reading option '-vcodec' ... matched as option 'vcodec' (force video
codec
('copy' to copy stream)) with argument 'copy'.
Reading option '-bsf:v' ... matched as option 'bsf' (A comma-separated
list of bitstream filters) with argument 'h264_mp4toannexb'.
Reading option '-acodec' ... matched as option 'acodec' (force audio
codec
('copy' to copy stream)) with argument 'copy'.
Reading option '-override_ffserver' ... matched as option
'override_ffserver' (override the options from ffserver) with argument
'1'.
Reading option '-f' ... matched as option 'f' (force format) with
argument
'mpegts'.
Reading option 'http://172.16.0.3:8090/channel2.ffm' ... matched as
output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument debug.
Applying option override_ffserver (override the options from ffserver)
with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input file videos/david-diaz.mp4.
Successfully parsed a group of options.
Opening an input file: videos/david-diaz.mp4.
probed with size=2048 and score=100
avformat_find_stream_info()
Post by En Figureo Canal
pos: 53738 bytes read:65536 seeks:0
pos: 366677 bytes read:373112 seeks:0 frames:11
major_brand : M4V
minor_version : 1
compatible_brands: M4V mp42isom
creation_time : 2014-05-01 02:41:00
Duration: 00:02:08.38, start: 0.000000, bitrate: 4153 kb/s
Stream #0:0(eng), 10, 1/24000: Video: h264 (Baseline), 2 reference
frames (avc1 / 0x31637661), yuv420p(tv, left), 1280x720 [SAR 1:1 DAR
16:9],
1001/48000, 3994 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc
(default)
creation_time : 2014-05-01 02:41:00
handler_name : Mainconcept MP4 Video Media Handler
encoder : AVC Coding
Stream #0:1(eng), 1, 1/48000: Audio: aac (LC) (mp4a / 0x6134706D),
48000 Hz, stereo, fltp, 157 kb/s (default)
creation_time : 2014-05-01 02:41:00
handler_name : Mainconcept MP4 Sound Media Handler
Successfully opened the file.
Parsing a group of options: output file
http://172.16.0.3:8090/channel2.ffm.
Applying option vcodec (force video codec ('copy' to copy stream)) with
argument copy.
Applying option bsf:v (A comma-separated list of bitstream filters)
with
Post by En Figureo Canal
argument h264_mp4toannexb.
Applying option acodec (force audio codec ('copy' to copy stream)) with
argument copy.
Applying option f (force format) with argument mpegts.
Successfully parsed a group of options.
Opening an output file: http://172.16.0.3:8090/channel2.ffm.
Using network protocols without global network initialization. Please
use
Post by En Figureo Canal
avformat_network_init(), this will become mandatory later.
Last message repeated 1 times
Transfer-Encoding: chunked
User-Agent: Lavf/56.31.100
Accept: */*
Connection: close
Host: 172.16.0.3:8090
Icy-MetaData: 1
Successfully opened the file.
pat/pmt
every 40 pkts
major_brand : M4V
minor_version : 1
compatible_brands: M4V mp42isom
encoder : Lavf56.31.100
Stream #0:0(eng), 0, 1/90000: Video: h264, 1 reference frame (avc1
/
Post by En Figureo Canal
0x31637661), yuv420p(left), 1280x720 (0x0) [SAR 1:1 DAR 16:9],
1001/24000,
q=2-31, 3994 kb/s, 23.98 fps, 23.98 tbr, 90k tbn, 23.98 tbc (default)
creation_time : 2014-05-01 02:41:00
handler_name : Mainconcept MP4 Video Media Handler
encoder : AVC Coding
Stream #0:1(eng), 0, 1/90000: Audio: aac (mp4a / 0x6134706D), 48000
Hz, stereo, 157 kb/s (default)
creation_time : 2014-05-01 02:41:00
handler_name : Mainconcept MP4 Sound Media Handler
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
av_interleaved_write_frame(): Connection reset by peer
No more output streams to write to, finishing.
frame= 10 fps=0.0 q=-1.0 Lsize= 165kB time=00:00:00.41
bitrate=3238.1kbits/s
video:305kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: unknown
Input stream #0:0 (video): 10 packets read (312519 bytes);
Input stream #0:1 (audio): 1 packets read (420 bytes);
Total: 11 packets (312939 bytes) demuxed
Output stream #0:0 (video): 10 packets muxed (312555 bytes);
Output stream #0:1 (audio): 1 packets muxed (420 bytes);
Total: 11 packets (312975 bytes) muxed
0 frames successfully decoded, 0 decoding errors
Conversion failed!
Thanks again for replying.
On Sun, May 3, 2015 at 9:47 PM, En Figureo Canal <
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 <
Post by En Figureo Canal
I haven’t had much luck deploying ffserver, nothing works out for
me
Post by En Figureo Canal
Post by En Figureo Canal
streaming live from ffmpeg to ffserver. Had different problems, I
don’t
Post by En Figureo Canal
know if my configuration is correct but, can’t really get ffsever
to
Post by En Figureo Canal
do
Post by En Figureo Canal
what I need and things are just frustrating me.
Unknown error along with Past duration too large. I’ve read
somewhere
Post by En Figureo Canal
Post by En Figureo Canal
saying that it might be incompatible versions of ffmpeg, which I
found
odd
Post by En Figureo Canal
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
Post by En Figureo Canal
and/or using VidBlaster but, haven’t been able. Audio can be done
easily
Post by En Figureo Canal
but not Video.
<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.
Post by En Figureo Canal
What exactly am I doing wrong? I’ve tried different combinations to
send
Post by En Figureo Canal
the feed but nothing works, this is the last conf to send to the
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
Post by En Figureo Canal
luck.
Please guide me to the correct path to get this working, thanks.
_______________________________________________
ffmpeg-user mailing list
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.
Post by En Figureo Canal
Otherwise test with 'ffprobe <input stream>'.
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
Post by En Figureo Canal
-f
mpegts <ffserver ip:port/channel2.ffm>
You can easily change the transcode settings. I am not sure what you
want
Post by En Figureo Canal
to do.
From your previous email I assume your input is RTMP and you want
change
Post by En Figureo Canal
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
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Is it somehow possible that I can test with david-diaz.mp4 as I think it is
a file?
Wido
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
W Jansen
2015-05-04 18:49:30 UTC
Permalink
Post by En Figureo Canal
W Jansen.
Definitely, I get the same problem with any file even capturing video from
capture card. But, here's the link to the file so you can download it and
test: http://www.figureo56.com/images/david-diaz.mp4
I first tested with files in case that worked I would proceed to live
stream with capture video.
Thanks a lot for taking time to help me out on this. I really appreciate it.
On Mon, May 4, 2015 at 3:32 PM, En Figureo Canal <
Post by En Figureo Canal
Thanks W Jansen for replying.
I've done what you requested, I would like to do a live stream from my
pc
Post by En Figureo Canal
to our network. My PC has a video capture card and would like to send
the
Post by En Figureo Canal
feed to a server in our LAN so, others can watch certain videos
during a
Post by En Figureo Canal
seminar.
I started with a simple configuration and still can't get it to work.
Here's the output of the command you requested, I'm still lost.
-vcodec
Post by En Figureo Canal
copy -bsf:v h264_mp4toannexb -acodec copy -override_ffserver -f
mpegts
Post by En Figureo Canal
http://172.16.0.3:8090/channel2.ffm
ffmpeg version 2.6.git Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.7 (Debian 4.7.2-5)
configuration: --prefix=/root/ffmpeg_build
--pkg-config-flags=--static
Post by En Figureo Canal
--extra-cflags=-I/root/ffmpeg_build/include
--extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin
--enable-gpl
Post by En Figureo Canal
--enable-libass --enable-libfdk-aac --enable-libfreetype
--enable-libmp3lame --enable-libopus --enable-libtheora
--enable-libvorbis
--enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree
libavutil 54. 23.101 / 54. 23.101
libavcodec 56. 35.101 / 56. 35.101
libavformat 56. 31.100 / 56. 31.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 14.100 / 5. 14.100
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level)
with
Post by En Figureo Canal
argument 'debug'.
Reading option '-i' ... matched as input file with argument
'videos/david-diaz.mp4'.
Reading option '-vcodec' ... matched as option 'vcodec' (force video
codec
('copy' to copy stream)) with argument 'copy'.
Reading option '-bsf:v' ... matched as option 'bsf' (A
comma-separated
Post by En Figureo Canal
list of bitstream filters) with argument 'h264_mp4toannexb'.
Reading option '-acodec' ... matched as option 'acodec' (force audio
codec
('copy' to copy stream)) with argument 'copy'.
Reading option '-override_ffserver' ... matched as option
'override_ffserver' (override the options from ffserver) with
argument
Post by En Figureo Canal
'1'.
Reading option '-f' ... matched as option 'f' (force format) with
argument
'mpegts'.
Reading option 'http://172.16.0.3:8090/channel2.ffm' ... matched as
output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument debug.
Applying option override_ffserver (override the options from
ffserver)
Post by En Figureo Canal
with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input file videos/david-diaz.mp4.
Successfully parsed a group of options.
Opening an input file: videos/david-diaz.mp4.
probed with size=2048 and score=100
avformat_find_stream_info()
Post by En Figureo Canal
pos: 53738 bytes read:65536 seeks:0
avformat_find_stream_info()
Post by En Figureo Canal
pos: 366677 bytes read:373112 seeks:0 frames:11
major_brand : M4V
minor_version : 1
compatible_brands: M4V mp42isom
creation_time : 2014-05-01 02:41:00
Duration: 00:02:08.38, start: 0.000000, bitrate: 4153 kb/s
Stream #0:0(eng), 10, 1/24000: Video: h264 (Baseline), 2
reference
Post by En Figureo Canal
frames (avc1 / 0x31637661), yuv420p(tv, left), 1280x720 [SAR 1:1 DAR
16:9],
1001/48000, 3994 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc
(default)
creation_time : 2014-05-01 02:41:00
handler_name : Mainconcept MP4 Video Media Handler
encoder : AVC Coding
Stream #0:1(eng), 1, 1/48000: Audio: aac (LC) (mp4a /
0x6134706D),
Post by En Figureo Canal
48000 Hz, stereo, fltp, 157 kb/s (default)
creation_time : 2014-05-01 02:41:00
handler_name : Mainconcept MP4 Sound Media Handler
Successfully opened the file.
Parsing a group of options: output file
http://172.16.0.3:8090/channel2.ffm.
Applying option vcodec (force video codec ('copy' to copy stream))
with
Post by En Figureo Canal
argument copy.
Applying option bsf:v (A comma-separated list of bitstream filters)
with
Post by En Figureo Canal
argument h264_mp4toannexb.
Applying option acodec (force audio codec ('copy' to copy stream))
with
Post by En Figureo Canal
argument copy.
Applying option f (force format) with argument mpegts.
Successfully parsed a group of options.
Opening an output file: http://172.16.0.3:8090/channel2.ffm.
Using network protocols without global network initialization. Please
use
Post by En Figureo Canal
avformat_network_init(), this will become mandatory later.
Last message repeated 1 times
Transfer-Encoding: chunked
User-Agent: Lavf/56.31.100
Accept: */*
Connection: close
Host: 172.16.0.3:8090
Icy-MetaData: 1
Successfully opened the file.
pat/pmt
every 40 pkts
major_brand : M4V
minor_version : 1
compatible_brands: M4V mp42isom
encoder : Lavf56.31.100
Stream #0:0(eng), 0, 1/90000: Video: h264, 1 reference frame
(avc1
/
Post by En Figureo Canal
0x31637661), yuv420p(left), 1280x720 (0x0) [SAR 1:1 DAR 16:9],
1001/24000,
q=2-31, 3994 kb/s, 23.98 fps, 23.98 tbr, 90k tbn, 23.98 tbc
(default)
Post by En Figureo Canal
creation_time : 2014-05-01 02:41:00
handler_name : Mainconcept MP4 Video Media Handler
encoder : AVC Coding
Stream #0:1(eng), 0, 1/90000: Audio: aac (mp4a / 0x6134706D),
48000
Post by En Figureo Canal
Hz, stereo, 157 kb/s (default)
creation_time : 2014-05-01 02:41:00
handler_name : Mainconcept MP4 Sound Media Handler
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
av_interleaved_write_frame(): Connection reset by peer
No more output streams to write to, finishing.
frame= 10 fps=0.0 q=-1.0 Lsize= 165kB time=00:00:00.41
bitrate=3238.1kbits/s
video:305kB audio:0kB subtitle:0kB other streams:0kB global
headers:0kB
Post by En Figureo Canal
muxing overhead: unknown
Input stream #0:0 (video): 10 packets read (312519 bytes);
Input stream #0:1 (audio): 1 packets read (420 bytes);
Total: 11 packets (312939 bytes) demuxed
Output stream #0:0 (video): 10 packets muxed (312555 bytes);
Output stream #0:1 (audio): 1 packets muxed (420 bytes);
Total: 11 packets (312975 bytes) muxed
0 frames successfully decoded, 0 decoding errors
Conversion failed!
Thanks again for replying.
On Sun, May 3, 2015 at 9:47 PM, En Figureo Canal <
Can someone please guide me to get this working.
I can easily stream to rtmp server: ustream and even nginx but
can't
Post by En Figureo Canal
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
Post by En Figureo Canal
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 <
Post by En Figureo Canal
I haven’t had much luck deploying ffserver, nothing works out for
me
Post by En Figureo Canal
Post by En Figureo Canal
streaming live from ffmpeg to ffserver. Had different problems, I
don’t
Post by En Figureo Canal
know if my configuration is correct but, can’t really get ffsever
to
Post by En Figureo Canal
do
Post by En Figureo Canal
what I need and things are just frustrating me.
The last error message I’m getting is
Unknown error along with Past duration too large. I’ve read
somewhere
Post by En Figureo Canal
Post by En Figureo Canal
saying that it might be incompatible versions of ffmpeg, which I
found
odd
Post by En Figureo Canal
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
Post by En Figureo Canal
and/or using VidBlaster but, haven’t been able. Audio can be done
easily
Post by En Figureo Canal
but not Video.
<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.
Post by En Figureo Canal
What exactly am I doing wrong? I’ve tried different combinations
to
Post by En Figureo Canal
send
Post by En Figureo Canal
the feed but nothing works, this is the last conf to send to the
Ffmpeg –re –rtbufsize 1500M –f dshow –I
video=”input”:audio=”input”
Post by En Figureo Canal
Post by En Figureo Canal
–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
Post by En Figureo Canal
no
Post by En Figureo Canal
luck.
Please guide me to the correct path to get this working, thanks.
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Hi,
My suggestion would be a minimum ffserver config and put all
transcode
Post by En Figureo Canal
parameters in ffmpeg with -override_ffserver.
That way it is easier to find out what goes wrong while ffserver
keeps
Post by En Figureo Canal
running.
I assume your input stream is ok as you say you stream to other
servers.
Post by En Figureo Canal
Otherwise test with 'ffprobe <input stream>'.
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
Post by En Figureo Canal
<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
Post by En Figureo Canal
-f
mpegts <ffserver ip:port/channel2.ffm>
You can easily change the transcode settings. I am not sure what you
want
Post by En Figureo Canal
to do.
From your previous email I assume your input is RTMP and you want
change
Post by En Figureo Canal
it
to RTSP. My example has a MPEG-TS output.
This way you isolate what goes wrong. FFserver keeps running and
ffmpeg
Post by En Figureo Canal
will give you some clue.
Wido
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Is it somehow possible that I can test with david-diaz.mp4 as I think it
is
a file?
Wido
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Hi,

The mp4 file is the problem. I did not follow up on that but I can stream
it with following steps:

I converted it to mpegts with
ffmpeg -v debug -i ./david-diaz.mp4 -c:v copy -c:a copy out2.ts

Then I could stream out2.ts without any problem with
ffmpeg -v debug -i ./out2.ts -c:v libx264 -bsf:v h264_mp4toannexb -c:a copy
-override_ffserver http://127.0.0.1:12000/ch1.ffm

My ffserver config is:

HTTPPort 12000
HTTPBindAddress 0.0.0.0

<Feed ch1.ffm>
File /tmp/ch1.ffm
FileMaxSize 64M
ACL allow 0.0.0.0 255.255.255.255
</Feed>

<Stream ch1.ts>
Feed ch1.ffm
</Stream>

<Stream status.html>
Format status
ACL allow 0.0.0.0 255.255.255.255
</Stream>

Wido
En Figureo Canal
2015-05-04 19:44:01 UTC
Permalink
I have different mp4 files that seem not to work. I even tried converting
it to flv but no luck but, how come does it work if feeding ustream or any
other rtmp server?

So, will that format work on all devices? Since, I would need to be display
on different devices at a max rate of 1024kb/s .

That's for a file input but, capturing from a device doesn't work, I'll
experiment using ts format and see if it will work.


Thanks a lot.
Post by En Figureo Canal
W Jansen.
Definitely, I get the same problem with any file even capturing video
from
Post by En Figureo Canal
capture card. But, here's the link to the file so you can download it and
test: http://www.figureo56.com/images/david-diaz.mp4
I first tested with files in case that worked I would proceed to live
stream with capture video.
Thanks a lot for taking time to help me out on this. I really appreciate it.
On Mon, May 4, 2015 at 3:32 PM, En Figureo Canal <
Post by En Figureo Canal
Thanks W Jansen for replying.
I've done what you requested, I would like to do a live stream from
my
Post by En Figureo Canal
pc
Post by En Figureo Canal
to our network. My PC has a video capture card and would like to send
the
Post by En Figureo Canal
feed to a server in our LAN so, others can watch certain videos
during a
Post by En Figureo Canal
seminar.
I started with a simple configuration and still can't get it to work.
Here's the output of the command you requested, I'm still lost.
-vcodec
Post by En Figureo Canal
copy -bsf:v h264_mp4toannexb -acodec copy -override_ffserver -f
mpegts
Post by En Figureo Canal
http://172.16.0.3:8090/channel2.ffm
ffmpeg version 2.6.git Copyright (c) 2000-2015 the FFmpeg
developers
Post by En Figureo Canal
Post by En Figureo Canal
built with gcc 4.7 (Debian 4.7.2-5)
configuration: --prefix=/root/ffmpeg_build
--pkg-config-flags=--static
Post by En Figureo Canal
--extra-cflags=-I/root/ffmpeg_build/include
--extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin
--enable-gpl
Post by En Figureo Canal
--enable-libass --enable-libfdk-aac --enable-libfreetype
--enable-libmp3lame --enable-libopus --enable-libtheora
--enable-libvorbis
--enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree
libavutil 54. 23.101 / 54. 23.101
libavcodec 56. 35.101 / 56. 35.101
libavformat 56. 31.100 / 56. 31.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 14.100 / 5. 14.100
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level)
with
Post by En Figureo Canal
argument 'debug'.
Reading option '-i' ... matched as input file with argument
'videos/david-diaz.mp4'.
Reading option '-vcodec' ... matched as option 'vcodec' (force
video
Post by En Figureo Canal
Post by En Figureo Canal
codec
('copy' to copy stream)) with argument 'copy'.
Reading option '-bsf:v' ... matched as option 'bsf' (A
comma-separated
Post by En Figureo Canal
list of bitstream filters) with argument 'h264_mp4toannexb'.
Reading option '-acodec' ... matched as option 'acodec' (force
audio
Post by En Figureo Canal
Post by En Figureo Canal
codec
('copy' to copy stream)) with argument 'copy'.
Reading option '-override_ffserver' ... matched as option
'override_ffserver' (override the options from ffserver) with
argument
Post by En Figureo Canal
'1'.
Reading option '-f' ... matched as option 'f' (force format) with
argument
'mpegts'.
Reading option 'http://172.16.0.3:8090/channel2.ffm' ... matched
as
Post by En Figureo Canal
Post by En Figureo Canal
output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument debug.
Applying option override_ffserver (override the options from
ffserver)
Post by En Figureo Canal
with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input file videos/david-diaz.mp4.
Successfully parsed a group of options.
Opening an input file: videos/david-diaz.mp4.
mov,mp4,m4a,3gp,3g2,mj2
Post by En Figureo Canal
Post by En Figureo Canal
probed with size=2048 and score=100
M4V
Post by En Figureo Canal
avformat_find_stream_info()
Post by En Figureo Canal
pos: 53738 bytes read:65536 seeks:0
avformat_find_stream_info()
Post by En Figureo Canal
pos: 366677 bytes read:373112 seeks:0 frames:11
major_brand : M4V
minor_version : 1
compatible_brands: M4V mp42isom
creation_time : 2014-05-01 02:41:00
Duration: 00:02:08.38, start: 0.000000, bitrate: 4153 kb/s
Stream #0:0(eng), 10, 1/24000: Video: h264 (Baseline), 2
reference
Post by En Figureo Canal
frames (avc1 / 0x31637661), yuv420p(tv, left), 1280x720 [SAR 1:1
DAR
Post by En Figureo Canal
Post by En Figureo Canal
16:9],
1001/48000, 3994 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc
(default)
creation_time : 2014-05-01 02:41:00
handler_name : Mainconcept MP4 Video Media Handler
encoder : AVC Coding
Stream #0:1(eng), 1, 1/48000: Audio: aac (LC) (mp4a /
0x6134706D),
Post by En Figureo Canal
48000 Hz, stereo, fltp, 157 kb/s (default)
creation_time : 2014-05-01 02:41:00
handler_name : Mainconcept MP4 Sound Media Handler
Successfully opened the file.
Parsing a group of options: output file
http://172.16.0.3:8090/channel2.ffm.
Applying option vcodec (force video codec ('copy' to copy stream))
with
Post by En Figureo Canal
argument copy.
Applying option bsf:v (A comma-separated list of bitstream filters)
with
Post by En Figureo Canal
argument h264_mp4toannexb.
Applying option acodec (force audio codec ('copy' to copy stream))
with
Post by En Figureo Canal
argument copy.
Applying option f (force format) with argument mpegts.
Successfully parsed a group of options.
Opening an output file: http://172.16.0.3:8090/channel2.ffm.
Using network protocols without global network initialization.
Please
Post by En Figureo Canal
use
Post by En Figureo Canal
avformat_network_init(), this will become mandatory later.
Last message repeated 1 times
Transfer-Encoding: chunked
User-Agent: Lavf/56.31.100
Accept: */*
Connection: close
Host: 172.16.0.3:8090
Icy-MetaData: 1
Successfully opened the file.
pat/pmt
every 40 pkts
major_brand : M4V
minor_version : 1
compatible_brands: M4V mp42isom
encoder : Lavf56.31.100
Stream #0:0(eng), 0, 1/90000: Video: h264, 1 reference frame
(avc1
/
Post by En Figureo Canal
0x31637661), yuv420p(left), 1280x720 (0x0) [SAR 1:1 DAR 16:9],
1001/24000,
q=2-31, 3994 kb/s, 23.98 fps, 23.98 tbr, 90k tbn, 23.98 tbc
(default)
Post by En Figureo Canal
creation_time : 2014-05-01 02:41:00
handler_name : Mainconcept MP4 Video Media Handler
encoder : AVC Coding
Stream #0:1(eng), 0, 1/90000: Audio: aac (mp4a / 0x6134706D),
48000
Post by En Figureo Canal
Hz, stereo, 157 kb/s (default)
creation_time : 2014-05-01 02:41:00
handler_name : Mainconcept MP4 Sound Media Handler
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
av_interleaved_write_frame(): Connection reset by peer
No more output streams to write to, finishing.
frame= 10 fps=0.0 q=-1.0 Lsize= 165kB time=00:00:00.41
bitrate=3238.1kbits/s
video:305kB audio:0kB subtitle:0kB other streams:0kB global
headers:0kB
Post by En Figureo Canal
muxing overhead: unknown
Input stream #0:0 (video): 10 packets read (312519 bytes);
Input stream #0:1 (audio): 1 packets read (420 bytes);
Total: 11 packets (312939 bytes) demuxed
Output stream #0:0 (video): 10 packets muxed (312555 bytes);
Output stream #0:1 (audio): 1 packets muxed (420 bytes);
Total: 11 packets (312975 bytes) muxed
0 frames successfully decoded, 0 decoding errors
Conversion failed!
Thanks again for replying.
On Sun, May 3, 2015 at 9:47 PM, En Figureo Canal <
Can someone please guide me to get this working.
I can easily stream to rtmp server: ustream and even nginx but
can't
Post by En Figureo Canal
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
Post by En Figureo Canal
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 <
Post by En Figureo Canal
I haven’t had much luck deploying ffserver, nothing works out
for
Post by En Figureo Canal
me
Post by En Figureo Canal
Post by En Figureo Canal
streaming live from ffmpeg to ffserver. Had different
problems, I
Post by En Figureo Canal
Post by En Figureo Canal
don’t
Post by En Figureo Canal
know if my configuration is correct but, can’t really get
ffsever
Post by En Figureo Canal
to
Post by En Figureo Canal
do
Post by En Figureo Canal
what I need and things are just frustrating me.
The last error message I’m getting is
Unknown error along with Past duration too large. I’ve read
somewhere
Post by En Figureo Canal
Post by En Figureo Canal
saying that it might be incompatible versions of ffmpeg, which
I
Post by En Figureo Canal
Post by En Figureo Canal
found
odd
Post by En Figureo Canal
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
Post by En Figureo Canal
and/or using VidBlaster but, haven’t been able. Audio can be
done
Post by En Figureo Canal
Post by En Figureo Canal
easily
Post by En Figureo Canal
but not Video.
<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.
Post by En Figureo Canal
What exactly am I doing wrong? I’ve tried different
combinations
Post by En Figureo Canal
to
Post by En Figureo Canal
send
Post by En Figureo Canal
the feed but nothing works, this is the last conf to send to
the
Post by En Figureo Canal
Post by En Figureo Canal
Post by En Figureo Canal
Ffmpeg –re –rtbufsize 1500M –f dshow –I
video=”input”:audio=”input”
Post by En Figureo Canal
Post by En Figureo Canal
–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
Post by En Figureo Canal
no
Post by En Figureo Canal
luck.
Please guide me to the correct path to get this working,
thanks.
Post by En Figureo Canal
Post by En Figureo Canal
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Hi,
My suggestion would be a minimum ffserver config and put all
transcode
Post by En Figureo Canal
parameters in ffmpeg with -override_ffserver.
That way it is easier to find out what goes wrong while ffserver
keeps
Post by En Figureo Canal
running.
I assume your input stream is ok as you say you stream to other
servers.
Post by En Figureo Canal
Otherwise test with 'ffprobe <input stream>'.
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
Post by En Figureo Canal
<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
Post by En Figureo Canal
-f
mpegts <ffserver ip:port/channel2.ffm>
You can easily change the transcode settings. I am not sure what
you
Post by En Figureo Canal
want
Post by En Figureo Canal
to do.
From your previous email I assume your input is RTMP and you want
change
Post by En Figureo Canal
it
to RTSP. My example has a MPEG-TS output.
This way you isolate what goes wrong. FFserver keeps running and
ffmpeg
Post by En Figureo Canal
will give you some clue.
Wido
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Is it somehow possible that I can test with david-diaz.mp4 as I think
it
Post by En Figureo Canal
is
a file?
Wido
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Hi,
The mp4 file is the problem. I did not follow up on that but I can stream
I converted it to mpegts with
ffmpeg -v debug -i ./david-diaz.mp4 -c:v copy -c:a copy out2.ts
Then I could stream out2.ts without any problem with
ffmpeg -v debug -i ./out2.ts -c:v libx264 -bsf:v h264_mp4toannexb -c:a copy
-override_ffserver http://127.0.0.1:12000/ch1.ffm
HTTPPort 12000
HTTPBindAddress 0.0.0.0
<Feed ch1.ffm>
File /tmp/ch1.ffm
FileMaxSize 64M
ACL allow 0.0.0.0 255.255.255.255
</Feed>
<Stream ch1.ts>
Feed ch1.ffm
</Stream>
<Stream status.html>
Format status
ACL allow 0.0.0.0 255.255.255.255
</Stream>
Wido
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
En Figureo Canal
2015-05-04 20:21:27 UTC
Permalink
One more thing, what are the things or configurations I need to focus on
before creating or sending a feed to ffserver, because I'm totally lost
after the config line W Jansen posted. I've read many documentation but,
I'm still puzzled. Where, other than the ffmpeg doc, can I study to become
better at this ffmpeg and ffserver thing.?????
Post by En Figureo Canal
I have different mp4 files that seem not to work. I even tried converting
it to flv but no luck but, how come does it work if feeding ustream or any
other rtmp server?
So, will that format work on all devices? Since, I would need to be
display on different devices at a max rate of 1024kb/s .
That's for a file input but, capturing from a device doesn't work, I'll
experiment using ts format and see if it will work.
Thanks a lot.
Post by En Figureo Canal
W Jansen.
Definitely, I get the same problem with any file even capturing video
from
Post by En Figureo Canal
capture card. But, here's the link to the file so you can download it
and
Post by En Figureo Canal
test: http://www.figureo56.com/images/david-diaz.mp4
I first tested with files in case that worked I would proceed to live
stream with capture video.
Thanks a lot for taking time to help me out on this. I really appreciate it.
On Mon, May 4, 2015 at 3:32 PM, En Figureo Canal <
Post by En Figureo Canal
Thanks W Jansen for replying.
I've done what you requested, I would like to do a live stream from
my
Post by En Figureo Canal
pc
Post by En Figureo Canal
to our network. My PC has a video capture card and would like to
send
Post by En Figureo Canal
the
Post by En Figureo Canal
feed to a server in our LAN so, others can watch certain videos
during a
Post by En Figureo Canal
seminar.
I started with a simple configuration and still can't get it to
work.
Post by En Figureo Canal
Post by En Figureo Canal
Here's the output of the command you requested, I'm still lost.
-vcodec
Post by En Figureo Canal
copy -bsf:v h264_mp4toannexb -acodec copy -override_ffserver -f
mpegts
Post by En Figureo Canal
http://172.16.0.3:8090/channel2.ffm
ffmpeg version 2.6.git Copyright (c) 2000-2015 the FFmpeg
developers
Post by En Figureo Canal
Post by En Figureo Canal
built with gcc 4.7 (Debian 4.7.2-5)
configuration: --prefix=/root/ffmpeg_build
--pkg-config-flags=--static
Post by En Figureo Canal
--extra-cflags=-I/root/ffmpeg_build/include
--extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin
--enable-gpl
Post by En Figureo Canal
--enable-libass --enable-libfdk-aac --enable-libfreetype
--enable-libmp3lame --enable-libopus --enable-libtheora
--enable-libvorbis
--enable-libvpx --enable-libx264 --enable-libx265
--enable-nonfree
Post by En Figureo Canal
Post by En Figureo Canal
libavutil 54. 23.101 / 54. 23.101
libavcodec 56. 35.101 / 56. 35.101
libavformat 56. 31.100 / 56. 31.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 14.100 / 5. 14.100
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level)
with
Post by En Figureo Canal
argument 'debug'.
Reading option '-i' ... matched as input file with argument
'videos/david-diaz.mp4'.
Reading option '-vcodec' ... matched as option 'vcodec' (force
video
Post by En Figureo Canal
Post by En Figureo Canal
codec
('copy' to copy stream)) with argument 'copy'.
Reading option '-bsf:v' ... matched as option 'bsf' (A
comma-separated
Post by En Figureo Canal
list of bitstream filters) with argument 'h264_mp4toannexb'.
Reading option '-acodec' ... matched as option 'acodec' (force
audio
Post by En Figureo Canal
Post by En Figureo Canal
codec
('copy' to copy stream)) with argument 'copy'.
Reading option '-override_ffserver' ... matched as option
'override_ffserver' (override the options from ffserver) with
argument
Post by En Figureo Canal
'1'.
Reading option '-f' ... matched as option 'f' (force format) with
argument
'mpegts'.
Reading option 'http://172.16.0.3:8090/channel2.ffm' ... matched
as
Post by En Figureo Canal
Post by En Figureo Canal
output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument debug.
Applying option override_ffserver (override the options from
ffserver)
Post by En Figureo Canal
with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input file videos/david-diaz.mp4.
Successfully parsed a group of options.
Opening an input file: videos/david-diaz.mp4.
mov,mp4,m4a,3gp,3g2,mj2
Post by En Figureo Canal
Post by En Figureo Canal
probed with size=2048 and score=100
M4V
Post by En Figureo Canal
avformat_find_stream_info()
Post by En Figureo Canal
pos: 53738 bytes read:65536 seeks:0
avformat_find_stream_info()
Post by En Figureo Canal
pos: 366677 bytes read:373112 seeks:0 frames:11
major_brand : M4V
minor_version : 1
compatible_brands: M4V mp42isom
creation_time : 2014-05-01 02:41:00
Duration: 00:02:08.38, start: 0.000000, bitrate: 4153 kb/s
Stream #0:0(eng), 10, 1/24000: Video: h264 (Baseline), 2
reference
Post by En Figureo Canal
frames (avc1 / 0x31637661), yuv420p(tv, left), 1280x720 [SAR 1:1
DAR
Post by En Figureo Canal
Post by En Figureo Canal
16:9],
1001/48000, 3994 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc
(default)
creation_time : 2014-05-01 02:41:00
handler_name : Mainconcept MP4 Video Media Handler
encoder : AVC Coding
Stream #0:1(eng), 1, 1/48000: Audio: aac (LC) (mp4a /
0x6134706D),
Post by En Figureo Canal
48000 Hz, stereo, fltp, 157 kb/s (default)
creation_time : 2014-05-01 02:41:00
handler_name : Mainconcept MP4 Sound Media Handler
Successfully opened the file.
Parsing a group of options: output file
http://172.16.0.3:8090/channel2.ffm.
Applying option vcodec (force video codec ('copy' to copy stream))
with
Post by En Figureo Canal
argument copy.
Applying option bsf:v (A comma-separated list of bitstream
filters)
Post by En Figureo Canal
with
Post by En Figureo Canal
argument h264_mp4toannexb.
Applying option acodec (force audio codec ('copy' to copy stream))
with
Post by En Figureo Canal
argument copy.
Applying option f (force format) with argument mpegts.
Successfully parsed a group of options.
Opening an output file: http://172.16.0.3:8090/channel2.ffm.
Using network protocols without global network initialization.
Please
Post by En Figureo Canal
use
Post by En Figureo Canal
avformat_network_init(), this will become mandatory later.
Last message repeated 1 times
Transfer-Encoding: chunked
User-Agent: Lavf/56.31.100
Accept: */*
Connection: close
Host: 172.16.0.3:8090
Icy-MetaData: 1
Successfully opened the file.
pat/pmt
every 40 pkts
major_brand : M4V
minor_version : 1
compatible_brands: M4V mp42isom
encoder : Lavf56.31.100
Stream #0:0(eng), 0, 1/90000: Video: h264, 1 reference frame
(avc1
/
Post by En Figureo Canal
0x31637661), yuv420p(left), 1280x720 (0x0) [SAR 1:1 DAR 16:9],
1001/24000,
q=2-31, 3994 kb/s, 23.98 fps, 23.98 tbr, 90k tbn, 23.98 tbc
(default)
Post by En Figureo Canal
creation_time : 2014-05-01 02:41:00
handler_name : Mainconcept MP4 Video Media Handler
encoder : AVC Coding
Stream #0:1(eng), 0, 1/90000: Audio: aac (mp4a / 0x6134706D),
48000
Post by En Figureo Canal
Hz, stereo, 157 kb/s (default)
creation_time : 2014-05-01 02:41:00
handler_name : Mainconcept MP4 Sound Media Handler
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
av_interleaved_write_frame(): Connection reset by peer
No more output streams to write to, finishing.
frame= 10 fps=0.0 q=-1.0 Lsize= 165kB time=00:00:00.41
bitrate=3238.1kbits/s
video:305kB audio:0kB subtitle:0kB other streams:0kB global
headers:0kB
Post by En Figureo Canal
muxing overhead: unknown
Input stream #0:0 (video): 10 packets read (312519 bytes);
Input stream #0:1 (audio): 1 packets read (420 bytes);
Total: 11 packets (312939 bytes) demuxed
Output stream #0:0 (video): 10 packets muxed (312555 bytes);
Output stream #0:1 (audio): 1 packets muxed (420 bytes);
Total: 11 packets (312975 bytes) muxed
0 frames successfully decoded, 0 decoding errors
Conversion failed!
Thanks again for replying.
On Sun, May 3, 2015 at 9:47 PM, En Figureo Canal <
Can someone please guide me to get this working.
I can easily stream to rtmp server: ustream and even nginx but
can't
Post by En Figureo Canal
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
Post by En Figureo Canal
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 <
Post by En Figureo Canal
I haven’t had much luck deploying ffserver, nothing works out
for
Post by En Figureo Canal
me
Post by En Figureo Canal
Post by En Figureo Canal
streaming live from ffmpeg to ffserver. Had different
problems, I
Post by En Figureo Canal
Post by En Figureo Canal
don’t
Post by En Figureo Canal
know if my configuration is correct but, can’t really get
ffsever
Post by En Figureo Canal
to
Post by En Figureo Canal
do
Post by En Figureo Canal
what I need and things are just frustrating me.
The last error message I’m getting is
Unknown error along with Past duration too large. I’ve read
somewhere
Post by En Figureo Canal
Post by En Figureo Canal
saying that it might be incompatible versions of ffmpeg,
which I
Post by En Figureo Canal
Post by En Figureo Canal
found
odd
Post by En Figureo Canal
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
Post by En Figureo Canal
Post by En Figureo Canal
installed
Post by En Figureo Canal
and/or using VidBlaster but, haven’t been able. Audio can be
done
Post by En Figureo Canal
Post by En Figureo Canal
easily
Post by En Figureo Canal
but not Video.
<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
Post by En Figureo Canal
Post by En Figureo Canal
error.
Post by En Figureo Canal
What exactly am I doing wrong? I’ve tried different
combinations
Post by En Figureo Canal
to
Post by En Figureo Canal
send
Post by En Figureo Canal
the feed but nothing works, this is the last conf to send to
the
Post by En Figureo Canal
Post by En Figureo Canal
Post by En Figureo Canal
Ffmpeg –re –rtbufsize 1500M –f dshow –I
video=”input”:audio=”input”
Post by En Figureo Canal
Post by En Figureo Canal
–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
Post by En Figureo Canal
no
Post by En Figureo Canal
luck.
Please guide me to the correct path to get this working,
thanks.
Post by En Figureo Canal
Post by En Figureo Canal
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Hi,
My suggestion would be a minimum ffserver config and put all
transcode
Post by En Figureo Canal
parameters in ffmpeg with -override_ffserver.
That way it is easier to find out what goes wrong while ffserver
keeps
Post by En Figureo Canal
running.
I assume your input stream is ok as you say you stream to other
servers.
Post by En Figureo Canal
Otherwise test with 'ffprobe <input stream>'.
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
Post by En Figureo Canal
<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
Post by En Figureo Canal
-f
mpegts <ffserver ip:port/channel2.ffm>
You can easily change the transcode settings. I am not sure what
you
Post by En Figureo Canal
want
Post by En Figureo Canal
to do.
From your previous email I assume your input is RTMP and you want
change
Post by En Figureo Canal
it
to RTSP. My example has a MPEG-TS output.
This way you isolate what goes wrong. FFserver keeps running and
ffmpeg
Post by En Figureo Canal
will give you some clue.
Wido
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Is it somehow possible that I can test with david-diaz.mp4 as I think
it
Post by En Figureo Canal
is
a file?
Wido
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Hi,
The mp4 file is the problem. I did not follow up on that but I can stream
I converted it to mpegts with
ffmpeg -v debug -i ./david-diaz.mp4 -c:v copy -c:a copy out2.ts
Then I could stream out2.ts without any problem with
ffmpeg -v debug -i ./out2.ts -c:v libx264 -bsf:v h264_mp4toannexb -c:a copy
-override_ffserver http://127.0.0.1:12000/ch1.ffm
HTTPPort 12000
HTTPBindAddress 0.0.0.0
<Feed ch1.ffm>
File /tmp/ch1.ffm
FileMaxSize 64M
ACL allow 0.0.0.0 255.255.255.255
</Feed>
<Stream ch1.ts>
Feed ch1.ffm
</Stream>
<Stream status.html>
Format status
ACL allow 0.0.0.0 255.255.255.255
</Stream>
Wido
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Roger Pack
2015-05-06 10:49:06 UTC
Permalink
Post by En Figureo Canal
Thanks W Jansen for replying.
I've done what you requested, I would like to do a live stream from my pc
to our network. My PC has a video capture card and would like to send the
feed to a server in our LAN so, others can watch certain videos during a
seminar.
I don't have too much experience with broadcast. perhaps udp
multicast broadcast (examples bottom of this page) but don't know if
that's appropriate/would work for you.

https://trac.ffmpeg.org/wiki/StreamingGuide

That's only if low latency is your goal, dunno about stability.
GL!
Post by En Figureo Canal
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with
argument 'debug'.
Reading option '-i' ... matched as input file with argument
'videos/david-diaz.mp4'.
Reading option '-vcodec' ... matched as option 'vcodec' (force video codec
('copy' to copy stream)) with argument 'copy'.
Reading option '-bsf:v' ... matched as option 'bsf' (A comma-separated
list of bitstream filters) with argument 'h264_mp4toannexb'.
Reading option '-acodec' ... matched as option 'acodec' (force audio codec
('copy' to copy stream)) with argument 'copy'.
Reading option '-override_ffserver' ... matched as option
'override_ffserver' (override the options from ffserver) with argument '1'.
Reading option '-f' ... matched as option 'f' (force format) with argument
'mpegts'.
Reading option 'http://172.16.0.3:8090/channel2.ffm' ... matched as
output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument debug.
Applying option override_ffserver (override the options from ffserver)
with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input file videos/david-diaz.mp4.
Successfully parsed a group of options.
Opening an input file: videos/david-diaz.mp4.
probed with size=2048 and score=100
pos: 53738 bytes read:65536 seeks:0
pos: 366677 bytes read:373112 seeks:0 frames:11
major_brand : M4V
minor_version : 1
compatible_brands: M4V mp42isom
creation_time : 2014-05-01 02:41:00
Duration: 00:02:08.38, start: 0.000000, bitrate: 4153 kb/s
Stream #0:0(eng), 10, 1/24000: Video: h264 (Baseline), 2 reference
frames (avc1 / 0x31637661), yuv420p(tv, left), 1280x720 [SAR 1:1 DAR 16:9],
1001/48000, 3994 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default)
creation_time : 2014-05-01 02:41:00
handler_name : Mainconcept MP4 Video Media Handler
encoder : AVC Coding
Stream #0:1(eng), 1, 1/48000: Audio: aac (LC) (mp4a / 0x6134706D),
48000 Hz, stereo, fltp, 157 kb/s (default)
creation_time : 2014-05-01 02:41:00
handler_name : Mainconcept MP4 Sound Media Handler
Successfully opened the file.
Parsing a group of options: output file
http://172.16.0.3:8090/channel2.ffm.
Applying option vcodec (force video codec ('copy' to copy stream)) with
argument copy.
Applying option bsf:v (A comma-separated list of bitstream filters) with
argument h264_mp4toannexb.
Applying option acodec (force audio codec ('copy' to copy stream)) with
argument copy.
Applying option f (force format) with argument mpegts.
Successfully parsed a group of options.
Opening an output file: http://172.16.0.3:8090/channel2.ffm.
Using network protocols without global network initialization. Please use
avformat_network_init(), this will become mandatory later.
Last message repeated 1 times
Transfer-Encoding: chunked
User-Agent: Lavf/56.31.100
Accept: */*
Connection: close
Host: 172.16.0.3:8090
Icy-MetaData: 1
Successfully opened the file.
every 40 pkts
major_brand : M4V
minor_version : 1
compatible_brands: M4V mp42isom
encoder : Lavf56.31.100
Stream #0:0(eng), 0, 1/90000: Video: h264, 1 reference frame (avc1 /
0x31637661), yuv420p(left), 1280x720 (0x0) [SAR 1:1 DAR 16:9], 1001/24000,
q=2-31, 3994 kb/s, 23.98 fps, 23.98 tbr, 90k tbn, 23.98 tbc (default)
creation_time : 2014-05-01 02:41:00
handler_name : Mainconcept MP4 Video Media Handler
encoder : AVC Coding
Stream #0:1(eng), 0, 1/90000: Audio: aac (mp4a / 0x6134706D), 48000
Hz, stereo, 157 kb/s (default)
creation_time : 2014-05-01 02:41:00
handler_name : Mainconcept MP4 Sound Media Handler
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
av_interleaved_write_frame(): Connection reset by peer
No more output streams to write to, finishing.
frame= 10 fps=0.0 q=-1.0 Lsize= 165kB time=00:00:00.41
bitrate=3238.1kbits/s
video:305kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: unknown
Input stream #0:0 (video): 10 packets read (312519 bytes);
Input stream #0:1 (audio): 1 packets read (420 bytes);
Total: 11 packets (312939 bytes) demuxed
Output stream #0:0 (video): 10 packets muxed (312555 bytes);
Output stream #0:1 (audio): 1 packets muxed (420 bytes);
Total: 11 packets (312975 bytes) muxed
0 frames successfully decoded, 0 decoding errors
Conversion failed!
Thanks again for replying.
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 <
Post by En Figureo Canal
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.
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
Post by En Figureo Canal
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
Post by En Figureo Canal
and/or using VidBlaster but, haven’t been able. Audio can be done
easily
Post by En Figureo Canal
but not Video.
<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
Post by En Figureo Canal
the feed but nothing works, this is the last conf to send to the
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
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>'.
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
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reuben Martin
2015-05-08 02:08:31 UTC
Permalink
Post by En Figureo Canal
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.
Quite using ffserver. It’s an arcane piece of junk that is not well maintained.
If you wanting to stream meetings over your LAN you don’t need a central
server. You can send it multicast with RTP.

Example:

ffmpeg -re -i sourceFile.ext -pix_fmt yuv420p -c:v libx264 -crf 20 -g 30 -
trellis 2 -profile:v high -c:a libfdk_aac -vbr 4 -ac 2 -ar 48000 -f sap
sap://224.2.128.0?same_port=1

Change sourceFile.ext to whatever your source file is. (Or to whatever capture
source you are using.)

To view the stream, open VLC and in the playlist window pane on the side under
“Local Network” is an entry for “Network Streams (SAP)”. Click that and any
RTP streams advertised via SAP on your network will populate the playlist
after a few seconds. Click on the one you want. (Likely your stream will be
the only one listed but you never know.)

**Note: your network admin better have IGMP snooping correctly configured or
your multicast turns into a broadcast.

-Reuben
En Figureo Canal
2015-05-11 13:02:40 UTC
Permalink
Once again, decided to give ffserver a try but, again it crashed:

kernel: [7169843.523862] ffserver[24324] general protection ip:7fa6247bf777
sp:7fffa7b4b5a0 error:0 in libc-2.13.so[7fa624746000+182000]
Post by Reuben Martin
Post by En Figureo Canal
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.
Quite using ffserver. It’s an arcane piece of junk that is not well maintained.
If you wanting to stream meetings over your LAN you don’t need a central
server. You can send it multicast with RTP.
ffmpeg -re -i sourceFile.ext -pix_fmt yuv420p -c:v libx264 -crf 20 -g 30 -
trellis 2 -profile:v high -c:a libfdk_aac -vbr 4 -ac 2 -ar 48000 -f sap
sap://224.2.128.0?same_port=1
Change sourceFile.ext to whatever your source file is. (Or to whatever capture
source you are using.)
To view the stream, open VLC and in the playlist window pane on the side under
“Local Network” is an entry for “Network Streams (SAP)”. Click that and any
RTP streams advertised via SAP on your network will populate the playlist
after a few seconds. Click on the one you want. (Likely your stream will be
the only one listed but you never know.)
**Note: your network admin better have IGMP snooping correctly configured or
your multicast turns into a broadcast.
-Reuben
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Moritz Barsnick
2015-05-11 13:06:29 UTC
Permalink
Didn't that belong into the "ffserver crashes from time to time"
thread?
Post by En Figureo Canal
kernel: [7169843.523862] ffserver[24324] general protection ip:7fa6247bf777
sp:7fffa7b4b5a0 error:0 in libc-2.13.so[7fa624746000+182000]
But without you recompiling ffmpeg and running ffserver_g in gdb,
there is next to nothing anyone can do to identify the problem.
Moritz

Loading...