首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >ffmpeg ...“无法在筛选器支持的格式之间转换”

ffmpeg ...“无法在筛选器支持的格式之间转换”
EN

Stack Overflow用户
提问于 2017-11-27 14:42:38
回答 1查看 6.3K关注 0票数 3

使用2017.11.26构建的最新ffmpeg master,我无法破译错误消息的含义,更重要的是,无法对它们做些什么。

从-vf更改为-filter_complex没有任何作用(我不得不尝试)。主要的错误信息似乎是

代码语言:javascript
运行
复制
Impossible to convert between the formats supported by the filter

我曾尝试在yadif和unsharp_opencl之前/之间/之后插入"format=“和"scale”,但都无济于事。

我想知道,这是不是与需要hwupload/hwdownload/hwmap有关,还是无关紧要?

我做错了什么?

代码语言:javascript
运行
复制
".\ffmpeg_3.latest_master.exe" -hide_banner -v verbose -init_hw_device opencl=ocl:1.0 -filter_hw_device ocl -i ".\test_01.mpg" -an -map_metadata -1 -sws_flags lanczos+accurate_rnd+full_chroma_int+full_chroma_inp -filter_complex "[0:v]yadif=0:0:0,scale=flags=lanczos+accurate_rnd+full_chroma_int+full_chroma_inp,unsharp_opencl=lx=3:ly=3:la=0.5:cx=3:cy=3:ca=0.5,setdar=dar=16/9" -r 25 -c:v h264_nvenc -preset slow -bf 2 -g 50 -refs 3 -rc:v vbr_hq -rc-lookahead:v 32 -cq 22 -qmin 16 -qmax 25 -coder cabac -movflags +faststart -profile:v high -level 4.1 -pixel_format yuv420p -y ".\test_01.newest.MP4" 
[AVHWDeviceContext @ 0000020e229aad40] 1.0: NVIDIA CUDA / GeForce GTX 750 Ti
[AVHWDeviceContext @ 0000020e229aad40] DXVA2 to OpenCL mapping function found (clCreateFromDX9MediaSurfaceKHR).
[AVHWDeviceContext @ 0000020e229aad40] DXVA2 in OpenCL acquire function found (clEnqueueAcquireDX9MediaSurfacesKHR).
[AVHWDeviceContext @ 0000020e229aad40] DXVA2 in OpenCL release function found (clEnqueueReleaseDX9MediaSurfacesKHR).
[AVHWDeviceContext @ 0000020e229aad40] The cl_khr_d3d11_sharing extension is required for D3D11 to OpenCL mapping.
[AVHWDeviceContext @ 0000020e229aad40] D3D11 to OpenCL mapping not usable.
[mpeg @ 0000020e229ae240] max_analyze_duration 5000000 reached at 5000000 microseconds st:0
Input #0, mpeg, from '.\test_01.mpg':
  Duration: 00:06:29.96, start: 0.240000, bitrate: 2799 kb/s
    Stream #0:0[0x1e0]: Video: mpeg2video (Main), 1 reference frame, yuv420p(tv, top first, left), 720x576 [SAR 64:45 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16p, 256 kb/s
[Parsed_scale_1 @ 0000020e29951a20] w:iw h:ih flags:'lanczos+accurate_rnd+full_chroma_int+full_chroma_inp' interl:0
Stream mapping:
  Stream #0:0 (mpeg2video) -> yadif
  setdar -> Stream #0:0 (h264_nvenc)
Press [q] to stop, [?] for help
[Parsed_scale_1 @ 0000020e29cccda0] w:iw h:ih flags:'lanczos+accurate_rnd+full_chroma_int+full_chroma_inp' interl:0
[graph 0 input from stream 0:0 @ 0000020e29ccc980] w:720 h:576 pixfmt:yuv420p tb:1/90000 fr:25/1 sar:64/45 sws_param:flags=2
[auto_scaler_0 @ 0000020e29ccc580] w:iw h:ih flags:'bilinear' interl:0
[Parsed_unsharp_opencl_2 @ 0000020e29ccc4a0] auto-inserting filter 'auto_scaler_0' between the filter 'Parsed_scale_1' and the filter 'Parsed_unsharp_opencl_2'
Impossible to convert between the formats supported by the filter 'Parsed_scale_1' 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
Conversion failed!
EN

回答 1

Stack Overflow用户

发布于 2017-11-27 18:18:22

不要紧。找到了有用的东西。例如

代码语言:javascript
运行
复制
.\ffmpeg.exe -hide_banner -v verbose -init_hw_device 
opencl=ocl:1.0 -filter_hw_device ocl -i 
".\test_01.mpg" -an -map_metadata -1 -sws_flags 
lanczos+accurate_rnd+full_chroma_int+full_chroma_inp -filter_complex 
"[0:v]yadif=0:0:0,hwupload,unsharp_opencl=lx=3:ly=3:la=0.5:cx=3:cy=3:ca=0.5,hwdownload,setdar=dar=16/9" 
 -r 25 -c:v h264_nvenc -preset slow -bf 2 -g 50 -refs 3 -rc:v 
vbr_hq -rc-lookahead:v 32 -cq 22 -qmin 16 -qmax 26 -coder cabac -movflags 
+faststart -profile:v high -level 4.1 -pixel_format yuv420p -y 
".\test_01.newest.MP4"

为什么不..。您的设备id (例如上面的"1.0“)可以通过查看以下内容找到

代码语言:javascript
运行
复制
.\ffmpeg.exe -hide_banner -v verbose -init_hw_device list
.\ffmpeg.exe -hide_banner -v verbose -init_hw_device opencl
.\ffmpeg.exe -hide_banner -v verbose -init_hw_device opencl:1.0 

你可以从它们的选项中了解一下它们的特点:

代码语言:javascript
运行
复制
.\ffmpeg.exe -hide_banner -v verbose -h encoder=h264_nvenc 
.\ffmpeg.exe -hide_banner -v verbose -h filter=yadif 
.\ffmpeg.exe -hide_banner -v verbose -h filter=unsharp_opencl 
票数 8
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/47505257

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档