GrantChen
V2EX  ›  问与答

ffmpeg 高手求助

  •  
  •   GrantChen · Jun 5, 2017 · 2363 views
    This topic created in 3277 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   ·   918 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 20:47 · PVG 04:47 · LAX 13:47 · JFK 16:47
    ♥ Do have faith in what you're doing.