Opened 7 years ago

Closed 5 years ago

#7068 closed defect (fixed)

ffmpeg SDP file generation : incorrect header

Reported by: chacha Owned by:
Priority: normal Component: ffmpeg
Version: git-master Keywords: sdp
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Let's say you generate a sdp file by broadcasting something to RTP with ffmpeg

./ffmpeg -re -thread_queue_size 4 -i test_input.mp4 -strict -2 -an -vcodec mpeg2video -f rtp rtp://192.168.1.28:4566 -sdp_file ffmpeg-broadcast-to-rtp.sdp

The generated SDP file will have a "SDP:\n" header as found in ffmpeg.c:print_sdp()

This is not a valid syntax for a SDP file and such files won't be opened by VLC.

Attachments (1)

ffmpeg-20200115-195214.log (10.7 KB ) - added by Juan Navarro 5 years ago.
Full, uncut console output

Download all attachments as: .zip

Change History (9)

comment:1 by chacha, 7 years ago

The RFC for SDP syntax :
https://tools.ietf.org/html/rfc4566

comment:2 by Carl Eugen Hoyos, 7 years ago

Please test current FFmpeg git head and post the command line you tested together with the complete, uncut console output to make this a valid ticket.

comment:4 by Carl Eugen Hoyos, 7 years ago

Component: ffmpegundetermined
Keywords: sdp added
Version: 3.4unspecified

comment:5 by Juan Navarro, 5 years ago

Cc: oneorjuan@gmail.com added
Component: undeterminedffmpeg
Version: unspecified4.2

I'm adding the full command line output in an attempt to make this a valid ticket, although for this specific case it shouldn't really be needed. Anyone who has ever seen an SDP message ever, knows that starting with "SDP:" is not valid.

Test command:

ffmpeg \
    -re \
    -i video.mp4 \
    -an \
    -c:v copy \
    -f rtp \
    -sdp_file video.sdp \
    "rtp://127.0.0.1:5004"

Generated SDP file:

SDP:
v=0
o=- 0 0 IN IP4 127.0.0.1
s=No Name
c=IN IP4 127.0.0.1
t=0 0
a=tool:libavformat 58.29.100
m=video 5004 RTP/AVP 96
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1; sprop-parameter-sets=Z0LAH9kAUAW7ARAAAD6QAAu4CPGDJIA=,aMuMsg==; profile-level-id=42C01F

Offending line:

SDP:

Expected SDP file:

v=0
o=- 0 0 IN IP4 127.0.0.1
s=No Name
c=IN IP4 127.0.0.1
t=0 0
a=tool:libavformat 58.29.100
m=video 5004 RTP/AVP 96
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1; sprop-parameter-sets=Z0LAH9kAUAW7ARAAAD6QAAu4CPGDJIA=,aMuMsg==; profile-level-id=42C01F

Tested version: latest available as of right now in John Van Sickle's website: https://www.johnvansickle.com/ffmpeg/

Full, uncut console output generated with '-report' and provided in the attached file.

by Juan Navarro, 5 years ago

Attachment: ffmpeg-20200115-195214.log added

Full, uncut console output

comment:6 by Juan Navarro, 5 years ago

Cc: oneorjuan@gmail.com removed

comment:7 by Carl Eugen Hoyos, 5 years ago

Component: ffmpegundetermined
Version: 4.2unspecified

The version you tested is old: Is the issue not reproducible with current FFmpeg git head, the only version supported on this bug tracker?

comment:8 by Carl Eugen Hoyos, 5 years ago

Component: undeterminedffmpeg
Resolution: fixed
Status: newclosed
Version: unspecifiedgit-master
Note: See TracTickets for help on using tickets.