ExoMedia icon indicating copy to clipboard operation
ExoMedia copied to clipboard

Live video issue

Open brian2694 opened this issue 8 years ago • 13 comments

I'm trying to play a live video, but plays the previous four minutes, it's not playing live.

I just upgraded from the 3.1.0 to the 4.0.2 library and now it does not actually play live. Before if I could do it.

  • [ ] I have verified there are no duplicate active or recent bugs, questions, or requests
Include the following:
  • ExoMedia version: 4.0.2
  • Device OS version: 7.0
  • Devide Manufacturer: Motorola
  • Device Name: Moto G4 plus
Reproduction Steps
Expected Result
Actual Result

brian2694 avatar Jul 12 '17 03:07 brian2694

Sorry for my english

brian2694 avatar Jul 12 '17 03:07 brian2694

This depends on what type of stream you are using (MPD, HLS, SS, etc.); but for the most part nothing major was changed in the live handling functionality or buffering that would affect you this much. Before we can really help though we will need reproduction steps, which should include information such as the stream type, and if possible an example URI.

brianwernick avatar Jul 12 '17 14:07 brianwernick

Thanks for your reply.

Well, I am testing with the last demo, I put the link in the samples. This is the URI

http://a3live-lh.akamaihd.net/i/mghds/geomega_1@328914/index_3_av-b.m3u8?sd=10&rebase=on

It is worth clarifying that in the previous library I did not have to add additional parameters, the player interpreted that it was streaming live

brian2694 avatar Jul 12 '17 14:07 brian2694

So after trying it out it sounds like this is what you are seeing: The VideoControls show a duration of ~4 to 5 minutes, however the playback starts at the beginning instead of near the end; is this correct?

That being the case there are two things that need to be handled in ExoMedia

  1. Determining if the video is live streaming in the VideoControls (correlated to #454) for the duration display
  2. If the stream is live start near the end (I say near because we want to be able to play some media before the next manifest sync)

brianwernick avatar Jul 12 '17 15:07 brianwernick

Yes this is correct, starts at the beginning.

My question: is there any method in your library to do that? Or should I do something in the exoplayer library?

brian2694 avatar Jul 12 '17 15:07 brian2694

Well, once the video loads you can seek to near the end; and if you want it to look correct in the controls you can extend the VideoControlsMobile to display the live information instead of the ~4 minutes

brianwernick avatar Jul 12 '17 15:07 brianwernick

playlistManager.play(260000, false);

This method worked for me. Now I have to extend the VideoControlsMobile to display the live information.

Thanks Brian.

brian2694 avatar Jul 12 '17 16:07 brian2694

Hello again.

playlistManager.play(260000, false) works for my when the streaming segment is aprox. 4 minutes, but i've tried with another uri and its chunk is aprox 30 seconds and this uri doesn't start to play.

I'm thinking back to version 3.1.0 that worked perfect for me

brian2694 avatar Jul 13 '17 02:07 brian2694

i am also having the same problem. is there any way to make the video start as live?

firofame avatar Jul 26 '17 12:07 firofame

I have the same problem. any way tio fixed this as temporary?

vikranz avatar Sep 28 '17 06:09 vikranz

I switched to ExoPlayer.

firofame avatar Sep 28 '17 09:09 firofame

I'm also facing live streaming issue. It plays for 1-2 minutes and then it throws error. If i use default controls then seekbar values are totally wrong. Is it possible to hide seekbar and keep play/pause button for live streaming?

This is the stream URL(shortened URL) https://goo.gl/xE83ZB

meet2011 avatar Apr 21 '18 07:04 meet2011

Looking in to this now and it looks like there are 2 types of "live" videos, only 1 of which we (partially) handle currently. These 2 different types are:

  1. A live stream where the available media at both the start and end of the stream is constantly changing (e.g. a CCTV camera that is caching 2 minutes of video)
  2. An "event" stream where the available media is growing at the end of the stream (e.g. streaming the Google I/O keynote)

Currently ExoMedia is only, partially, handling the 2nd case so I'm reviewing what work will be necessary to support both cases but from what I can tell the ExoPlayer really only exposes if the stream is live/dynamic and not which case it is.

brianwernick avatar Aug 28 '22 18:08 brianwernick