begeekmyfriend / yasea

RTMP live streaming client for Android
MIT License
4.87k stars 1.32k forks source link

How to live stream to Azure Media Service #651

Open sonhvse61570 opened 6 years ago

sonhvse61570 commented 6 years ago

I'm developing a live stream application. It will upload data to AMS, but when I check AMS channel, I don't find data that is uploaded. Please help me. (I changed only "rtmpUrl" variable in MainActivity).

sonhvse61570 commented 6 years ago

ffmpeg.exe -v verbose -i my-sample-video.mp4 -strict -2 -c:a aac -b:a 128k -ar 44100 -r 30 -g 60 -keyint_min 60 -b:v 400000 -c:v libx264 -preset medium -bufsize 400k -maxrate 400k -f flv {paste_your_Ingest_url}/mystream

sonhvse61570 commented 6 years ago

This is old ingest url: rtmp://smartglasschannel-smartglass1-usct.channel.media.azure.net:1935/live/8b343b553d78453b86a39399993864de

begeekmyfriend commented 6 years ago

Have you got the server specific authentication? Please contact staff of AMS. You may verify it with FFmpeg command.

sonhvse61570 commented 6 years ago

I know that AMS not require Authentication, I only create AMS and channel then get ingest url. After I receive ingest url, I upload data without authentication. Do you have a suggestion for me?

begeekmyfriend commented 6 years ago

I have not used AMS. I think the first thing is to use FFmpeg to verify if it can stream or not. Please contact AMS staff for your requirements.

sonhvse61570 commented 6 years ago

To upload data to AMS in tutorial, We need to use Wirecast, but I found an answer about using FFMpeg to push data to AMS with H.264 video and AAC audio. https://social.msdn.microsoft.com/Forums/azure/en-US/b823cafe-43bc-4c98-9546-06f7c7474c75/azure-media-services-on-android-platform?forum=MediaServices