Я установил сервер red5 на Ubuntu 12.04 LTS для потокового видео и видео в реальном времени. Я просто хочу преобразовать свой поток протокола RTMP в поток протокола RTSP и HTTP. Я изучал и искал FFMPEG, но я не понимал, как это сделать правильно. Если кто-то может предложить руководство, я был бы очень благодарен.
Пример URL:
rtmp://xxxxx.com/live
чтобы:
rtsp://xxxxx.com/live and http://xxxxx.com/live
Моя команда ffmpeg:
avconv -v verbose -i rtmp://xxxxx.com:1935/live/live1 -c:v libx264 -c:a aac -ac 1 -strict -2 -crf 18 -profile:v baseline -maxrate 400k -bufsize 1835k -pix_fmt yuv420p -flags -global_header -hls_time 10 -hls_list_size 6 -hls_wrap 10 -start_number 1 http://xxxx.com/live.m3u8
После выполнения этой команды возвращается следующая ошибка:
ffmpeg version 0.8.9-4:0.8.9-0ubuntu0.12.04.1, Copyright (c) 2000-2013 the Libav developers
built on Nov 9 2013 19:08:00 with gcc 4.6.3
configuration: --extra-version='4:0.8.9-0ubuntu0.12.04.1' --arch=amd64 --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-libfreetype --enable-vaapi --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/x86_64-linux-gnu --enable-shared --disable-static
avutil configuration: --extra-version='4:0.8.9ubuntu0.12.04.1' --arch=amd64 --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-libfreetype --enable-vaapi --enable-libopenjpeg --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdirac --enable-libmp3lame --enable-librtmp --enable-libx264 --enable-libxvid --enable-libvo-aacenc --enable-version3 --enable-libvo-amrwbenc --enable-version3 --enable-libdc1394 --shlibdir=/usr/lib/x86_64-linux-gnu --enable-shared --disable-static
avcodec configuration: --extra-version='4:0.8.9ubuntu0.12.04.1' --arch=amd64 --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-libfreetype --enable-vaapi --enable-libopenjpeg --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdirac --enable-libmp3lame --enable-librtmp --enable-libx264 --enable-libxvid --enable-libvo-aacenc --enable-version3 --enable-libvo-amrwbenc --enable-version3 --enable-libdc1394 --shlibdir=/usr/lib/x86_64-linux-gnu --enable-shared --disable-static
libavutil 51. 22. 1 / 51. 22. 1
libavcodec 53. 35. 0 / 53. 35. 0
libavformat 53. 21. 1 / 53. 21. 1
libavdevice 53. 2. 0 / 53. 2. 0
libavfilter 2. 15. 0 / 2. 15. 0
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 52. 0. 0 / 52. 0. 0
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
[INFO] [NioProcessor-4] org.red5.server.net.rtmp.codec.RTMPProtocolDecoder - Action connect
[INFO] [NioProcessor-4] org.red5.server.net.rtmp.RTMPHandler - Connecting to: [WebScope@d174031 Depth = 1, Path = '/default', Name = 'jiljillive']
[INFO] [NioProcessor-4] org.red5.server.adapter.ApplicationAdapter - W3C x-category:session x-event:connect c-ip:54.254.189.206 c-client-id:32
[INFO] [NioProcessor-4] org.red5.server.net.rtmp.codec.RTMPProtocolDecoder - Action createStream
[INFO] [NioProcessor-4] org.red5.server.net.rtmp.codec.RTMPProtocolDecoder - Action play
[INFO] [pool-4-thread-4] org.red5.server.adapter.ApplicationAdapter - W3C x-category:stream x-event:play c-ip:54.254.189.206 x-sname:e28334d6-eb42-4de1-b774-81065043f86d
[INFO] [NioProcessor-4] org.red5.server.stream.ClientBroadcastStream - Consumer connect
[INFO] [pool-4-thread-1] org.red5.server.adapter.ApplicationAdapter - W3C x-category:stream x-event:play c-ip:54.254.189.206 x-sname:e28334d6-eb42-4de1-b774-81065043f86d x-name:live1
[flv @ 0x15669c0] Estimating duration from bitrate, this may be inaccurate
Input #0, flv, from 'rtmp://xxxxx.com:1935/live/live1':
Metadata:
videokeyframe_frequency: 5
avclevel : 31
videodevice : Broadcast SC Video Filter
keywords :
audiochannels : 2
presetname : Custom
copyright :
audioinputvolume: 100
creationdate : Mon Feb 10 22:44:16 2014
author :
audiodevice : Microphone (SplitCam Virtual Au
avcprofile : 66
title :
description :
rating :
Duration: N/A, start: 0.000000, bitrate: 438 kb/s
Stream #0.0: Video: h264 (Baseline), yuv420p, 320x240 [PAR 1:1 DAR 4:3], 307 kb/s, 25 tbr, 1k tbn, 50 tbc
Stream #0.1: Audio: mp3, 44100 Hz, stereo, s16, 131 kb/s
Unrecognized option 'hls_time'
Failed to set value '10' for option 'hls_time'