2012-10-29 55 views
2

我可以從靜態MPEG4使用該命令創建HLS:ffmpeg:如何從rtmp流向FLS?

ffmpeg -i video.mp4 -codec copy -map 0 -f segment -segment_list out.list -segment_time 10 out%03d.ts 

我現在正在努力實現的是:

現場RTMP(FME)-------> FFMEG ---- ----------> HLS

enter image description here

我試着用:

ffmpeg -i rtmp://127.0.0.1:1935/live/video -codec copy -map 0 -f segment -segment_list out.list -segment_time 10 out%03d.ts

,但得到的錯誤:

Closing connection: NetStream.Play.StreamNotFound rtmp://127.0.0.1:1935/live/video: Unknown error occurred

任何想法如何實現:

RTMP ----> FMPEG -----> HLS?

我也試過:

ffmpeg -i "rtmp://localhost:1935/live/yarek live=1" -codec copy -map 0 -f segment -segment_list out.list -segment_time 10 out%03d.ts 

似乎更好,但stucks:

ble-zlib 

libavutil 52 0.100/0.100 52. libavcodec的 54 69.100/54 69.100 了libavformat 54 35.100/54. 35.100 libavdevice 54. 3.100/54. 3.100 libavfilter 3. 20.106/3. 20.106 libswscale 2.101/2.101101 libswresam PLE 0 16.100/16.100 0 libpostproc 52 1.100/1.100 52. RTMP服務器發送錯誤 元數據: videokeyframe_frequency8.00 avclevel 31.00 videodevice微軟LifeCam的電影 關鍵字 寬度320.00 videodatarate 350.00 presetname定製 版權 creationdate週一10月29日17時51分08秒2012 videocodecid AVC1 作者 avcprofile 66.00 標題 高度240.00 描述 評級 幀率20.00

感謝

+0

你能讀懂與ffmpeg的輸入流?也許這個問題與輸出設置無關。 – vipw

+0

是的,我可以用ffplay閱讀。 – yarek

回答

0
ffmpeg -re -i rtmp://127.0.0.1/live/video -vcodec libx264 -vprofile baseline -acodec libmp3lame -ar 44100 -ac 1 -f flv rtmp://127.0.0.1/livepkgr/video 
+2

請編輯更多信息。代碼只和「試試這個」答案都望而卻步,因爲它們不包含搜索的內容,並沒有解釋爲什麼有人要「試試這個」。我們在這裏努力成爲知識的資源。 – abarisone