Home/News | About | Download | Documentation | Forum | Bug Reports | Contact | Donations | Consulting | Projects | Legal | Security | FATE


SSM Multicast via SDP with FFMPEG?

Discussions about problems encountered using ffserver.
Forum rules
FFmpeg is in a state of perpetual development and we do not currently have the person power to backport fixes to official releases. As such, if you wish to query or report a bug, you must try with the latest development branch revision of FFmpeg to confirm the issue still exists. The latest FFmpeg can be downloaded from here: http://www.ffmpeg.org/download.html

SSM Multicast via SDP with FFMPEG?

Postby dbrb2 » Fri Dec 14, 2012 11:55 am

Hello,

When I pass an SDP file, "file.sdp", format:

Code: Select all
v=0
m=video <multicast_port> RTP/AVP 96
c=IN IP4 <multicast_ip>
a=rtpmap:96 RTP/AVP
a=source-filter: incl IN IP4 <multicast_ip> <unicast_ip>


Into VLC or various other players, I can join the SSM multicast stream fine.

When I try the same with ffmpeg, I get an error:

file.sdp: could not find codec parameters


Would this be expected to work in any current or upcoming builds of ffmpeg?
Last edited by dbrb2 on Tue Jan 22, 2013 10:09 pm, edited 1 time in total.
dbrb2
 
Posts: 12
Joined: Fri Dec 14, 2012 11:50 am

Re: SSM Multicast via SDP with FFMPEG?

Postby burek » Sat Dec 22, 2012 12:12 am

Please read the "IMPORTANT" box, above the input field, when you compose your messages.
burek
 
Posts: 867
Joined: Mon May 09, 2011 10:16 pm
Location: Serbia

Re: SSM Multicast via SDP with FFMPEG?

Postby dbrb2 » Tue Jan 22, 2013 2:38 pm

Sorry about that (and for the delay in replying)

See below as requested:

Code: Select all
ffmpeg version 1.1.1 Copyright (c) 2000-2013 the FFmpeg developers
  built on Jan 22 2013 14:35:01 with gcc 4.1.2 (GCC) 20080704 (Red Hat 4.1.2-52)
  configuration: --enable-gpl --enable-libvorbis --enable-x11grab --enable-libx264 --enable-nonfree --enable-version3
  libavutil      52. 13.100 / 52. 13.100
  libavcodec     54. 86.100 / 54. 86.100
  libavformat    54. 59.106 / 54. 59.106
  libavdevice    54.  3.102 / 54.  3.102
  libavfilter     3. 32.100 /  3. 32.100
  libswscale      2.  1.103 /  2.  1.103
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[sdp @ 0x1ba57500] Could not find codec parameters for stream 0 (Video: mpeg4, yuv420p): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[sdp @ 0x1ba57500] Estimating duration from bitrate, this may be inaccurate
file.sdp: could not find codec parameters
Last edited by dbrb2 on Tue Jan 22, 2013 10:10 pm, edited 1 time in total.
dbrb2
 
Posts: 12
Joined: Fri Dec 14, 2012 11:50 am

Re: SSM Multicast via SDP with FFMPEG?

Postby dbrb2 » Tue Jan 22, 2013 6:37 pm

After a bit more digging, it seems to be down to the request to join the multicast group.

If there is another stream on the same switch as the machine running ffmpeg which has joined a multicast group streaming on the same port as the
stream I have requested, all is fine - even if the stream itself is different.

However, if this is not the case, then the timeout occurs as seen above...
dbrb2
 
Posts: 12
Joined: Fri Dec 14, 2012 11:50 am

Re: SSM Multicast via SDP with FFMPEG?

Postby dbrb2 » Tue Jan 22, 2013 10:00 pm

Ok...it seems to be down to the IGMP request, and more specifically Single Source Multicast...

If I provide an sdp file as above and present it to, for instance, VLC player, then tshark shows me:

Code: Select all
146.777143 <local_ip> -> 224.0.0.22   IGMP V3 Membership Report / Join group <multicast_video_address> for any sources
146.785156 <local_ip> -> 224.0.0.22   IGMP V3 Membership Report / Join group <multicast_video_address> for source {<unicast_video_address>}


At which point the stream is joined

However, when I try the same using ffmpeg:

Code: Select all
ffmpeg -i test.sdp

ffmpeg version 1.1.1 Copyright (c) 2000-2013 the FFmpeg developers
  built on Jan 22 2013 14:35:01 with gcc 4.1.2 (GCC) 20080704 (Red Hat 4.1.2-52)
  configuration: --enable-gpl --enable-libvorbis --enable-x11grab --enable-libx264 --enable-nonfree --enable-version3
  libavutil      52. 13.100 / 52. 13.100
  libavcodec     54. 86.100 / 54. 86.100
  libavformat    54. 59.106 / 54. 59.106
  libavdevice    54.  3.102 / 54.  3.102
  libavfilter     3. 32.100 /  3. 32.100
  libswscale      2.  1.103 /  2.  1.103
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[sdp @ 0x17126500] Could not find codec parameters for stream 0 (Video: mpeg4, yuv420p): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[sdp @ 0x17126500] Estimating duration from bitrate, this may be inaccurate
test.sdp: could not find codec parameters


Then the same tshark filter shows:
Code: Select all
456.597623 <local_ip> -> 224.0.0.22   IGMP V3 Membership Report / Join group <multicast_video_address> for any sources
458.410757 <local_ip> -> 224.0.0.22   IGMP V3 Membership Report / Join group <multicast_video_address> for any sources
466.613846 <local_ip> -> 224.0.0.22   IGMP V3 Membership Report / Leave group <multicast_video_address>

At which point ffmpeg gives up.
It looks like the SSM field of the IGMPv3 request isn't being populated by ffmpeg? Does this make sense?
dbrb2
 
Posts: 12
Joined: Fri Dec 14, 2012 11:50 am

Re: SSM Multicast via SDP with FFMPEG?

Postby burek » Tue Jan 22, 2013 10:24 pm

Yes, I think this might very well be a bug. Would you please mind reporting it to our bug tracker?
burek
 
Posts: 867
Joined: Mon May 09, 2011 10:16 pm
Location: Serbia

Re: SSM Multicast via SDP with FFMPEG?

Postby dbrb2 » Tue Jan 22, 2013 10:30 pm

No problem - didn't want to clutter up the bug tracker if it might not be.

Bug tracker reference:

Ticket #2171
https://ffmpeg.org/trac/ffmpeg/ticket/2171
dbrb2
 
Posts: 12
Joined: Fri Dec 14, 2012 11:50 am

Re: SSM Multicast via SDP with FFMPEG?

Postby burek » Tue Jan 22, 2013 10:45 pm

Thank You.
burek
 
Posts: 867
Joined: Mon May 09, 2011 10:16 pm
Location: Serbia

Re: SSM Multicast via SDP with FFMPEG?

Postby dbrb2 » Fri Jan 25, 2013 12:01 pm

As far as I can tell, one problem is that "rtsp.c" does not parse the "source-filter" line from the sdp - which contains the SSM address.

As a test, I tried passing in the stream parameters by a different method. As far as I can tell from looking at rtsp.c and the forums, the following should work:

ffmpeg -i udp://<multicast_ip>:<multicast_port>?sources=<ssm_address>

(note the plural on the sources) And indeed it does seem to, sending out the appropriate IGMP v3 message WITH source address set
dbrb2
 
Posts: 12
Joined: Fri Dec 14, 2012 11:50 am

Re: SSM Multicast via SDP with FFMPEG?

Postby burek » Fri Jan 25, 2013 12:37 pm

Could you please update your bug report (ticket) with these new findings? It might help developers narrow down the exact issue.
burek
 
Posts: 867
Joined: Mon May 09, 2011 10:16 pm
Location: Serbia

Next

Return to ffserver

Who is online

Users browsing this forum: No registered users and 1 guest