# ffmpeg-webrtc **Repository Path**: metartc/ffmpeg-webrtc ## Basic Information - **Project Name**: ffmpeg-webrtc - **Description**: 支持webrtc的ffmpeg - **Primary Language**: C - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 20 - **Forks**: 13 - **Created**: 2022-01-19 - **Last Updated**: 2025-06-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: ffmpeg, webrtc ## README # ffmpeg-webrtc implement whip and whep protocol WHIP: WebRTC HTTP Ingestion Protocol WHEP: WebRTC HTTP Egress Protocol 集成到metaRTC到ffmpeg,使ffmpeg支持webrtc Integration into metaRTC to ffmpeg makes ffmpeg support webRTC # metartc6 compile cd FFmpeg-n4.3.3/metartc6/metartc6 cd libmetartccore6 mkdir build cd build ./cmake_x64.sh or ./cmake_android.sh cp ./libmetartccore6.a ../../ # ffmpeg compile 将编译的libmetartccore6.a和其他第三方库放入FFmpeg-n4.3.3/metartc6/目录里 ./configure --enable-libx264 --enable-gpl --extra-libs='-L/path/FFmpeg-n4.3.3/metartc6 -lmetartccore6 -lpthread -lsrtp2 -lssl -lcrypto -ldl' make -j8 # 推流命令 ffmpeg ......-acodec opus -strict -2 -ar 48000 -f webrtc "url" srs sample: whip url http://192.168.0.105:1985/rtc/v1/whip/?app=live&stream=livestream ffmpeg ......-acodec opus -strict -2 -ar 48000 -f webrtc "http://192.168.0.105:1985/rtc/v1/whip/?app=live&stream=livestream" ffmpeg ......-acodec opus -strict -2 -ar 48000 -f webrtc "webrtc://192.168.0.105:1985/rtc/v1/whip/?app=live&stream=livestream" ./ffmpeg -re -i /path/test.mp4 -vcodec libx264 -acodec opus -strict -2 -ar 48000 -f webrtc "http://192.168.0.105:1985/rtc/v1/whip/?app=live&stream=livestream" # 拉流命令 ffplay "webrtc://whep_url" srs sample: whep url http://192.168.0.105:1985/rtc/v1/whip-play/?app=live&stream=livestream ffplay "webrtc://192.168.0.105:1985/rtc/v1/whip-play/?app=live&stream=livestream"