gpt4 book ai didi

ffmpeg - 对于无法有效支持它的复用器而言,帧速率非常高

转载 作者:行者123 更新时间:2023-12-04 15:23:36 26 4
gpt4 key购买 nike

尝试使用 FFMpeg 运行以下命令时出现错误:

-i "file1.mp4"-s 506x406 -b:v 2000k -ar 22050 "file2.mp4"

FFMpeg 一直在转换这个只有 7Mb .mp4 文件的视频几个小时,最终我不得不终止这个过程。

FFMpeg 的输出错误如下:

Converter Error Message: 
ffmpeg version N-42069-g3233ad4 Copyright (c) 2000-2012 the FFmpeg developers
built on Jun 30 2012 13:18:20 with gcc 4.7.1
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libass --enable-libcelt --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libutvideo --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 51. 63.100 / 51. 63.100
libavcodec 54. 31.100 / 54. 31.100
libavformat 54. 14.100 / 54. 14.100
libavdevice 54. 0.100 / 54. 0.100
libavfilter 3. 0.100 / 3. 0.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'File1.mp4':
Metadata:
major_brand : mp42
minor_version : 1
compatible_brands: mp42mp41
creation_time : 2013-07-18 15:38:11
Duration: 00:02:02.23, start: -7.105889, bitrate: 518 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 718x574 [SAR 64:45 DAR 22976:12915], 361 kb/s, 24.97 fps, 90k tbr, 90k tbn, 180k tbc
Metadata:
creation_time : 2013-07-18 15:38:11
handler_name : Apple Video Media Handler
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 129 kb/s
Metadata:
creation_time : 2013-07-18 15:38:11
handler_name : Apple Sound Media Handler
[graph 0 input from stream 0:0 @ 0259cee0] w:718 h:574 pixfmt:yuv420p tb:1/90000 fr:90000/1 sar:64/45 sws_param:flags=2
[output stream 0:0 @ 0259cda0] No opaque field provided
[scaler for output stream 0:0 @ 0259c0e0] w:718 h:574 fmt:yuv420p sar:64/45 -> w:506 h:406 fmt:yuv420p sar:666304/466785 flags:0x4
**[mp4 @ 02599020] Frame rate very high for a muxer not efficiently supporting it.
Please consider specifying a lower framerate, a different muxer or -vsync 2**
[graph 1 input from stream 0:1 @ 02b88200] tb:1/48000 samplefmt:s16 samplerate:48000 chlayout:0x3
[auto-inserted resampler 0 @ 024e44e0] chl:stereo fmt:s16 r:48000Hz -> chl:stereo fmt:s16 r:22050Hz
[libx264 @ 02407200] using SAR=895/627
[libx264 @ 02407200] MB rate (74880000) > level limit (2073600)
[libx264 @ 02407200] using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
[libx264 @ 02407200] profile High, level 5.2
[libx264 @ 02407200] 264 - core 125 r2200 999b753 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=2000 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'File2.mp4':
Metadata:
major_brand : mp42
minor_version : 1
compatible_brands: mp42mp41
encoder : Lavf54.14.100
Stream #0:0(und): Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 506x406 [SAR 666304:466785 DAR 22976:12915], q=-1--1, 2000 kb/s, 180k tbn, 90k tbc
Metadata:
creation_time : 2013-07-18 15:38:11
handler_name : Apple Video Media Handler
Stream #0:1(und): Audio: aac ([64][0][0][0] / 0x0040), 22050 Hz, stereo, s16, 128 kb/s
Metadata:
creation_time : 2013-07-18 15:38:11
handler_name : Apple Sound Media Handler
Stream mapping:
Stream #0:0 -> #0:0 (h264 -> libx264)
Stream #0:1 -> #0:1 (aac -> libvo_aacenc)
Press [q] to stop, [?] for help
DTS -3600, next:-79995 st:0 invalid dropping
frame= 7201 fps=768 q=69.0 size= 0kB time=00:00:00.00 bitrate= 0.0kbits/s dup=7198 drop=0
frame=10801 fps=575 q=69.0 size= 0kB time=00:00:00.00 bitrate= 0.0kbits/s dup=10797 drop=0
frame=14401 fps=516 q=69.0 size= 0kB time=00:00:00.00 bitrate= 0.0kbits/s dup=14396 drop=0
frame=18001 fps=484 q=69.0 size= 0kB time=00:00:00.00 bitrate= 0.0kbits/s dup=17995 drop=0
frame=21601 fps=464 q=69.0 size= 0kB time=00:00:00.00 bitrate= 0.0kbits/s dup=21594 drop=0
frame=25201 fps=454 q=69.0 size= 0kB time=00:00:00.00 bitrate= 0.0kbits/s dup=25193 drop=0
.....

它几乎就这样一直持续到我终止了这个过程。

谁能向我解释这里发生了什么以及我能做些什么来解决这个问题?

最佳答案

就像 ffmpeg 输出所说

Please consider specifying a lower framerate, a different muxer or -vsync 2**

添加 -vsync 2 问题将得到解决。

编辑添加说明:

-vsync 参数是一种视频同步方法。它决定了帧从输入传递到输出的方式。以下是可能的选项,取自当前 ffmpeg docs .
0passthrough - 将每个帧连同其时间戳从多路复用器传递到多路复用器。
1cfr - 帧将被复制和丢弃,以达到所要求的恒定帧速率。
2vfr - 帧以其时间戳通过或丢弃,以防止 2 帧具有相同的时间戳。
drop - 作为直通但会破坏所有时间戳,使复用器根据帧速率生成新的时间戳。
-1auto - 根据复用器功能在 1 和 2 之间进行选择。这是默认方法。

(其中一些有多个值的原因是它曾经只是按数字,现在是按名称。仍然允许使用数字以避免破坏向后兼容性。)

添加 2的原因在这里会有帮助的是它会丢掉更多的帧并使复用器上的事情变得更容易。缺点是,您可能会丢失帧。

关于ffmpeg - 对于无法有效支持它的复用器而言,帧速率非常高,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18064604/

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