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.
            Asked
            
        
        
            Active
            
        
            Viewed 629 times
        
    3
            
            
        - 
                    First make sure that your streaming file not should be **.wma** file. – iPatel May 23 '14 at 06:49
 - 
                    Thanks for your response iPatel but how the format will effect the streaming.The same video is stream fine on VLC and it works on my iPhone only if I play it on VLC first.Is there any API in ffmpeg which could initialize streaming if its not started. – Tarun Seera May 23 '14 at 07:23
 - 
                    Please read http://stackoverflow.com/questions/3600409/iphone-radio-streaming-for-wma-audio-files and http://stackoverflow.com/questions/21903789/add-ffmpeg-library-in-ios – iPatel May 23 '14 at 08:21
 - 
                    I have verified the video format is not .wma.This is a real time streaming the feed data came form camera and we access it from server – Tarun Seera May 23 '14 at 08:40
 - 
                    I am using TCP as rtsp_transport.Should I use UDP – Tarun Seera May 23 '14 at 09:24