We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
转码
H264 转 MP4 $ ffmpeg -i "input.h264" -c:v copy -f mp4 "output.mp4" MP4 转 TS $ ffmpeg -i faded.mp4 -c copy -vbsf h264_mp4toannexb faded.ts TS 文件切片 $ ffmpeg -i faded.ts -c copy -map 0 -f segment -segment_list playlist.m3u8 -segment_time 5 output%03d.ts MP4 转为 HLS 列表(MPEG-TS) $ ffmpeg -i faded.mp4 -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls playlist.m3u8 MP4 转为 HLS 列表(FMP4) $ ffmpeg -i faded.mp4 -f hls -hls_segment_type fmp4 -hls_time 10 -report playlist.m3u8 如果指定 hls_flags 则生成单文件 + 字节偏移说明的 m3u8 文件 $ ffmpeg -i faded.mp4 -f hls -hls_segment_type fmp4 -hls_time 10 -report -hls_flags single_file playlist.m3u8 PS:生成 HLS 播放列表的命令,参数加上 -re 即为推流指令。 推流 监听 UDP 端口转推为 HLS 流 如果视频编码为 H264 或 H265,音频编码为 ACC 则可以直接推送 $ ffmpeg -i udp://127.0.0.1:10000 -c copy -f hls playlist.m3u8 否则需要先进行转码 $ ffmpeg -i udp://127.0.0.1:10000 -c:v x264 -c:a aac -f hls playlist.m3u8 将 MP4 文件通过 UDP 协议推送为 MPEG-TS 流 可以通过这个命令发送流,上个命令监听地址接收流转推 $ ffmpeg -re -i faded.mp4 -codec copy -bsf:v h264_mp4toannexb -f mpegts udp://127.0.0.1:10000?pkt_size=1316 将 MP4 通过 UDP 协议推送为 RTSP 流 $ ffmpeg -re -i faded.mp4 -rtsp_transport tcp -vcodec h264 -f rtsp rtsp://192.168.3.4/test 将 h264 文件推流到 RTMP 服务器 $ ffmpeg -re -i hik.h264 -c copy -f flv rtmp://192.168.3.4/live/fromh264 摄像头 转推海康RTSP到RTMP服务器 $ ffmpeg -rtsp_transport tcp -i rtsp://username:[email protected]:554/h264/ch1/main/av_stream -vcodec copy -acodec copy -ar 44100 -strict -2 -ac 1 -f flv -s 1280x720 -q 10 -f flv rtmp://192.168.3.4/live/fromrtsp 摄像头取流地址
海康rtsp地址(主码流) rtsp://admin:[email protected]:554/h264/ch1/main/av_stream rtsp://admin:[email protected]:554/mpeg-4/ch1/main/av_stream
海康rtsp地址(子码流) rtsp://admin:[email protected]/h264/ch1/sub/av_stream rtsp://admin:[email protected]/h264/mpeg-4/sub/av_stream
https://www.wowza.com/docs/how-to-restream-using-ffmpeg-with-wowza-streaming-engine https://itqna.net/questions/79051/how-convert-udp-stream-hls-using-ffmpeg https://www.globaldots.com/blog/fragmented-mp4-fmp4-support-for-hls-v4-lets-shed-some-light-on-it
The text was updated successfully, but these errors were encountered:
No branches or pull requests
转码
海康rtsp地址(主码流) rtsp://admin:[email protected]:554/h264/ch1/main/av_stream rtsp://admin:[email protected]:554/mpeg-4/ch1/main/av_stream
海康rtsp地址(子码流) rtsp://admin:[email protected]/h264/ch1/sub/av_stream rtsp://admin:[email protected]/h264/mpeg-4/sub/av_stream
参考
https://www.wowza.com/docs/how-to-restream-using-ffmpeg-with-wowza-streaming-engine
https://itqna.net/questions/79051/how-convert-udp-stream-hls-using-ffmpeg
https://www.globaldots.com/blog/fragmented-mp4-fmp4-support-for-hls-v4-lets-shed-some-light-on-it
The text was updated successfully, but these errors were encountered: