Comments (4)
Currently WebRTC is not a supported protocol. For that you need to use something like Kinesis video with WebRTC.
https://docs.aws.amazon.com/kinesisvideostreams-webrtc-dg/latest/devguide/what-is-kvswebrtc.html
from amplify-video.
Hey @subhendukundu,
You can do this but you will need to make some changes to the existing code. You need to do 2 things.
- Create a new S3 event listening for .mp3 files which gets sent to the inputLambda function.
- Reference another Mediaconvert Job Template configured with a filegroup output. (you can do this by referencing the template when configuring the amplify resource).
Here are the steps you can take in order to achieve an audio pipeline.
- Navigate to the Mediaconvert service page and select job templates.
- You will need a to create a new job template. Reference the below doc link on how to create audio only outputs.
- https://docs.aws.amazon.com/mediaconvert/latest/ug/setting-up-audio-only.html
- If you need help making this I can show you an example of the JSON i have used before for mp3 to HLS transcoding.
- Initialize an amplify environment with
amplify init
. - Next,
amplify video add
and select Video on Demand. - For the question
Select a system-provided encoding template, specify an already-created template name
chooseBring your own template
and specify the name of the audio MediaConvert template you created previously. - Continue configuring the resource as you would normally.
- Once the prompt exits, check
amplify status
to see that your resource is configured to be created. - Navigate to
/amplify/backend/video/audio/vod-helpers/LambdaFunctions/SetupTriggerLambda/index.js
and change the listner for 'mp4' to the file extension of your input container. Then save the file.- You can view the list of supported containers here: https://docs.aws.amazon.com/mediaconvert/latest/ug/supported-codecs-containers-audio-only.html
- run
amplify push
and you should be all set.
from amplify-video.
Note you must supply a valid s3 bucket name before importing this template into mediaconvert.
{
"Name": "audio_template",
"Settings": {
"OutputGroups": [
{
"Name": "Apple HLS",
"Outputs": [
{
"ContainerSettings": {
"Container": "M3U8",
"M3u8Settings": {
"AudioFramesPerPes": 4,
"PcrControl": "PCR_EVERY_PES_PACKET",
"PmtPid": 480,
"PrivateMetadataPid": 503,
"ProgramNumber": 1,
"PatInterval": 0,
"PmtInterval": 0,
"Scte35Source": "NONE",
"NielsenId3": "NONE",
"TimedMetadata": "NONE",
"VideoPid": 481,
"AudioPids": [
482,
483,
484,
485,
486,
487,
488,
489,
490,
491,
492
]
}
},
"AudioDescriptions": [
{
"AudioTypeControl": "FOLLOW_INPUT",
"AudioSourceName": "Audio Selector 1",
"CodecSettings": {
"Codec": "AAC",
"AacSettings": {
"AudioDescriptionBroadcasterMix": "NORMAL",
"Bitrate": 96000,
"RateControlMode": "CBR",
"CodecProfile": "LC",
"CodingMode": "CODING_MODE_2_0",
"RawFormat": "NONE",
"SampleRate": 48000,
"Specification": "MPEG4"
}
},
"LanguageCodeControl": "FOLLOW_INPUT"
}
],
"OutputSettings": {
"HlsSettings": {
"AudioGroupId": "program_audio",
"AudioOnlyContainer": "AUTOMATIC",
"IFrameOnlyManifest": "EXCLUDE"
}
},
"NameModifier": "_audio"
}
],
"OutputGroupSettings": {
"Type": "HLS_GROUP_SETTINGS",
"HlsGroupSettings": {
"ManifestDurationFormat": "INTEGER",
"SegmentLength": 10,
"TimedMetadataId3Period": 10,
"CaptionLanguageSetting": "OMIT",
"Destination": "s3://**YOUR-S3-BUCKET**/mp3/",
"TimedMetadataId3Frame": "PRIV",
"CodecSpecification": "RFC_4281",
"OutputSelection": "MANIFESTS_AND_SEGMENTS",
"ProgramDateTimePeriod": 600,
"MinSegmentLength": 0,
"MinFinalSegmentLength": 0,
"DirectoryStructure": "SINGLE_DIRECTORY",
"ProgramDateTime": "EXCLUDE",
"SegmentControl": "SEGMENTED_FILES",
"ManifestCompression": "NONE",
"ClientCache": "ENABLED",
"StreamInfResolution": "INCLUDE"
}
}
}
],
"AdAvailOffset": 0,
"Inputs": [
{
"AudioSelectors": {
"Audio Selector 1": {
"Offset": 0,
"DefaultSelection": "DEFAULT",
"ProgramSelection": 1
}
},
"FilterEnable": "AUTO",
"PsiControl": "USE_PSI",
"FilterStrength": 0,
"DeblockFilter": "DISABLED",
"DenoiseFilter": "DISABLED",
"TimecodeSource": "EMBEDDED"
}
]
},
"AccelerationSettings": {
"Mode": "DISABLED"
},
"StatusUpdateInterval": "SECONDS_60",
"Priority": 0,
"HopDestinations": []
}
from amplify-video.
Thank you so much for the explanations, it does make sense. I will try this out.
One more quick question Would be possible to make Real-Time communication? What I mean is, like if someone else wants to join to the live show, would that be possible?
Something like, rtc network protocol?
from amplify-video.
Related Issues (20)
- Getting 403 Forbidden when trying to upload video to the input s3 bucket as an authenticated user HOT 9
- Output bucket not granting Public Read permission when filename contains spaces HOT 1
- Video player fails to play signed urls HOT 8
- Video object lost when VodAsset json is parsed into VodAsset object HOT 1
- Deployment Failed when Deploying from Admin UI After Adding Amplify Video to Schema HOT 4
- HLS Video with Credentials (signed url) cannot be played on iOS/Safari HOT 11
- Surface Ivs Start/Stop channel events to a SNS queue
- Audio-Only Pipeline Guide in Wiki Fails to Output Audio HLS
- Cannot Add New Environment with Video Plugin
- Can not push to amplify when updating to v3.9.2 HOT 1
- Template error: instance of Fn::GetAtt references undefined resource videoResource HOT 2
- Provide Audio-On-Demand (AOD) option
- Failed compiling GraphQL schema: Your GraphQL Schema is using "@connection" directive from an older version of the GraphQL Transformer. HOT 3
- Adding amplify video with a Signed URL option fails because of permissions (even with an IAM user with Admin access)
- React video code for both Dash and HLS? HOT 1
- `AccessDeniedException` when invoking lambda function to convert video from input to output bucket HOT 1
- amplify video add command not found HOT 1
- Amplify will not Push after adding Video
- Generated GraphQL schema contains @connection HOT 1
- amplify video add (video on demand) no longer working with away amplify updated cli. HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amplify-video.