#3533 closed defect (fixed)
RTP should have payload type 33 when used with MPEGTS
Reported by: | nunojpg | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avformat |
Version: | git-master | Keywords: | rtp |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
When RTP is sending a MPEGTS payload it should report it properly.
Otherwise the clients require a SDP, which is completely unnecessary.
The correct RTP payload type is 33 - MP2T - MPEG-2 transport stream Video.
nuno@ground3:~$ ffmpeg -i Desktop/sample1.mp4 -f mpegts rtp://127.0.0.1:5004 ffmpeg version N-62130-g8348bd1 Copyright (c) 2000-2014 the FFmpeg developers built on Apr 4 2014 17:04:57 with gcc 4.7 (Ubuntu/Linaro 4.7.3-1ubuntu1) configuration: --enable-libx264 --enable-gpl --enable-libfaac --enable-nonfree libavutil 52. 73.100 / 52. 73.100 libavcodec 55. 56.108 / 55. 56.108 libavformat 55. 36.101 / 55. 36.101 libavdevice 55. 11.100 / 55. 11.100 libavfilter 4. 3.100 / 4. 3.100 libswscale 2. 6.100 / 2. 6.100 libswresample 0. 18.100 / 0. 18.100 libpostproc 52. 3.100 / 52. 3.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Desktop/sample1.mp4': Metadata: major_brand : isom minor_version : 0 compatible_brands: isom3gp4 creation_time : 2013-08-15 12:05:34 Duration: 00:00:40.13, start: 0.000000, bitrate: 17062 kb/s Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 16934 kb/s, 29.88 fps, 30 tbr, 90k tbn, 180k tbc (default) Metadata: creation_time : 2013-08-15 12:05:34 handler_name : VideoHandle Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 123 kb/s (default) Metadata: creation_time : 2013-08-15 12:05:34 handler_name : SoundHandle Output #0, mpegts, to 'rtp://127.0.0.1:5004': Metadata: major_brand : isom minor_version : 0 compatible_brands: isom3gp4 encoder : Lavf55.36.101 Stream #0:0(eng): Video: mpeg2video, yuv420p, 1920x1080, q=2-31, 200 kb/s, 90k tbn, 30 tbc (default) Metadata: creation_time : 2013-08-15 12:05:34 handler_name : VideoHandle Stream #0:1(eng): Audio: mp2, 48000 Hz, stereo, s16, 128 kb/s (default) Metadata: creation_time : 2013-08-15 12:05:34 handler_name : SoundHandle Stream mapping: Stream #0:0 -> #0:0 (h264 -> mpeg2video) Stream #0:1 -> #0:1 (aac -> mp2) Press [q] to stop, [?] for help frame= 1204 fps= 57 q=31.0 Lsize= 12626kB time=00:00:40.33 bitrate=2564.5kbits/s dup=5 drop=0 video:10918kB audio:626kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 9.366050%
nuno@ground3:~$ ffplay rtp://127.0.0.1:5004 ffplay version N-62130-g8348bd1 Copyright (c) 2003-2014 the FFmpeg developers built on Apr 4 2014 17:04:57 with gcc 4.7 (Ubuntu/Linaro 4.7.3-1ubuntu1) configuration: --enable-libx264 --enable-gpl --enable-libfaac --enable-nonfree libavutil 52. 73.100 / 52. 73.100 libavcodec 55. 56.108 / 55. 56.108 libavformat 55. 36.101 / 55. 36.101 libavdevice 55. 11.100 / 55. 11.100 libavfilter 4. 3.100 / 4. 3.100 libswscale 2. 6.100 / 2. 6.100 libswresample 0. 18.100 / 0. 18.100 libpostproc 52. 3.100 / 52. 3.100 [rtp @ 0x7f200c0008c0] Unsupported RTP version packet received0/0 [rtp @ 0x7f200c0008c0] Unable to receive RTP payload type 65 without an SDP file describing it Input #0, rtp, from 'rtp://127.0.0.1:5004': Duration: N/A, bitrate: N/A Failed to open file 'rtp://127.0.0.1:5004' or configure filtergraph
Change History (7)
follow-up: 2 comment:1 by , 10 years ago
comment:2 by , 10 years ago
Replying to thovo:
Your cmd line is wrong. It explicitly requests for an mpeg TS as output - not an RTP output stream.
Actual ouput: RTP carrying MPEG-TS.
Actual payload type: not 33.
Bug.
The cmd line being eventually wrong does not change that this demonstrates a bug. It might not produce the result I would expect though.
But what would be the right cmd line? If I don't explicitly set it to MPEG-TS then it is streaming a naked video over RTP, while I want it to stream video and audio encapsulated MPEG-TS with RTP.
comment:3 by , 10 years ago
You have to decide between MPEG-TS and RTP as outer format for your stream. Both are not possible at the same time and data flow.
If you need this kind of packetizing sheme, you could add another ticket labelled "Support for RTP/MPEGTS packetizing". And I think a patch for this would be welcome.
comment:4 by , 10 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:5 by , 10 years ago
Could you please explain what kind of format is being sent when I use it in this unsupported way?
ffmpeg -i Desktop/sample1.mp4 -f mpegts rtp://127.0.0.1:5004
Since my ticket still reports a bug, but if this is unsupported, the bug could be formally fixed by throwing a error message and returning when the user requests this unsupported operation.
comment:6 by , 10 years ago
Keywords: | rtp added |
---|---|
Resolution: | wontfix → fixed |
Version: | unspecified → git-master |
Martin Storsjö committed a patch that shows a warning now for the original command line since 5ab46704
comment:7 by , 10 years ago
For anyone looking for the correct command to send an MPEG2 Transport Stream over RTP, it's
ffmpeg -re -i input.avi -f rtp_mpegts -acodec mp3 rtp://127.0.0.1:5004
Your cmd line is wrong. It explicitly requests for an mpeg TS as output - not an RTP output stream.