GrantChen
V2EX  ›  问与答

ffmpeg 高手求助

  •  
  •   GrantChen · Jun 5, 2017 · 2349 views
    This topic created in 3272 days ago, the information mentioned may be changed or developed.
    目前这边设备有持续输出的 RTP 视频和音频流,如何通过 ffmpeg 转化成 rtmp 可以直播的地址呢?刚接触音视频相关 的开发,这块不是很懂,希望高手指点?
    4 replies    2017-06-05 15:26:16 +08:00
    icount
        1
    icount  
       Jun 5, 2017   ❤️ 1
    ffmpeg -re -i ~/Downloads/一条狗的使命.mp4 -vcodec copy -f flv rtmp://121.42.141.249:1935/myapp2/room
    GrantChen
        2
    GrantChen  
    OP
       Jun 5, 2017
    @icount 我目前输入的数据不是 mp4,是 rtp 的两个数据流,音频流和视频流
    GrantChen
        3
    GrantChen  
    OP
       Jun 5, 2017
    不清楚 ffmpeg 在这种情况下怎么做音视频同步?
    mdzz
        4
    mdzz  
       Jun 5, 2017
    ffmpeg -i rtp://video -i rtp://audio -map "0:v" -map "1:a" -f flv rtmp://out
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4457 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 00:12 · PVG 08:12 · LAX 17:12 · JFK 20:12
    ♥ Do have faith in what you're doing.