[英]ffmpeg 4.3 multipart trim issue
I am trying to trim multiparts from single video using ffmpeg 4.3我正在尝试使用 ffmpeg 4.3 从单个视频中修剪多部分
here is the command i used这是我使用的命令
`ffmpeg -i input.mp4 -filter_complex \
"[0:v]trim=start=4:end=22,setpts=PTS-STARTPTS[v0]; \
[0:a]atrim=start=4:end=22,asetpts=PTS-STARTPTS[a0]; \
[0:v]trim=start=26:end=100,setpts=PTS-STARTPTS[v1]; \
[0:a]atrim=start=26:end=100,asetpts=PTS-STARTPTS[a1]; \
[v0][a0][v1][a1]concat=n=2:v=1:a=1[v][a]" \
-map "[v]" -map "[a]" output.mp4`
Getting this error in FFMPEG 4.3 latest在最新的 FFMPEG 4.3 中出现此错误
[mpeg4 @ 0x2b14e80] Invalid pixel aspect ratio 3875/3864, limit is 255/255 reducing
please help if anyone have solution for ffmpeg 4.3如果有人有 ffmpeg 4.3 的解决方案,请帮助
here is the log for the above command, please check这是上述命令的日志,请检查
ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-23)
configuration: --enable-openssl
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: mp42isom
Duration: 00:09:00.67, start: 0.000000, bitrate: 218 kb/s
Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 322x400 [SAR 3875:3864 DAR 155:192], 168 kb/s, 24 fps, 24 tbr, 90k tbn, 48 tbc (default)
Stream #0:1(und): Audio: aac (HE-AAC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 47 kb/s (default)
File 'output.mp4' already exists. Overwrite? [y/N] y
Stream mapping:
Stream #0:0 (h264) -> trim
Stream #0:0 (h264) -> trim
Stream #0:1 (aac) -> atrim
Stream #0:1 (aac) -> atrim
concat:out:v0 -> Stream #0:0 (mpeg4)
concat:out:a0 -> Stream #0:1 (aac)
Press [q] to stop, [?] for help
[mpeg4 @ 0x25c4880] Invalid pixel aspect ratio 3875/3864, limit is 255/255 reducing
Output #0, mp4, to 'output.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: mp42isom
encoder : Lavf58.45.100
Stream #0:0: Video: mpeg4 (mp4v / 0x7634706D), yuv420p, 322x400 [SAR 255:254 DAR 8211:10160], q=2-31, 200 kb/s, SAR 3875:3864 DAR 155:192, 24 fps, 12288 tbn, 24 tbc (default)
Metadata:
encoder : Lavc58.91.100 mpeg4
Side data:
cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
Metadata:
encoder : Lavc58.91.100 aac
frame= 2208 fps=566 q=16.1 Lsize= 3970kB time=00:01:32.01 bitrate= 353.5kbits/s speed=23.6x
video:2480kB audio:1442kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.204748%
[aac @ 0x25d9180] Qavg: 215.673
Your ffmpeg
was not compiled to include support for any H.264 encoders, so it is forced use the encoder named mpeg4 which outputs the old format MPEG-4 Part 2 video.您的
ffmpeg
未编译为包含对任何 H.264 编码器的支持,因此它被迫使用名为mpeg4的编码器,该编码器输出旧格式的 MPEG-4 Part 2 视频。 This is a legacy format which was common before H.264.这是一种在 H.264 之前很常见的传统格式。
Your device/player/app/browser probably doesn't support MPEG-4 Part 2 video.您的设备/播放器/应用程序/浏览器可能不支持 MPEG-4 Part 2 视频。
Output H.264 instead. Output H.264 代替。
Download an already compiled ffmpeg
that has what you need.下载一个已经编译好的
ffmpeg
,它有你需要的东西。 Put it in your PATH
(see FAQ ), or provide the full path to the new ffmpeg
in your script.将它放在您的
PATH
中(请参阅常见问题解答),或在脚本中提供新ffmpeg
的完整路径。
Or re-compile ffmpeg
with --enable-gpl --enable-libx264
.或者使用
--enable-gpl --enable-libx264
ffmpeg
See FFmpeg Wiki: Compile & Install FFmpeg on CentOS/RHEL/Red Hat .请参阅FFmpeg Wiki:在 CentOS/RHEL/Red Hat 上编译和安装 FFmpeg 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.