How can I check if the stream is online or not? - dailymotion-api

I know how to test if the stream is online with the API ?
Because I want to put a Red circle in my menu if the the stream is online !
Can you help me ?

I guess you speak of a live stream ? (your question is not very detailed !)
Then you can check the onairĀ field that will tell you this: the value is true if the live stream is broadcasting and watchable in the player.

Related

Youtube encoder won't start for live streams

I'm trying to get a livestream working on youtube. I want to stream 360Ā° content with H264 video and AAC audio. The stream is started with the youtube live api from my mobile app and librtmp is used to deliver video and audio packets. I easily get to the point where the livestream health is good and my broadcast and stream are bound successfully.
However, when I try to transition to "testing" like this:
YoutubeManager.this.youtube.liveBroadcasts().transition("testing", liveBroadcast.getId(), "status").execute();
I get stuck on the "startTesting" status every time (100% reproducible) while I expect it to change to testing after few seconds to allow me to change it to live.
I don't know what's going on as in the youtube live control room everything seems to be fine but the encoder won't start.
Is it a common issue? Is there a mean to access the encoder logs? If you need more information feel free to ask me.
Regards.
I found a temporary fix !
I noticed 2 things :
When the autostart option was on, the stream changed its state to startLive as soon as I stopped sending data. It suggested that the encoder was trying to start but it was too slow to do it before some other data paket was received (I guess)
When I tried to stream to the "Stream now" URL, as #noogui suggested, it worked ! So I checked out what was the difference in the stream now & event configurations.
It turned out I just had to activate the low latency option as it's done by default in the stream now configuration.
I consider it as a temporary fix because I don't really know why the encoder isn't starting otherwise and because it doesn't work with the autostart option... So I hope it wont break again if Youtube does another change on their encoder.
So, if you have to work with the Youtube api, good luck guys !

Send second source of audio to remote participant

I'm trying to send a second source of audio (streamed from a bluetooth connected device as Int16 data flow) to a room using twilio-video on iOS.
I already looked at TVIAudioController but found nothing about audioInput.
Checked-out also TVIAudioSink but I don't know if it can do the job.
Anyone can help ?
Twilio developer evangelist here.
I'm not an expert in this at all, but since no-one else has helped yet, I can try to point you in the right direction. It sounds like you're trying to hack around the limitation of using one microphone on an iOS device at a time. Good luck!
In order to send another audio track, you need to create a TVILocalAudioTrack. Normally this is initialised using the track method, which picks the audio input itself. It's not recommended to use the regular initializer, but that is probably worth exploring.
Once you have your TVILocalAudioTrack you need to add it to your room Participant using addAudioTrack.
Let me know if that helps at all.

mp4 pseudo-streaming implementation server & iOS side

I'm trying to learn how to do pseudo streaming for MP4 files. I can't think of a good way to do it, but I just found a great example app has similar implementation (except I don't understand how it does it yet)
Here's the scenario:
Alice can send a video to Bob in the app
Bob can open it immediately and see Alice's video, from beginning, while Alice is still recording it
Also, Bob can choose to view the video later after Alice finished recording. But Bob should be able to view the video instantly without waiting too much time, even when the whole size of the video is large.
Thus, my hunch is, it's using some sort of pseudo streaming for mp4.
Here's the screenshots of the requests Alice's phone makes while using the example app:
The screenshot suggests, the example app is making an array of PATCH requests to their server, every 0.x seconds. And finally, the very last request will make a PATCH to update the moov information for this MP4.
Thus my question is, how is this implemented (any educated guess will be welcomed)? Or is there any sort of existing protocol/iOS encoder that I didn't know is doing this already?
Thanks a lot!
Reading the text of your question rather than the title, I think there are a number of likely steps:
Alice is recording video
She is ending the video to a streaming server
Alice notifies Bob that the stream is available and sends the URL on the streaming server that Bob can access to retrieve the stream
Bob's video client requests the stream, using range request to download it chunk by chunk
Have a server in the middle like this is a typical approach for any stream which may have more than one client watching it.
More sophisticated streaming servers may also support delivery the stream in different bit rates and even encoded with different codecs for maximum device reach.
There are commercial (e.g. https://www.wowza.com) and open source streaming servers (e.g. https://gstreamer.freedesktop.org) you can look at to get more info on streaming servers and to see some examples.

How can i get the size of dailymotion videos?

I want to save data traffic during the time that user is watching dailymotion video. Is anyone having an idea? Thanks in advance
This info is not available in the API. Note that the data used will depend on the video quality (1080px, 720px, 480px, etc), and that may vary from a user to another, depending on their device, bandwidth, etc. It is automatically chosen by the video player but the user can also decide to specify a quality.
You will see all available fields for a video object in the documentation at: https://developer.dailymotion.com/api#video-fields
Just make a getimagesize of the thumbnail_url !

Flash Media Server, HLS and FLV

I use RTMP to stream from my iPhone to my server with FMS. I followed some tutorials and now I have the flv playback file in /webroot/live_recorded.
What i want to do is the following.
1) Stream from iPhone to server using RTMP : DONE
2) Stream back to iPhone using HLS : I don't understand the docs and i read hundreds of threafds but none helped me. I would like the user to read the stream from the beginning, as it is stored on my server. Thanks
i'm actually not about FMS.. i work with Wowza and i suppose you'll need something like nDVR feature or have someone write special module for you that will split live stream into small recordings, and so you'll need to play playlist of such recorded files from your iPhone.
hopefully someone will recommend true solution, not just some assumptions :)

Resources