Cannot pull stream from local SDP file generated with ffmpeg
I’m trying to pull a stream from a SDP file using EMS 1.7 on an EC2 server.
The stream and its SDP description is generated with ffmpeg as follow :
ffmpeg -re -i sample.mp4 -vn -ac 1 -c:a copy -f rtp rtp://<EMS-public-IP>:51000 \The resulting SDP file is as follow :
-an -c:v copy -f rtp rtp://<EMS-public-IP>:51004 > sample.sdp
SDP:The SDP file is copied on the EMS server ‘as is’, expect first line that gives a specific error and changing origin IP address with EMS server public IP. When trying to pull the stream I get the following on console :
v=0
o=- 0 0 IN IP4 127.0.0.1
s=No Name
t=0 0
a=tool:libavformat 57.20.100
m=audio 51000 RTP/AVP 97
c=IN IP4 <EMS-public-IP>
b=AS:255
a=rtpmap:97 MPEG4-GENERIC/48000/2
a=fmtp:97 profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3; config=1190
m=video 51004 RTP/AVP 96
c=IN IP4 <EMS-public-IP>
b=AS:17023
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1; sprop-parameter-sets=Z2SAKKy0A8ARPyo=,aO4G4sA=; profile-level-id=648028
pullStream uri=file:///home/ubuntu/streams/sample.sdp -localStreamName=sampleAnd the following in log file :
Command failed!
Unable to pull requested stream
1465331545:3:/applications/evorouter/src/protocols/cli/cliappprotocolhandler.cpp:1205:ProcessMessage:command: pullstreamAm I right, when thinking that this RTP streaming trial with ffmpeg should have succeed ? Is there something wrong in the SDP file ?
1465331545:2:/thelib/src/protocols/rtp/sdp.cpp:514:ParseSDPLineA:Attribute `tool` with value `libavformat 57.20.100` not parsed
1465331545:0:/thelib/src/protocols/rtp/sdp.cpp:731:ParseVideoTrack:Track with no control uri
1465331545:0:/thelib/src/protocols/rtp/sdp.cpp:96:GetVideoTrack:Video track index 0 not found
1465331545:0:/thelib/src/protocols/rtp/sdp.cpp:770:ParseAudioTrack:Track with no control uri
1465331545:0:/thelib/src/protocols/rtp/sdp.cpp:149:GetAudioTrack:Audio track index 0 not found
1465331545:0:/applications/evorouter/src/protocols/rtp/sdpappprotocolhandler.cpp:63:PullExternalStream:No compatible tracks found
1 Answers
Hi Laurent,
a=control:trackID=is missing for both tracks. Your SDP file should look something like this:
v=0
o=- 0 0 IN IP4 127.0.0.1
s=No Name
t=0 0
a=tool:libavformat 57.20.100
m=audio 51000 RTP/AVP 97
c=IN IP4 <EMS-public-IP>
b=AS:255
a=rtpmap:97 MPEG4-GENERIC/48000/2
a=fmtp:97 profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3; config=1190
a=trackID=1
m=video 51004 RTP/AVP 96
c=IN IP4 <EMS-public-IP>
b=AS:17023
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1; sprop-parameter-sets=Z2SAKKy0A8ARPyo=,aO4G4sA=; profile-level-id=648028
a=trackID=2