[FFmpeg-trac] #3532(avformat:new): Muxer SAP can't use unicast address when same_port=1

FFmpeg trac at avcodec.org
Fri Apr 4 19:36:14 CEST 2014


#3532: Muxer SAP can't use unicast address when same_port=1
----------------------------------+---------------------------------------
             Reporter:  nunojpg   |                     Type:  defect
               Status:  new       |                 Priority:  normal
            Component:  avformat  |                  Version:  unspecified
             Keywords:  SAP       |               Blocked By:
             Blocking:            |  Reproduced by developer:  0
Analyzed by developer:  0         |
----------------------------------+---------------------------------------
 Muxer SAP when used with:
 -two streams (video and audio)
 -same_port=1
 -unicast address

 Produces a SAP announcement that is not recognized by ffplay or VLC.

 With a multicast address it works fine!

 {{{
 nuno at ground3:~$ ffmpeg -f v4l2 -i /dev/video0 -f alsa -i hw:1 -f sap
 sap://127.0.0.1?same_port=1
 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, video4linux2,v4l2, from '/dev/video0':
   Duration: N/A, start: 7716.272909, bitrate: 165888 kb/s
     Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1920x1080,
 165888 kb/s, 5 fps, 5 tbr, 1000k tbn, 1000k tbc
 Guessed Channel Layout for  Input Stream #1.0 : stereo
 Input #1, alsa, from 'hw:1':
   Duration: N/A, start: 1396632350.346565, bitrate: 1024 kb/s
     Stream #1:0: Audio: pcm_s16le, 32000 Hz, stereo, s16, 1024 kb/s
 Output #0, sap, to 'sap://127.0.0.1?same_port=1':
   Metadata:
     encoder         : Lavf55.36.101
     Stream #0:0: Video: mpeg4, yuv420p, 1920x1080, q=2-31, 200 kb/s, 90k
 tbn, 5 tbc
     Stream #0:1: Audio: aac (libfaac), 32000 Hz, stereo, s16, 128 kb/s
 Stream mapping:
   Stream #0:0 -> #0:0 (rawvideo -> mpeg4)
   Stream #1:0 -> #0:1 (pcm_s16le -> libfaac)
 Press [q] to stop, [?] for help
 frame=   37 fps=5.2 q=7.4 Lsize=N/A time=00:00:07.40 bitrate=N/A dup=2
 drop=0
 video:504kB audio:96kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: 3005486311931904.000000%
 Received signal 2: terminating.
 }}}


 {{{
 nuno at ground3:~$ ffprobe sap://
 ffprobe version N-62130-g8348bd1 Copyright (c) 2007-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
 [udp @ 0x37d15c0] bind failed: Address already in use
 sap://: Invalid data found when processing input
 }}}


 The SAP announcement being made:

 {{{
 sdp://v=0
 o=- 0 0 IN IP4 127.0.0.1
 s=No Name
 t=0 0
 a=tool:libavformat 55.36.101
 m=video 5004 RTP/AVP 96
 c=IN IP4 127.0.0.1
 b=AS:200
 a=rtpmap:96 MP4V-ES/90000
 a=fmtp:96 profile-level-id=1;
 config=000001B001000001B58913000001000000012000C48D88002D3C04871443000001B24C61766335352E35362E313038
 m=audio 5004 RTP/AVP 97
 c=IN IP4 127.0.0.1
 b=AS:128
 a=rtpmap:97 MPEG4-GENERIC/32000/2
 a=fmtp:97 profile-level-id=1;mode=AAC-
 hbr;sizelength=13;indexlength=3;indexdeltalength=3; config=1290
 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/3532>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list