Я генерирую видео с помощью библиотеки удаления. Мы можем объединить видео и текст и генерировать новое видео. Раньше я размещал текст внизу видео и генерировал видео.
Scenario 1:
Когда я использую видео с аудио, тогда новое видео не генерирует должным образом, новое видео имеет проблему качества звука. Pfa. < /P>
Сценарий 2:
Когда я использую видео без аудио, затем объединяю его с аудио и текстом, затем новое видео работает нормально. < /P>
import { renderMediaOnLambda} from '@remotion/lambda/client';
const { renderId, bucketName } = await renderMediaOnLambda({
region: "us-east-1",
functionName: config.lambdaFunction,
serveUrl: config.serverUrl,
composition: composition,
inputProps: jsonData,
codec: "h264",
audioCodec:"mp3",
audioBitrate:"1M",
videoBitrate:"1M",
outName: {
bucketName: config.bucket,
key: outputFileName,
},
imageFormat: "jpeg",
maxRetries: 1,
framesPerLambda: 1000,
privacy: "public",
});
// Example 2:Actual data
const jsonData = {
"design": {
"id": "BlrKj0qKg1PX7vfx",
"size": {
"width": 1080,
"height": 1920
},
"fps": 30,
"tracks": [
{
"id": "k9aar-Jm6RQoPT3Yvyk3C",
"accepts": [
"text",
"image",
"video",
"audio",
"composition",
"caption",
"template",
"customTrack",
"customTrack2",
"illustration",
"custom",
"main",
"shape",
"linealAudioBars",
"radialAudioBars",
"progressFrame",
"progressBar",
"rect",
"progressSquare"
],
"type": "text",
"items": [
"UyDpqx4ZxJY0CRsV"
],
"magnetic": false,
"static": false
},
{
"id": "tl2rFnfH3Mn2kRWKkC_88",
"accepts": [
"text",
"image",
"video",
"audio",
"composition",
"caption",
"template",
"customTrack",
"customTrack2",
"illustration",
"custom",
"main",
"shape",
"linealAudioBars",
"radialAudioBars",
"progressFrame",
"progressBar",
"rect",
"progressSquare"
],
"type": "video",
"items": [
"H5HD31deQOSTyVlo"
],
"magnetic": false,
"static": false
}
],
"trackItemIds": [
"H5HD31deQOSTyVlo",
"UyDpqx4ZxJY0CRsV"
],
"trackItemsMap": {
"H5HD31deQOSTyVlo": {
"id": "H5HD31deQOSTyVlo",
"details": {
"width": 960,
"height": 960,
"opacity": 100,
"src": "https://v3.fal.media/files/monkey/xbAZ2 ... _video.mp4",
"volume": 100,
"borderRadius": 0,
"borderWidth": 0,
"borderColor": "#000000",
"boxShadow": {
"color": "#000000",
"x": 0,
"y": 0,
"blur": 0
},
"top": "480px",
"left": "60px",
"transform": "scale(1.125)",
"blur": 0,
"brightness": 100,
"flipX": false,
"flipY": false,
"rotate": "0deg",
"visibility": "visible"
},
"metadata": {
"previewUrl": "https://remotionlambda-useast1-myb.amaz ... roup-1.png"
},
"trim": {
"from": 0,
"to": 5015.011
},
"type": "video",
"name": "video",
"playbackRate": 1,
"display": {
"from": 0,
"to": 5015.011
},
"duration": 5015.011,
"isMain": false
},
"UyDpqx4ZxJY0CRsV": {
"id": "UyDpqx4ZxJY0CRsV",
"name": "text",
"type": "text",
"display": {
"from": 0,
"to": 5000
},
"details": {
"text": "Heading and some body",
"fontSize": 120,
"width": 600,
"fontUrl": "https://fonts.gstatic.com/s/roboto/v29/ ... IsDqlA.ttf",
"fontFamily": "Roboto-Bold",
"color": "#ffffff",
"wordWrap": "break-word",
"textAlign": "center",
"borderWidth": 0,
"borderColor": "#000000",
"boxShadow": {
"color": "#ffffff",
"x": 0,
"y": 0,
"blur": 0
},
"fontWeight": "normal",
"fontStyle": "normal",
"textDecoration": "none",
"lineHeight": "normal",
"letterSpacing": "normal",
"wordSpacing": "normal",
"backgroundColor": "transparent",
"border": "none",
"textShadow": "none",
"opacity": 100,
"wordBreak": "normal",
"WebkitTextStrokeColor": "#ffffff",
"WebkitTextStrokeWidth": "0px",
"top": "748.5px",
"left": "240px",
"textTransform": "none",
"transform": "none",
"skewX": 0,
"skewY": 0,
"height": 423
},
"metadata": {},
"isMain": false
}
},
"transitionIds": [],
"transitionsMap": {},
"scale": {
"index": 7,
"unit": 300,
"zoom": 0.0033333333333333335,
"segments": 5
},
"duration": 5015.011,
"activeIds": [
"H5HD31deQOSTyVlo"
],
"structure": [],
"background": {
"type": "color",
"value": "transparent"
}
},
"options": {
"fps": 30,
"size": {
"width": 1080,
"height": 1920
},
"format": "mp4"
}
};
const inputJSON = {"region":"us-east-1","functionName":"remotion-render-myfunc-240sec","serveUrl":"https://remotionlambda-useast1-mybucket ... y":"public"};
const { renderId, bucketName } = await renderMediaOnLambda(inputJSON);
url видео: https://v3.fal.media/files/monkey/xbaz2 ... video.mp4r
Подробнее здесь: https://stackoverflow.com/questions/797 ... lity-issue
В видео с удалением есть проблема с качеством звука ⇐ Javascript
Форум по Javascript
-
Anonymous
1757685865
Anonymous
Я генерирую видео с помощью библиотеки удаления. Мы можем объединить видео и текст и генерировать новое видео. Раньше я размещал текст внизу видео и генерировал видео.
Scenario 1:
Когда я использую видео с аудио, тогда новое видео не генерирует должным образом, новое видео имеет проблему качества звука. Pfa. < /P>
Сценарий 2:
Когда я использую видео без аудио, затем объединяю его с аудио и текстом, затем новое видео работает нормально. < /P>
import { renderMediaOnLambda} from '@remotion/lambda/client';
const { renderId, bucketName } = await renderMediaOnLambda({
region: "us-east-1",
functionName: config.lambdaFunction,
serveUrl: config.serverUrl,
composition: composition,
inputProps: jsonData,
codec: "h264",
audioCodec:"mp3",
audioBitrate:"1M",
videoBitrate:"1M",
outName: {
bucketName: config.bucket,
key: outputFileName,
},
imageFormat: "jpeg",
maxRetries: 1,
framesPerLambda: 1000,
privacy: "public",
});
// Example 2:Actual data
const jsonData = {
"design": {
"id": "BlrKj0qKg1PX7vfx",
"size": {
"width": 1080,
"height": 1920
},
"fps": 30,
"tracks": [
{
"id": "k9aar-Jm6RQoPT3Yvyk3C",
"accepts": [
"text",
"image",
"video",
"audio",
"composition",
"caption",
"template",
"customTrack",
"customTrack2",
"illustration",
"custom",
"main",
"shape",
"linealAudioBars",
"radialAudioBars",
"progressFrame",
"progressBar",
"rect",
"progressSquare"
],
"type": "text",
"items": [
"UyDpqx4ZxJY0CRsV"
],
"magnetic": false,
"static": false
},
{
"id": "tl2rFnfH3Mn2kRWKkC_88",
"accepts": [
"text",
"image",
"video",
"audio",
"composition",
"caption",
"template",
"customTrack",
"customTrack2",
"illustration",
"custom",
"main",
"shape",
"linealAudioBars",
"radialAudioBars",
"progressFrame",
"progressBar",
"rect",
"progressSquare"
],
"type": "video",
"items": [
"H5HD31deQOSTyVlo"
],
"magnetic": false,
"static": false
}
],
"trackItemIds": [
"H5HD31deQOSTyVlo",
"UyDpqx4ZxJY0CRsV"
],
"trackItemsMap": {
"H5HD31deQOSTyVlo": {
"id": "H5HD31deQOSTyVlo",
"details": {
"width": 960,
"height": 960,
"opacity": 100,
"src": "https://v3.fal.media/files/monkey/xbAZ2BQi73CF7Gkv6hnAF_6z6-Lkg6MeICe-cIXwqMs_video.mp4",
"volume": 100,
"borderRadius": 0,
"borderWidth": 0,
"borderColor": "#000000",
"boxShadow": {
"color": "#000000",
"x": 0,
"y": 0,
"blur": 0
},
"top": "480px",
"left": "60px",
"transform": "scale(1.125)",
"blur": 0,
"brightness": 100,
"flipX": false,
"flipY": false,
"rotate": "0deg",
"visibility": "visible"
},
"metadata": {
"previewUrl": "https://remotionlambda-useast1-myb.amazonaws.com/demo-assets/group-1.png"
},
"trim": {
"from": 0,
"to": 5015.011
},
"type": "video",
"name": "video",
"playbackRate": 1,
"display": {
"from": 0,
"to": 5015.011
},
"duration": 5015.011,
"isMain": false
},
"UyDpqx4ZxJY0CRsV": {
"id": "UyDpqx4ZxJY0CRsV",
"name": "text",
"type": "text",
"display": {
"from": 0,
"to": 5000
},
"details": {
"text": "Heading and some body",
"fontSize": 120,
"width": 600,
"fontUrl": "https://fonts.gstatic.com/s/roboto/v29/KFOlCnqEu92Fr1MmWUlvAx05IsDqlA.ttf",
"fontFamily": "Roboto-Bold",
"color": "#ffffff",
"wordWrap": "break-word",
"textAlign": "center",
"borderWidth": 0,
"borderColor": "#000000",
"boxShadow": {
"color": "#ffffff",
"x": 0,
"y": 0,
"blur": 0
},
"fontWeight": "normal",
"fontStyle": "normal",
"textDecoration": "none",
"lineHeight": "normal",
"letterSpacing": "normal",
"wordSpacing": "normal",
"backgroundColor": "transparent",
"border": "none",
"textShadow": "none",
"opacity": 100,
"wordBreak": "normal",
"WebkitTextStrokeColor": "#ffffff",
"WebkitTextStrokeWidth": "0px",
"top": "748.5px",
"left": "240px",
"textTransform": "none",
"transform": "none",
"skewX": 0,
"skewY": 0,
"height": 423
},
"metadata": {},
"isMain": false
}
},
"transitionIds": [],
"transitionsMap": {},
"scale": {
"index": 7,
"unit": 300,
"zoom": 0.0033333333333333335,
"segments": 5
},
"duration": 5015.011,
"activeIds": [
"H5HD31deQOSTyVlo"
],
"structure": [],
"background": {
"type": "color",
"value": "transparent"
}
},
"options": {
"fps": 30,
"size": {
"width": 1080,
"height": 1920
},
"format": "mp4"
}
};
const inputJSON = {"region":"us-east-1","functionName":"remotion-render-myfunc-240sec","serveUrl":"https://remotionlambda-useast1-mybucket.s3.us-east-1.amazonaws.com/sites/dev/index.html","composition":"RenderVideo","inputProps":jsonData,"codec":"h264","audioCodec":"mp3","audioBitrate":"1M","videoBitrate":"1M","outName":{"bucketName":"remotionlambda-useast1-3rne5v73bs","key":"demo-vid-9169.mp4"},"imageFormat":"jpeg","maxRetries":1,"framesPerLambda":1000,"privacy":"public"};
const { renderId, bucketName } = await renderMediaOnLambda(inputJSON);
url видео: https://v3.fal.media/files/monkey/xbaz2bqi73cf7gkv6hnaf_6z6-lkg6mece-cixwqms_video.mp4r
Подробнее здесь: [url]https://stackoverflow.com/questions/79763041/remotion-video-has-audio-quality-issue[/url]
Ответить
1 сообщение
• Страница 1 из 1
Перейти
- Кемерово-IT
- ↳ Javascript
- ↳ C#
- ↳ JAVA
- ↳ Elasticsearch aggregation
- ↳ Python
- ↳ Php
- ↳ Android
- ↳ Html
- ↳ Jquery
- ↳ C++
- ↳ IOS
- ↳ CSS
- ↳ Excel
- ↳ Linux
- ↳ Apache
- ↳ MySql
- Детский мир
- Для души
- ↳ Музыкальные инструменты даром
- ↳ Печатная продукция даром
- Внешняя красота и здоровье
- ↳ Одежда и обувь для взрослых даром
- ↳ Товары для здоровья
- ↳ Физкультура и спорт
- Техника - даром!
- ↳ Автомобилистам
- ↳ Компьютерная техника
- ↳ Плиты: газовые и электрические
- ↳ Холодильники
- ↳ Стиральные машины
- ↳ Телевизоры
- ↳ Телефоны, смартфоны, плашеты
- ↳ Швейные машинки
- ↳ Прочая электроника и техника
- ↳ Фототехника
- Ремонт и интерьер
- ↳ Стройматериалы, инструмент
- ↳ Мебель и предметы интерьера даром
- ↳ Cантехника
- Другие темы
- ↳ Разное даром
- ↳ Давай меняться!
- ↳ Отдам\возьму за копеечку
- ↳ Работа и подработка в Кемерове
- ↳ Давай с тобой поговорим...
Мобильная версия