Cannot play mp4 input in AWS MediaLive - amazon-web-services

I'm using AWS Media Live for live streaming (together with AWS Media Store). My streaming flow works well but for some reason I cannot broadcast mp4 file as a filler. All seems to be ok, I cannot find also anything bad in MediaLive logs but all I can see in the player is black screen.
What I've checked:
MP4 source file is encoded with H.264
My input class is SINGLE_INPUT
My s3 URL for input is s3://assets/streaming/fill.mp4
Inside channel Input codec is AVC
The input is attached to channel
Could you help on resolving this? Streaming input works like a charm but I don't know why black screen happens when changing input to MP4 file.

Based on the description of the problem that you are facing, it looks like permissions issue with you s3/mediastore mp4 asset. Can you please make sure you have provided adequate access so the MediaLive can access the asset.
Please analyze the Alerts tab on the MediaLive channel for any 403 errors accessing the mp4 file.
Please review the following article for How to setup MP4 sources for MediaLive Channels:
https://docs.aws.amazon.com/medialive/latest/ug/mp4-upstream.html
Thank you,
Hussain

Related

AWS Transcribe is not recognizing the media format of my file correctly

I'm using a lambda function to receive a bytes array of audio data, save it as mp3, store it in S3, and then use the S3 object to start a Transcribe job.
Everything's been processed correctly. I can see the .mp3 file in S3. I've also downloaded it to my local machine and played it, and it plays correctly as mp3.
However, when I start the transcription job I get back an error:
The media format that you specified doesn't match the detected media format. Check the media format and try your request again.
This is my call to start the AWS Transcribe job:
transcribe.start_transcription_job(
TranscriptionJobName=job_name,
Media={'MediaFileUri': job_uri},
MediaFormat='mp3',
LanguageCode='en-US'
)
Any idea what may be causing this?
Cheers!
mp3 requires compression, if you just save byte array, then it's not in .mp3 format. You can use soxi to validate audio files: http://sox.sourceforge.net/soxi.html

Portrait video converted to Landscape in AWS Elemental Mediaconvert

I'm using AWS 'Elemental MediaConvert' service to get the HLS format of the uploaded video. We are using this as Video-On-Demand service. Everything works fine. Video that is been uploaded in 's3-input' bucket will taken by lambda service and processed by boto3 elemental mediaconvert client. Out of the video will be stored in 's3-output' bucket. One problem is Portrait videos are appearing in Landscape mode in 's3-output' bucket and also when HLS url is played in mobile/browser.
Make sure you use the latest version of boto3 if you use it at all. Anyways
Add "Rotate": "AUTO" to VideoSelector in inputs. In this case, EMC will try to automatically rotate the video based on metadata if it's available.
These links were really useful for me:
List https://www.mandsconsulting.com/lambda-functions-with-newer-version-of-boto3-than-available-by-default/
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/mediaconvert.html
Well... In your place here is what I'd do... I'll go to the last "job"... Go to the "output" section. Then go to the output formats sub-sections... and set the size of the desired output Manually.
I don't think Elemental MediaConvert has presets for vertical video. It's a pretty new (awesome) product.
Good luck!

AWS Elemental Media Converter

I am using AWS Elemental Media Converter to convert mp4 video from s3 bucket to m3u8 format. I have created custom output preset but I cannot see them while creating the job. Where is my custom presets how can i select them?
I figured out on my own. It appears to me that it was some glitch because somehow I cannot see them may be the list did not get refreshed or updated but today the preset list got updated and i can see my custom presets.

Video Streaming: MPEG-DASH , AWS cloudfront, dash.js

I am creating a video streaming application hosted on AWS. I have got mp4 which are hosted on AWS S3. To stream video files, I want to transcode mp4 to MPEG-DASH (mpd) format and store in a different AWS S3 bucket. I will be AWS cloudfront to stream above transcoded mpd files and use dash.js or videogular to stream on client side.
The problem I am facing is here how to transcode mp4 to mpd.(without using AWS transcoder, bit expensive). I was thinking to leverage AWS Lambda to listen the source S3 bucket and output to a different S3 bucket. But could not find a module to transcode programmatically(to convert it to Lambda function). Has anyone done it yet and would like to give some insight?
An mpd file is actually just a text based index file - it contains URLs to the video and audio steams but no media itself.
The media for MPEG DASH is stored in segments, for mp4 in a fragmented mp4 format.
If you want to create fragmented mp4 from mp4 yourself, then there are some tools which you can look at to do this, or even use as part of a batch process.
One example is mp4Dash (https://www.bento4.com/documentation/mp4dash/). You can see examples here on this link to convert a single mp4 file, or to convert multiple bit rate versions of a single file, which is more typical when using DASH for Adaptve Bit Rate Streaming (ABR - allows the client choose the bit rate of the next segment to download depending on the current network conditions):
Single MP4 input file
mp4dash video.mp4
Multi-bitrate set of MP4 files
mp4dash video_1000.mp4 video_2000.mp4 video_3000.mp4
Another example is mp4Box: https://gpac.wp.imt.fr/mp4box/dash/
Its worth nothing that there are actually multiple ways to stream DASH in AWS - Elastic Transcode can create MPEG DASH stream which you can stored and stream from S3, you can use cloud front and services like Unified Streaming or Wowza etc. Streaming is complicated so if this is for a high volume important service it may be worth looking at these and seeing if there is an option or combination which meets your needs without being too expensive.

Artifacts on video transcoded from GIF by Elastic Transcoder

I'm trying to transcode GIF to MP4 with H.264 inside using AWS Elastic Transcoder. I noticed strange color artifacts on transcoded video: color stripes on the right.
Original GIF:
Transcoded video screenshot:
I've tried to change settings, even changed output format to WEBM+VP8: same result. My local ffmpeg has no such issue, so I think there is something on ET side.
My MP4 settings, if what:
Do you have any ideas?
The width of the image is 381, an odd number that might be getting mishandled during re-scaling.
Try cropping off one pixel on the right to make the image 380x150.