编码视频时,我总是使用此源代码。它们几乎是1920x1080的视频。 但是当我尝试编码7680x3840视频时发生错误。
ffmpeg version 3.2.2 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.4.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
libavutil 55. 34.100 / 55. 34.100
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.100 / 57. 56.100
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
[avisynth @ 03af8040] Stream #0: not enough frames to estimate rate; consider increasing probesize
Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, avisynth, from 'a.mp4.avs':
Duration: 00:00:01.85, start: 0.000000, bitrate: 2 kb/s
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 7680x3840, 60 fps, 60 tbr, 60 tbn, 60 tbc
Stream #0:1: Audio: pcm_f32le, 48000 Hz, stereo, flt, 3072 kb/s
[libx264 @ 054c5c20] VBV maxrate specified, but no bufsize, ignored
[libx264 @ 054c5c20] frame MB size (480x240) > level limit (8192)
[libx264 @ 054c5c20] DPB size (4 frames, 460800 mbs) > level limit (0 frames, 32768 mbs)
[libx264 @ 054c5c20] MB rate (6912000) > level limit (245760)
[libx264 @ 054c5c20] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
x264 [error]: malloc of size 152432416 failed
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (pcm_f32le (native) -> aac (native))
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
有一个奇怪的消息。 '大小为152432416的malloc失败' 我认为这是内存问题,但我不知道要解决这个问题。
这是avs文件
PluginPath = "D:\Application\Frame_Doubling_Set_Drag_And_Drop\ffmpeg-Convert-TrueMotion-x86_Newer_Svpflow\_exe\"
LoadPlugin(PluginPath + "ffms2.dll")
LoadPlugin(PluginPath + "svpflow1.dll")
LoadPlugin(PluginPath + "svpflow2.dll")
LoadPlugin(PluginPath + "mvtools2.dll")
Video=FFVideoSource("a.mp4", threads=8)
Audio=FFAudioSource("a.mp4")
Audiodub(Video, Audio)
Import(PluginPath + "InterFrame2.avsi")
InterFrame(GPU=true, Preset="Medium", FrameDouble=true, NewNum=60000, NewDen=1000, Cores=8)
这是批处理文件
@echo off
CD /D "%~dp1"
cls
set DestPath=%~dp1
set Src0=%~nx1
set Src1=%~n1
set DestExt=.mp4
set Dest0=%DestPath%\%Src1%-Cnv%DestExt%
set Dest1=%DestPath%\%Src1%-Cnv-New%DestExt%
set exe=%~dp0_exe\ffmpeg.exe
set Opt1=-i
set Opt2=-c:v libx264 -b:v 200000k -minrate 10k -maxrate 200000k -profile:v high -level 4.1 -pix_fmt yuv420p
set Opt3=-c:a aac -ab 192k
set Opt4=-f mp4
If Not Exist "%Src0%" (echo. && echo [ %Src0% ] Not Found. && echo. && pause && Goto End)
If Exist "%Dest0%" set Dest0=%Dest1%
"%exe%" %Opt1% "%Src0%" %Opt2% %Opt3% %Opt4% "%Dest0%"
:End
If Not Exist "%Dest0%" (echo. && pause)
rem pause
pause
我怎么了?