简体   繁体   English

如何使用 ffmpeg 模糊水平视频的一侧

[英]How to blur side of horizontal video with ffmpeg

I would like to find a way to blur the top and the bottom of an horizontal video with the same video.我想找到一种方法来模糊具有相同视频的水平视频的顶部和底部。

At the moment I have the code to do the opposite:目前我有代码做相反的事情:

ffmpeg -i test.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" outpt.mp4

So I have this: 1 And I would like to have this: 2所以我有这个: 1我想有这个: 2

I found this, but the video is not center and I think it's not the good resolution because the video on the side is bigger than the other video.我找到了这个,但视频不在中心,我认为这不是很好的分辨率,因为侧面的视频比另一个视频大。

ffmpeg -i test.mp4 -lavfi "[0:v]scale=1080*2:1920*2,boxblur=luma_radius=min(h\,w)/20:luma_power=1:chroma_radius=min(cw\,ch)/20:chroma_power=1[bg];[0:v]scale=1080:-1[ov];[bg][ov]overlay=0:(H-h)/2,crop=w=1080:h=1920,pad=1080:1920:(ow-iw)/2:(oh-ih)/2:black" -s 1080x1920 outpt.mp4

Finally, I get that: what I have最后,我明白了:我有什么

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 FFMpeg:如何模糊视频文件底部的两个固定区域? - FFMpeg : how to blur two fixed regions at the bottom of the video file? 如何压缩视频,均匀模糊是压缩的唯一副作用? - How to compress video with uniform blur being the only side effect of compression? 我怎样才能在 FFMPEG 中加速这个并排视频拼接 - How can I speed up this side by side video stitch in FFMPEG 如何使用 FFmpeg 将顶部和底部 3d 视频转换为并排 3d 视频 - How to convert Top-and-Bottom 3d video to side-by-side 3d video with FFmpeg FFMPEG 并排视频一分为二 - FFMPEG Split Side by Side video in two 并排合并两个视频ffmpeg - Merge two video side by side ffmpeg FFmpeg:如何将水平视频16:9转换为垂直视频9:16,顶部和底部背景模糊 - FFmpeg: How to convert horizontal video 16:9 to vertical video 9:16, with blurred background on top and bottom sides FFmpeg:如何将水平视频 16:9 转换为垂直视频 9:16,顶部和底部带有黑色背景 - FFmpeg: How to convert horizontal video 16:9 to vertical video 9:16, with Black background on top and bottom sides 如何使用ffmpeg并排创建带有填充和图像背景的两个视频? - How to create side by side two video with padding and image background using ffmpeg? FFMPEG,使用“图像选择区域”插件模糊视频区域 - FFMPEG, Blur an area of a video using Image Select Areas Plugin
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM