gpt4 book ai didi

ffmpeg - concat视频太长ffmpeg

转载 作者:行者123 更新时间:2023-12-04 23:33:45 25 4
gpt4 key购买 nike

我和这个人 After merge videos, the duration is too long - ffmpeg 有类似的问题,但我不知道如何制作相同格式的视频
1个视频:

>     Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'outputhigh.mp4':   Metadata:
> major_brand : isom
> minor_version : 512
> compatible_brands: isomiso2avc1mp41
> encoder : Lavf58.10.100 Duration: 00:03:14.96, start: 0.000000, bitrate: 110 kb/s
> Stream #0:0(und): Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661), y uvj444p(pc), 816x456 [SAR 1:1 DAR 34:19], 108 kb/s, 25
> fps, 25 tbr, 12800 tbn, 5 0 tbc (default)
> Metadata:
> handler_name : VideoHandler

2个视频:
>  Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'fireplace.mp4':   Metadata:
> major_brand : mp42
> minor_version : 0
> compatible_brands: isommp42
> creation_time : 2018-12-11T15:34:07.000000Z Duration: 00:17:45.00, start: 0.000000, bitrate: 1632 kb/s
> Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709) , 1280x720 [SAR 1:1 DAR 16:9], 1499 kb/s, 29.97
> fps, 29.97 tbr, 30k tbn, 59.94 t bc (default)
> Metadata:
> creation_time : 2018-12-11T15:34:07.000000Z
> handler_name : ISO Media file produced by Google Inc. Created on: 12/11 /2018.
> Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, flt p, 128 kb/s (default)
> Metadata:
> creation_time : 2018-12-11T15:34:07.000000Z
> handler_name : ISO Media file produced by Google Inc. Created on: 12/11 /2018.

最佳答案

所有段必须具有相同的参数。符合 outputhigh.mp4参数到fireplace.mp4 :

ffmpeg -i outputhigh.mp4 -f lavfi -i anullsrc=sample_rate=44100:channel_layout=stereo -filter_complex "[0:v]scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:(ow-iw)/2:(oh-ih)/2,setsar=1,format=yuv420p,fps=30000/1001[v]" -map "[v]" -map 1:a -c:v libx264 -profile:v main -c:a aac -video_track_timescale 30k -shortest outputhigh2.mp4

制作 inputs.txt :
file "outputhigh2.mp4"
file "fireplace.mp4"

然后连接:
ffmpeg -f concat -i input.txt -c copy output.mp4

关于ffmpeg - concat视频太长ffmpeg,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55201961/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com