We are using FFmpeg for real time streaming in iPhone.
For testing purpose we have hosted a video on local server.When we try to start stream avformat_open_input method always return error code -5.
I have read some where that is is I/O error but the same URL working fine on VLC media player.
If we start streaming on VLC first then play it on iPhone it works fine.
I am not getting where I am wrong the IP address and network connection both are fine.
Related
I have a streaming app which is able to receive a video stream via raw h264 or h265 (HEVC). I render the stream via AVSampleBufferDisplayLayer. I uploaded my app via TestFlight and some users mentioned that the h265 freezes sometimes. I started to investigate the issue and it turned out the h265 stream sometimes freezes but without any errors. Even the AVSampleBufferDisplayLayer status is returning ".rendering" and "isReadyForMoreMediaData" is returning true. The stream only continues after I receive an I-Frame/ Key-Frame.
It is a real time streaming app and the problem occurs when I lose a frame during the streaming session (which can happen regularly). I connect to a 3rd Party streaming server so I can't change I-Frame interval. On h264 when I lose a frame then the stream will get pixelated until I receive the next I-Frame (which is expected) but for some reason the stream freezes when I lose a frame via h265. Are there any settings which I can apply to the "CMSampleBuffer" via the "CFDictionarySetValue" to avoid this?
Here is the code I use currently to render a frame
https://gist.github.com/grill2010/6299f90c5f021f8856474b573ae1fc41
Edit: I built a small sample app to reproduce the problem. It is available here
https://bitbucket.org/grill2010/hevcdecodertest/src/master/
The project will render a HEVC stream (stream length is only a few seconds in total). The sample app includes two buttons "Start decoding" and "Start Decoding with lost frame". If you click "Start decoding" the stream will be rendered correctly but if you click "Start Decoding with lost frame" you see that it will freeze immediately the app simulates a frame loss.
I have to add live video streaming in one of my app; I am using Wowza Streaming Cloud for the same. I am using REST Api to make it as my requirement.
The flow I had used is:
Create a stream
Start stream
Check status unless it is "started"
if the status is started, I start broadcasting video.
It goes well sometimes, but sometimes when I try to broadcast even after starting the stream, it says:
Status is idle, An error occurred when trying to connect to host: (code = 15)
Also I see a green screen on player side, and the video on player side is not continuous, it keeps on fluttering.
For Player I used the code provided in sample app.
For Broadcasting I had used GoCoder SDK wherein I set all of the properties like host address, port, app name, stream name, etc.
Do I have to set bitrate or anything?
Where am I wrong?
That error occurs when the entrypoint itself is open for more than 20 minutes without a connection. Once you get an IP returned from the API for the stream, you can connect to it right away. The errors you're getting are showing idle due to lack of connection and it sounds like the timing between starting the event, checking the event, and then finally connecting are hitting this restriction.
We have implemented RTSP server on our MCU. For testing purpose we are using VLC media player as a client. We coded our MCU such a way that only after receiving PLAY command from client, MCU reads data from camera. And we are seeing MCU receives data from camera and streams thorugh RTSP. We could see data streaming from server through UDP on Wireshark. And Also Codec information getting dispalyed on VLC media player. But video doesn't get played in VLC.What could be the issue?
Below is our SDP file info
"v=0\r\ns=Unnamed\r\ni=N/A\r\nc=IN IP4 sumukha-PC\r\nt=0 0\r\na=tool:vlc 2.2.2\r\na=recvonly\r\na=type:broadcast\r\na=charset:UTF-8\r\na=control:rtsp://192.168.1.100:8555\r\nm=video 0 RTP/AVP 96\r\nb=RR:0\r\na=rtpmap:96 H264/90000\r\na=fmtp:96 packetization-mode=1\r\na=control:rtsp://192.168.1.100:8555/trackID=0\r\n\r\n");
Thanks,
Ck
The error message tells you what is going wrong:
live555 error: no data received in 10s, aborting
The usual reasons for this are firewalls or NAT?
You can select the RTP over RTSP (TCP) option in the VLC preferences to verify this. If the stream works over TCP, UDP packets are being blocked somewhere.
I suggest using ffmpeg and ffplay to test your streaming from a RTSP source.
It is command line, but the information and logs are very helpful
Im using MPMoviePlayerController to stream audio from a server, but after playing the audio for more than two minutes, the audio starts to stop and resume alot, im streaming more than one file one after one, so because of the interruption, some of the audio files are being skipped with those two console messages:
Took background task assertion (38) for playback stall
Ending background task assertion (38) for playback stall
I'm losing a lot of tracks because of this error.
for the first while, i thought that was a memory issue, but the console shows that each time a loose a track, it print those messages,
Check your network connectivity and the stream encoding.
This console output pretty much says exactly what your problem is; the stream dries out of content and could not keep up playing without interruption.
Either your network connection is unstable or the content is encoded in bandwidths that are far too high for your network connection.
For clarification; even if your local internet peering is offering high bandwidths, you should still check the bandwidths of the entire route. For example, you could try to download the streamed files via your browser for testing the throughput.
Are you trying it on a simulator or a device? It may be a simulator issue.
Also, on device, try streaming through multiple networks, e.g., LTE, wifi, etc., see if there is any difference
I would like to put the things more clearly as follows.I have window 7 as client and window 2008 as terminal server.so when i remotely connect to terminal server using mstsc and selecting the option play at server machine that time i need to play it local client machine.
Initially what i get server doesn't allow for play the audio files.So how to implement the audio interface so that each application would respond to that interface and eventually it will streaming audio over a virtual channel to the local machine where i can play the audio.
I implemented that remote audio playback for window 7 and Vista using core audio APIs.It works fine for me with low latency and high resolution but in case of windows server the audio interface is not there .so how to implement that so that any application playing audio would respond to the audio interface(audio device).
Could you please suggest me any example so that i can implement the audio interface MMDevice which will respond to all playing applications?
Thanks