gpt4 book ai didi

FFmpeg:改变帧速率的记录方法不起作用

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

根据 here 上的 FFmpeg 文档,我可以使用以下方法更改视频的帧速率:

ffmpeg -i input.mkv -c:v copy -vsync drop -r 59.94 output.mkv

但我得到的只是 av_interleaved_write_frame(): Invalid argument我的机器上的错误。我究竟做错了什么?

这是日志:
ffmpeg -i noaudio.mp4 -c:v copy -vsync drop -r 160 lapse.mp4

ffmpeg version 4.1 Copyright (c) 2000-2018 the FFmpeg developers
built with Apple LLVM version 10.0.0 (clang-1000.11.45.5)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1_1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gpl --enable-libmp3lame --enable-libopus --enable-libsnappy --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-opencl --enable-videotoolbox
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'noaudio.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.20.100
Duration: 00:12:31.45, start: 0.000000, bitrate: 59950 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709), 3840x2160 [SAR 1:1 DAR 16:9], 59948 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc (default)
Metadata:
handler_name : VideoHandler
File 'lapse.mp4' already exists. Overwrite ? [y/N] y
Output #0, mp4, to 'lapse.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.20.100
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709), 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 59948 kb/s, 29.97 fps, 29.97 tbr, 10240 tbn, 160 tbc (default)
Metadata:
handler_name : VideoHandler
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[mp4 @ 0x7fec5400e000] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
av_interleaved_write_frame(): Invalid argument
frame= 1 fps=0.0 q=-1.0 Lsize= 0kB time=-577014:32:22.77 bitrate=N/A speed=N/A
video:794kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Conversion failed!

最佳答案

如果不重新编码视频文件,您将无法更改帧速率,因此 -c:v copy 将不起作用。尝试使用 -c:v libx264 -b:v -r 59.94 和您可能需要的任何其他选项。

关于FFmpeg:改变帧速率的记录方法不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54222386/

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