gpt4 book ai didi

encoding - FFMPEG:无法在过滤器支持的格式之间进行转换 - 重新初始化过滤器时出错

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

尝试使用 NVIDIA Cuda 将 mp4 文件编码为 HLS[.m3u8] 使用以下命令:
我要做的是将 1080p 视频文件转换为 4 种再现分辨率:1080p 720p 480p 360p贝娄是720p例子。

ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i input.mp4 -vf scale=w=1280:h=720:force_original_aspect_ratio=decrease -c:a aac -ar 48000 -b:a 128k -c:v h264_nvenc -profile:v main -crf 20 -g 48 -keyint_min 48 -sc_threshold 0 -b:v 2500k -maxrate 2675k -bufsize 3750k -hls_time 4 -hls_playlist_type vod -hls_segment_filename output/720p_%03d.ts output/720p.m3u8
但这是我运行命令时遇到的错误
Impossible to convert between the formats supported by the filter 'graph 0 input from stream 0:0' and the filter 'auto_scaler_0'
Error reinitializing filters!
Failed to inject frame into filter network: Function not implemented
Error while processing the decoded data for stream #0:0
我认为我的问题出在 -vf scale=w=1280:h=720:force_original_aspect_ratio=decrease命令,但不确定我可以用什么替换它,因为我需要缩放功能。
这也是 ffmpeg -version 的输出
ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration: --enable-cuda-nvcc --enable-cuvid --enable-nvenc --enable-libnpp --enable-cuda-llvm --pkgconfigdir=/content/workspace/lib/pkgconfig --prefix=/content/workspace --pkg-config-flags=--static --extra-cflags='-I/content/workspace/include -I/usr/local/cuda/include' --extra-ldflags='-L/content/workspace/lib -L/usr/local/cuda/lib64' --extra-libs='-lpthread -lm' --enable-static --disable-debug --disable-shared --disable-ffplay --disable-doc --enable-openssl --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libvpx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libx265 --enable-runtime-cpudetect --enable-libfdk-aac --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-libvidstab --enable-libaom --enable-libsrt
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
libpostproc 55. 7.100 / 55. 7.100

最佳答案

回答我自己的问题...我替换了 -vf scale=w=1280:h=720:force_original_aspect_ratio=decrease-vf scale_cuda=1280:720:1:4

关于encoding - FFMPEG:无法在过滤器支持的格式之间进行转换 - 重新初始化过滤器时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65594108/

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