FFserver настройка трансляции из rtsp в mp4?

Доброго дня! Пытаюсь настроить стрим из rtsp в mp4
С другими форматами проблем нет.
Беру поток:

File /tmp/webcam7.ffm
FileMaxSize 1000M
Launch ffmpeg -f h264 -r 25 -f rtsp -i "rtsp://admin:admin@10.0.0.13:554/cam/realmonitor?channel=1&subtype=0"

И пытаюсь его конвертировать в mp4:

Feed webcam7.ffm
Format mp4
VideoCodec libxvid
VideoFrameRate 25
VideoSize 1280x720
VideoBitRate 2048
PixelFormat yuv420p
VideoQMin 1
VideoQMax 5
VideoBufferSize 80000
PreRoll 5
NoAudio

стрим идет, файл channel1.mp4 пустрой.
дебаг
~$ ffserver -d -f ~/ffserver/ffstart.conf
ffserver version 2.7 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvo-aacenc --enable-libvidstab
libavutil 54. 27.100 / 54. 27.100
libavcodec 56. 41.100 / 56. 41.100
libavformat 56. 36.100 / 56. 36.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 16.101 / 5. 16.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.100 / 1. 2.100
libpostproc 53. 3.100 / 53. 3.100
/home/podkrilom/ffserver/ffstart.conf:2: Port option is deprecated. Use HTTPPort instead.
/home/podkrilom/ffserver/ffstart.conf:4: BindAddress option is deprecated. Use HTTPBindAddress instead.
/home/podkrilom/ffserver/ffstart.conf:33: Setting default value for video bit rate tolerance = 512000. Use NoDefaults to disable it.
/home/podkrilom/ffserver/ffstart.conf:33: Setting default value for video rate control equation = tex^qComp. Use NoDefaults to disable it.
/home/podkrilom/ffserver/ffstart.conf:33: Setting default value for video max rate = 4096000. Use NoDefaults to disable it.
Mon Jul 20 18:53:11 2015 FFserver started.
Mon Jul 20 18:53:11 2015 Launch command line: ffmpeg -f h264 -r 25 -f rtsp -i rtsp://admin:admin@10.0.0.13:554/cam/realmonitor?channel=1&subtype=0 10.0.1.14:12346/webcam7.ffm
ffmpeg version 2.7 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvo-aacenc --enable-libvidstab
libavutil 54. 27.100 / 54. 27.100
libavcodec 56. 41.100 / 56. 41.100
libavformat 56. 36.100 / 56. 36.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 16.101 / 5. 16.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.100 / 1. 2.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, rtsp, from 'rtsp://admin:admin@10.0.0.13:554/cam/realmonitor?channel=1&subtype=0':
Metadata:
title : RTSP Session/2.0
Duration: N/A, start: 0.240000, bitrate: N/A
Stream #0:0: Video: h264 (High), yuvj420p(pc), 1280x720, 25 fps, 25 tbr, 90k tbn, 50 tbc
Mon Jul 20 18:53:12 2015 10.0.1.14 - - New connection: GET /webcam7.ffm
Mon Jul 20 18:53:12 2015 10.0.1.14 - - [GET] "/webcam7.ffm HTTP/1.1" 200 4175
Mon Jul 20 18:53:12 2015 10.0.1.14 - - New connection: POST /webcam7.ffm
[swscaler @ 0x1dde080] deprecated pixel format used, make sure you did set range correctly
Output #0, ffm, to '10.0.1.14:12346/webcam7.ffm':
Metadata:
title : RTSP Session/2.0
creation_time : now
encoder : Lavf56.36.100
Stream #0:0: Video: mpeg4, yuv420p, 1280x720, q=1-5, 2048 kb/s, 25 fps, 1000k tbn, 25 tbc
Metadata:
encoder : Lavc56.41.100 mpeg4
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> mpeg4 (native))
Press [q] to stop, [?] for help
frame= 2375 fps= 25 q=4.4 size= 23772kB time=00:01:35.00 bitrate=2049.9kbits/s
  • Вопрос задан
  • 3185 просмотров
Решения вопроса 1
@duoman Автор вопроса
На данный момент лучше всего использовать связку nginx + rtmp module. И производить вещание в hls и dash.
Ответ написан
Комментировать
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы