diff options
author | Limin Wang <lance.lmwang@gmail.com> | 2022-01-01 20:19:50 +0800 |
---|---|---|
committer | Limin Wang <lance.lmwang@gmail.com> | 2022-01-12 09:21:07 +0800 |
commit | b697326a68372bec6dc3adece9afaaaebae5028d (patch) | |
tree | 50a7ea8c3f2808c646768842c2874df7e7c4e350 /libavformat/sdp.c | |
parent | 3ea93bbd6d9687f0171ae632c94b18199b9e62a4 (diff) | |
download | ffmpeg-b697326a68372bec6dc3adece9afaaaebae5028d.tar.gz |
avformat/rtpenc_rfc4175: support for interlace format
Below are steps how to test on your local host:
wget --no-check-certificate https://samples.ffmpeg.org/MPEG2/interlaced/burosch1.mpg
1. interlace format:
ffmpeg -re -i ./burosch1.mpg -c:v bitpacked -pix_fmt yuv422p10 -f rtp rtp://239.255.0.1:6000
copy and create sdp file test.sdp
ffplay -buffer_size 671088640 -protocol_whitelist "file,rtp,udp" test.sdp
2. progressive format:
ffmpeg -re -i ./burosch1.mpg -vf yadif -c:v bitpacked -pix_fmt yuv422p10 -f rtp rtp://239.255.0.1:6000
copy and create sdp file test.sdp
ffplay -buffer_size 671088640 -protocol_whitelist "file,rtp,udp" test.sdp
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Diffstat (limited to 'libavformat/sdp.c')
-rw-r--r-- | libavformat/sdp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/sdp.c b/libavformat/sdp.c index 2230d74742..d63a0b34c4 100644 --- a/libavformat/sdp.c +++ b/libavformat/sdp.c @@ -728,9 +728,12 @@ static int sdp_write_media_attributes(char *buff, int size, const AVStream *st, av_strlcatf(buff, size, "a=rtpmap:%d raw/90000\r\n" "a=fmtp:%d sampling=%s; " "width=%d; height=%d; " - "depth=%d\r\n", + "depth=%d", payload_type, payload_type, pix_fmt, p->width, p->height, bit_depth); + if (p->field_order != AV_FIELD_PROGRESSIVE) + av_strlcatf(buff, size, "; interlace"); + av_strlcatf(buff, size, "\r\n"); break; } |