gpt4 book ai didi

垂直电影上的ffmpeg模糊条 - 打开编码器时出错

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

我正在尝试使用 ffmpeg 准备一个垂直录制的 mp4 文件以上传到 youtube。
(在 Synology DS220+ 上)
在输出文件中,我希望侧面没有黑条,但电影本身的 strip 模糊。
这是我试图用这段代码来做的(最后我想自动化这个过程,但也许有更好的方法来做到这一点):

ffmpeg -i input.mp4 -lavfi "[0:v]scale=1920*2:1080*2,boxblur=luma_radius=min(h\,w)/20:luma_power=1:chroma_radius=min(cw\,ch)/20:chroma_power=1[bg];[0:v]scale=-1:1080[ov];[bg][ov]overlay=(W-w)/2:(H-h)/2,crop=w=1920:h=1080" output.mp4 
不幸的是,我收到一条错误消息:
Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height
在我在互联网上的搜索中,我尝试了多种方法来完成这项工作,但得到的都是相同的错误结果。
这让我认为 ffmpeg 安装有问题或者我尝试了错误的代码。
有人可以帮我完成这个“项目”吗
完整回复如下:
username@ip:/volume1/location$ ffmpeg -i input.mp4 -lavfi "[0:v]scale=1920*2:1080*2,boxblur=luma_radius=min(h\,w)/20:luma_power=1:chroma_radius=min(cw\,ch)/20:chroma_power=1[bg];[0:v]scale=-1:1080[ov];[bg][ov]overlay=(W-w)/2:(H-h)/2,crop=w=1920:h=1080" output.mp4
ffmpeg version 2.7.7 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.9.3 (crosstool-NG 1.20.0) 20150311 (prerelease)
configuration: --prefix=/usr --incdir='${prefix}/include/ffmpeg' --arch=i686 --target-os=linux --cross-prefix=/usr/local/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu- --enable-cross-compile --enable-optimizations --enable-pic --enable-gpl --enable-shared --disable-static --enable-version3 --enable-nonfree --enable-libfaac --enable-encoders --enable-pthreads --disable-bzlib --disable-protocol=rtp --disable-muxer=image2 --disable-muxer=image2pipe --disable-swscale-alpha --disable-ffserver --disable-ffplay --disable-doc --disable-devices --disable-bzlib --disable-altivec --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libmp3lame --disable-vaapi --disable-decoder=amrnb --disable-decoder=ac3 --disable-decoder=ac3_fixed --disable-encoder=zmbv --disable-encoder=dca --disable-encoder=ac3 --disable-encoder=ac3_fixed --disable-encoder=eac3 --disable-decoder=dca --disable-decoder=eac3 --disable-decoder=truehd --disable-decoder=hevc --disable-muxer=hevc --disable-demuxer=hevc --disable-parser=hevc --cc=/usr/local/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ccache-gcc --enable-yasm --enable-libx264 --enable-encoder=libx264
libavutil 54. 27.100 / 54. 27.100
libavcodec 56. 41.100 / 56. 41.100
libavformat 56. 36.100 / 56. 36.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 16.101 / 5. 16.101
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.100 / 1. 2.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.36.100
Duration: 00:00:36.12, start: 0.000000, bitrate: 2529 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, smpte170m/bt709/bt709), 406x720 [SAR 405:406 DAR 9:16], 2394 kb/s, 30 fps, 30 tbr, 12k tbn, 60 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
File 'output.mp4' already exists. Overwrite ? [y/N] y
[libx264 @ 0x1cdc4a0] using SAR=81/256
[libx264 @ 0x1cdc4a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0x1cdc4a0] profile High, level 4.0
[libx264 @ 0x1cdc4a0] 264 - core 148 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - 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=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'output.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.36.100
Stream #0:0: Video: h264 (libx264), yuv420p, 1920x1080 [SAR 81:256 DAR 9:16], q=-1--1, 30 fps, 30 tbn, 30 tbc (default)
Metadata:
encoder : Lavc56.41.100 libx264
Stream #0:1(und): Audio: aac, 0 channels, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
encoder : Lavc56.41.100 libfaac
Stream mapping:
Stream #0:0 (h264) -> scale (graph 0)
Stream #0:0 (h264) -> scale (graph 0)
crop (graph 0) -> Stream #0:0 (libx264)
Stream #0:1 -> #0:1 (aac (native) -> aac (libfaac))
Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height

最佳答案

您的 ffmpeg从 2015 年开始,太旧了。尝试使用 SynoCommunity 进行升级.

关于垂直电影上的ffmpeg模糊条 - 打开编码器时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66598423/

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