6
1
I used the following command to attempt to stream from a file with ffmpeg:
ffmpeg -re -i GunGrave\ -\ 03\ -\ Rain.webm -c copy -f asf rtmp://127.0.0.1:8090/test.asf
This produced the following output:
ffmpeg version N-50515-g28adecf Copyright (c) 2000-2013 the FFmpeg developers built on Mar 5 2013 22:35:30 with gcc 4.4.6 (GCC) 20120305 (Red Hat 4.4.6-4)
configuration: --enable-gpl --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264
libavutil 52. 17.103 / 52. 17.103
libavcodec 54. 92.100 / 54. 92.100
libavformat 54. 63.103 / 54. 63.103
libavdevice 54. 3.103 / 54. 3.103
libavfilter 3. 42.103 / 3. 42.103
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
Input #0, matroska,webm, from 'GunGrave - 03 - Rain.webm':
Metadata:
title : [AHQ] GunGrave - 19 - Superior
Duration: 00:24:20.44, start: 0.000000, bitrate: 259 kb/s
Stream #0:0: Video: vp8, yuv420p, 768x432, SAR 1:1 DAR 16:9, 29.97 fps, 29.97 tbr, 1k tbn, 1k tbc (default)
Stream #0:1: Audio: vorbis, 48000 Hz, stereo, fltp (default)
And here is my ffserver.config file:
Port 8090
BindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 1000
CustomLog -
<Feed feed1.ffm>
File /tmp/feed1.ffm
FileMaxSize 200K
ACL allow 127.0.0.1
</Feed>
<Stream test.ts>
Feed feed1.ffm
Format mpegts
AudioCodec libmp3lame
AudioBitRate 128
AudioChannels 2
AudioSampleRate 44100
AVOptionAudio flags +global_header
VideoBitRate 800
VideoFrameRate 25
VideoSize 640x480
VideoCodec libx264
AVOptionVideo flags +global_header
</Stream>
<Stream test.asf>
Feed feed1.ffm
Format asf
AudioCodec mp3
AudioBitRate 128
AudioChannels 2
AudioSampleRate 44100
AVOptionAudio flags +global_header
VideoBitRate 800
VideoFrameRate 25
VideoSize 640x480
VideoCodec libx264
AVOptionVideo flags +global_header
</Stream>
<Stream stat.html>
Format status
# Only allow local people to get the status
ACL allow localhost
ACL allow 192.168.0.0 192.168.255.255
</Stream>
# Redirect index.html to the appropriate site
<Redirect index.html>
URL http://www.ffmpeg.org/
</Redirect>
When I try to play the stream in windows media player, it fails citing unsupported file type. When I try to play the stream in kmplayer, it simply hangs the program. It refuses to play in a tag in firefox or chrome. I primarily need it to work in HTML5, so this is the major issue for me. I get similar results using ts instead of asf. I'm willing to use whatever file type/codec will work for this.
1I'm not a streaming or
ffserver
expert but yourtest.asf
configuration talks about MP3 audio and H.264 video, while the FFmpeg output above has Vorbis audio and VP8 video. The video size also isn't correct. With-c copy
you're just copying those video and audio bitstreams to the output. – slhck – 2013-03-06T07:31:38.880So what format would I have to convert the video to in order to make it play? – Fibericon – 2013-03-07T04:06:22.410