I'm using FFmpeg in my iOS application to read an RTSP (over UDP) stream. VLC offers some media information -> statistics about the stream that is being played. The number of Video Frames lost is what I'm interested in.
My question: is there a way to get these statistics (frames lost) with FFmpeg while reading from an UDP stream?
Thanks.
RTCP is used to collect statistics. Check if ffmpeg libs provide some API to access RTCP information
Related
I have a .pcap file captured from my network adapter using Wireshark. I'm trying to analyses its contents using a python script. The problem is that I can't find anything specific to RTP packets in the Wireshark. Note that I don't want to use the port numbers to detect the protocol. I want to inspect the raw data and detect the RTP protocol packets. Is there any way to do that? I mean is there anything special in RTP packets that I can use that statistic to detect RTP packets among a lot of other protocols packets?
Wireshark analyses the VOIP signaling messages to know which UPD ports are being used for RTP. Apart from the version number bits (and thats really too short), the RTP packets themselves don't have much you can use to identify them by themselves.
There is a setting in wireshark that allows RTP detection without signaling:
Edit menu -> Preferences -> Protocols -> RTP -> Allow subdissector to reassemble RTP streams
I have an incoming RTP stream on one computer (called, "server1") connected to another computer (called, "client1") over a LAN. However, the Ethernet header (MACDA/MACSA), IPv4 header (IPDA/IPSA), and UDP header (dstport/srcport) for all of the packets belong to another network and different computers. Furthermore, the client computer did not request or initiate the stream. It is "just there"! :)
I am not interested in controlling (stopping, starting, track jumping, etc.) the stream. I just want to see and hear it in a VLC client.
I have complete control over the packets, so that I can change all of the header info as it leaves the server.
How can I modify the packets, so that VLC will play them? I can point VLC at my server, and I can mangle the packets, so they appear to have been sourced by the server and destined for the client. But, I do not know the destination port opened by VLC on the client. What am I missing?
Thanks!
I may not have the best answer, but here's a little something that might help...
"I was trying vlc player and I says, Sdp required, cannot play rtp with dynamic payload type. Is it possible to play rtp with dynamic payload type by other player, or somehow create sdp protocol using libjitsi. Thanks a lot."
Reply:
"You need an SDP description.
I found on stackoverflow a minimal SDP description. Minimum SDP for making a H264 RTP stream?.
You can try to replace the IP address, port number and payload type by the ones you’re using, maybe that’ll work."
After reading the documents of icecast, I have two questions:
1) I'm not sure the icecast server can buffer audio streams, if It does can, How about using relaying?
2) If i have many dynamic relay servers to proxy, How to config the config file? I mean I have to change the config file dynamicly, since i have not sean that icecast supports the regular expression such as /realtime(\d+) to match all the realtime stations.
Icecast does buffer streams. When a client connects, the buffer data is flushed as fast as Icecast can loop around and send data.
Icecast can also relay existing streams. From the documentation:
<relay>
<server>192.168.1.11</server>
<port>8001</port>
<mount>/example.ogg</mount>
<local-mount>/different.ogg</local-mount>
<relay-shoutcast-metadata>0</relay-shoutcast-metadata>
</relay>
Now, as for doing this on-the-fly, as far as I know there is no way to do this in Icecast.
I found one of the solutions which is free & simple (tried & tested), but with some limitations.
Rocket Streaming Audio Server
https://www.rocketbroadcaster.com/streaming-audio-server/
It really allows you to relay https stream to http (stream mirroring). Configuring the app is simple. It relays streams 'as is' (without re-encoding), but in free version you can stream only to 100 listeners.
I have a really high quality RTSP feed coming into a windows server. I'm attempting to use VLC to restream it as Http Live Streaming.
Does anyone know whether it is possible to establish this stream through VLC's graphic user interface as opposed to the command line? If so, how?
The examples I've found so far (on here and elsewhere) have all been command line examples and none of them have worked at all.
I would love to hear from anyone who has actually accomplished a successful restream of RTSP to an http live stream using a windows server. Incidentally, I already have the website set up to serve the result, but I can't get the stream to write the .ts files regardless of what I've tried.
I'm stumped. Thanks.
just look this command for example:
vlc -I dummy rtsp://ip:port/blablabla--sout '#transcode{vcodec=h264,fps=20,vb=512,scale=1,acodec=none,venc=x264{aud,profile=high,level=60,keyint=15,bframes=0,ref=1,nocabac}}:duplicate{dst=std{access=livehttp{seglen=10,delsegs=true,numsegs=10,index=/var/www/live/mystream.m3u8,index-url=http://ip/live/mystream-########.ts},mux=ts{use-key-frames},dst=/var/www/live/mystream-########.ts},dst=std{access=http,mux=ts,dst=:8082/video.mp4}}'
I'm having a problem here. I want to play RSTP streaming on ipad and iphone. but I find out that it will be much more easier if I use Http Live Streaming. I want to convert my RTSP streaming to Http live streaming using lighttpd. but I really have no idea how to do that. Do lighttpd accetp rtsp streaming url as input? Can anyone help? thanks!
you have two choices:
1) Run a server on your network that re-streams rtsp as hls.
a) wowza - popular, expensive
b) live 555 - free, lots of work
d) ffserver - free and as basic as it gets tons of work to make work.
Advantage :
No bandwidth restrictions over cellular or wi-fi
play with native apple players
Disadvantage
High server bandwidth - if your paying for server time you may want to watch this.
high letancy - forget any kind of live video.
2) Run FFmpeg based player on device
advantages :
a) A lot easier than it used to be, we do this all the time
b) deal with lgpl license, clear guidelines at ffmpeg.org and not a huge hassle
c) all on device, no server load issues.
Disadvantages
Limited bandwidth over celluar (about 10 min intervals), unlimited over wifi
lighttpd doesn't accept RTSP as an input. You will need some sort of translator program to read the rtsp stream and output the files to the website storage. I think you could do it with the avconv/ffmpeg program.