Skip to content
This repository has been archived by the owner on Apr 13, 2022. It is now read-only.

Support for multiple pipelines? #50

Closed
taschmidt opened this issue Aug 12, 2021 · 12 comments
Closed

Support for multiple pipelines? #50

taschmidt opened this issue Aug 12, 2021 · 12 comments

Comments

@taschmidt
Copy link
Contributor

We had this solution working until we tried to go to prod where we have MediaLive channels with multiple pipelines. We hacked the HLS output to just go straight to the MediaPackage input #2 (unlike the first one which goes through CloudFront to MP input #1). That appeared to work until we tried failing over from input #1 to #2. When we shut off streaming to input #1 it didn't fail over like we expected it would (and what it does when just streaming right to MediaPackage like we used to). Any ideas on how to handle this situation?

@eggoynes
Copy link
Contributor

eggoynes commented Aug 12, 2021

Hi @taschmidt

Glad to hear from you. Shoot me an email, I would be happy to jump on a Video Call with you. My email is just my GitHub username + amazon.com

Just read through your post about putting this into production with dual pipeline MediaLive with MediaPackage. I think I know exactly what setting you have to change. Since this project is setup for the Single Pipeline AWS MediaLive this setting is not set.

What you have to set to make failover work normally is in the AWS MediaLive make sure on the HLS output Pause Output is set for HLS segments when Input video loss occurs.
image

@taschmidt
Copy link
Contributor Author

Cool, thanks @eggoynes. We'll test that out early next week and let you know!

@taschmidt
Copy link
Contributor Author

So we encountered some problems with this solution. If our editors switch off the stream before the scheduled end of the event, it causes the MediaPackage harvest job to fail because we use those same timecodes in the harvest jobs. Any ideas there?

@eggoynes
Copy link
Contributor

I send a message over to the MediaPackage team. I should hear back soon about procedure harvesting jobs if the MediaLive event ends before the scheduled time.

@eggoynes
Copy link
Contributor

eggoynes commented Aug 30, 2021

Hi Tim. Can you send me an email with your MediaLive channel ARN, and when you started the event? We can look at the logs to see exactly when the event was stopped. MediaPackage has ingressbytes that can give an approximate end to the event looking in CloudWatch, but that may be a few minutes off.

@taschmidt
Copy link
Contributor Author

Yep, the ARN for the MediaPackage channel is arn:aws:mediapackage:us-east-1:326613286907:channels/2bfc9941b02d4515b920163749979c58.

I was incorrect in my previous message, the MediaPackage harvest job did succeed but we ended up with an invalid m3u8 file. See the generated manifest here. Notice it doesn't end with a #EXT-X-ENDLIST tag like the manifest from our previous job here.

@eggoynes
Copy link
Contributor

Hi @taschmidt
Try making the harvest job again, and use the time that the harvest job ends as the ending timecode.

The manifest that is generated gets to this point. I am thinking that maybe if the timecode at this point is chosen as the end-time then the #EXT-X-ENDLIST tag will show up. I have not made VOD harvest enough to know for sure.
index_20_60958.ts

@eggoynes
Copy link
Contributor

eggoynes commented Sep 2, 2021

Hi @taschmidt

Just to follow up again. A MediaPackage engineer got back to me. They said that if a time is chosen past when the MediaPackage has ended the #EXT-X-ENDLIST is not included. It looks like a caveat of the MediaPackage service.

"If the end time of a harvest is beyond what is in EMP, you do not get an end tag."

@taschmidt
Copy link
Contributor Author

I confirmed with a coworker (I was out of town when this event ran) that adjusting the harvest job end time to within the stream does in fact add the #EXT-X-ENDLIST tag to end of the file. The problem is, we can't guarantee our journalists will always keep the stream running until the scheduled end time. And when that tag isn't present in the m3u8 file, our video player (based on hls.js) will assume it's a live stream and jump to the end which is obviously undesirable. Why would MediaPackage NOT append that end tag upon completion of a harvest job? It would be nice to at least have a parameter option to tell it to do that.

@eggoynes
Copy link
Contributor

eggoynes commented Sep 2, 2021

That makes sense. I asked if a feature such as this in on the MediaPackage roadmap. If you reach out to your TAM they have more power than I to get new features into the product. I have asked if they have a workaround to add in #EXT-X-ENDLIST.

I was looking to see if there is a way to add it in after the fact, I have emailed them asking that as well.

@taschmidt
Copy link
Contributor Author

FYI, I did do what you suggested and reached out to our TAM who requested the feature from the MediaPackage team.

@eggoynes
Copy link
Contributor

eggoynes commented Sep 10, 2021

That is great to hear @taschmidt

This feature will benefit many AWS MediaPackage customers. It makes sense that an #EXT-X-ENDLIST should be added to all VOD assets. Especially when players use that to play back in VOD mode.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants