Hi All,
I have a stream of h264 data at producer end which I need to transmit to consumer using mediasoup. I have created router (at server end) and consumers (at both server and consumer end). I have also created plain transport for ffmpeg (with comedia true). Now when I use below rtp parameters
{ kind: ‘video’,
rtpParameters: {
codecs: [
{
mimeType: ‘video/VP8’,
clockRate: 90000,
payloadType: 102,
}
],
encodings: [ { ssrc: 22222222 } ]
}
}
and run below ffmpeg command
ffmpeg -re -i unix:/tmp/media -map 0:v:0 -pix_fmt yuv420p -v info -c:v libvpx -an -deadline realtime -cpu-used 4 -f tee "[select=v:f=rtp:ssrc=22222222:payload_type=102]rtp://127.0.0.1:2064?rtcpport=2025?pkt_size=1200
It works but it tries to convert the h264 data to VP8. Now I want to send the data keeping the format same (h264). So I change rtpParameters to these
{
kind: ‘video’,
rtpParameters: {
codecs: [
{
mimeType: ‘video/H264’,
clockRate: 90000,
payloadType: 102,
parameters: {
‘packetization-mode’: 1,
‘profile-level-id’: ‘4d401f’,
},
}
],
encodings: [ { ssrc: 22222222 } ]
}
}
and run the below command
ffmpeg -re -i unix:/tmp/media -map 0:v:0 -pix_fmt yuv420p -v info -c:v copy -an -deadline realtime -cpu-used 4 -f tee “[select=v:f=rtp:ssrc=22222222:payload_type=102]rtp://127.0.0.1:2064?rtcpport=2025?pkt_size=1200”
I get nothing. It is possible the issue is with the ffmpeg command. However I’ll appreciate any help (even if it is to establish the issue is with the command or ffmpeg itself!)
Many thanks in advance!