1

我正在同时使用 FFServer 和 FFMpeg 创建从 IPTV 到 Web 的实时流转码到 WebM、Flash、HLS 等多种格式。

ffserver.conf 位于http://pastebin.com/hUky5Jsh

将源流转换为 FFServer:

ffmpeg -i udp://239.192.192.1:1234 -s 560x320 http://localhost:8090/feed.ffm

FFServer 的日志显示如下:

Fri Jul 12 11:39:50 2013 127.0.0.1 - - New connection: GET /feed.ffm
Fri Jul 12 11:39:50 2013 127.0.0.1 - - [GET] "/feed.ffm HTTP/1.1" 200 4175
Fri Jul 12 11:39:50 2013 127.0.0.1 - - New connection: POST /feed.ffm
Fri Jul 12 11:39:50 2013 Feed '/tmp/feed.ffm' stream number does not match registered feed
Fri Jul 12 11:39:50 2013 127.0.0.1 - - [POST] "/feed.ffm HTTP/1.1" 200 4096

在互联网上搜索解决方案后,我的大脑非常热。


FF服务器:

ffserver version N-37738-g15cee5e Copyright (c) 2000-2013 the FFmpeg developers
  built on Jul 11 2013 17:01:41 with gcc 4.7 (Ubuntu/Linaro 4.7.3-1ubuntu1)
  configuration: --prefix=/root/ffmpeg_build --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree

FFMpeg:

ffmpeg version N-37738-g15cee5e Copyright (c) 2000-2013 the FFmpeg developers
built on Jul 11 2013 17:01:41 with gcc 4.7 (Ubuntu/Linaro 4.7.3-1ubuntu1)
configuration: --prefix=/root/ffmpeg_build --extra-cflags=-I/root/ffmpeg_build/include     --extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin --extra-libs=-ldl --enable-gpl     --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libtheora     --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree

源流是:

Input #0, mpegts, from 'udp://239.192.192.1:1234':
  Duration: N/A, start: 80091.027433, bitrate: 192 kb/s
  Program 702
    Stream #0:0[0x322]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p, 544x576 [SAR 32:17 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x386](rus): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 192 kb/s
4

0 回答 0