Opened 3 years ago

Closed 9 months 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 juannm 10 months ago.
Full, uncut console output

Download all attachments as: .zip

Change History (9)

comment:1 Changed 3 years ago by chacha

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

comment:2 Changed 3 years ago by cehoyos

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 Changed 3 years ago by cehoyos

  • Component changed from ffmpeg to undetermined
  • Keywords sdp added
  • Version changed from 3.4 to unspecified

comment:5 Changed 10 months ago by juannm

  • Cc oneorjuan@gmail.com added
  • Component changed from undetermined to ffmpeg
  • Version changed from unspecified to 4.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.

Changed 10 months ago by juannm

Full, uncut console output

comment:6 Changed 10 months ago by juannm

  • Cc oneorjuan@gmail.com removed

comment:7 Changed 10 months ago by cehoyos

  • Component changed from ffmpeg to undetermined
  • Version changed from 4.2 to unspecified

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 Changed 9 months ago by cehoyos

  • Component changed from undetermined to ffmpeg
  • Resolution set to fixed
  • Status changed from new to closed
  • Version changed from unspecified to git-master
Note: See TracTickets for help on using tickets.