ffmpeg

基于 Serverless 技术的视频截帧架构实战

∥☆過路亽.° 提交于 2021-02-20 16:03:30
前言 视频直播是一种创新的在线娱乐形式,具有多人实时交互特性,在电商、游戏、在线教育、娱乐等多个行业都有着非常广泛的应用。随着网络基础设施的不断改善以及社交娱乐需求的不断增长,视频直播在持续渗透进大家的日常生活,并占据用户的零碎休闲时间。视频直播的技术支撑能力也在不断提高,从而促进视频直播市场规模从2014的212.5亿元增长到2020年的548.5亿元,并将在未来五年继续以12.8%左右的增长率快速发展。 视频截帧需求概述 直播行业受到越来越多的法律、法规和政策的规限,在行业一般标准和运营规程的约束下,每一个直播平台都有义务对非法的直播内容,以及主播与观众之间的不当互动采取措施,为直播行业更为规范的发展做出贡献。如何第一时间监控到直播流中的非法内容,是直播平台需要面对的共同挑战,视频截帧就是满足内容审核需求的常规操作。视频截帧可以根据视频直播的不同风险等级,选择不同的频率对直播流进行截帧处理,保存后的图片可以统一上传到自建或第三方内容审核平台,用于涉黄、涉政、广告等场景的识别。除此之外,某些特定的业务需求也需要通过视频截帧来实现,比如在线课堂类应用对学生的听课状态进行智能分析等。 视频截帧技术架构分析 对于视频流的截帧操作,可以通过FFmpeg命令实现。FFmpeg的截帧命令使用非常简单,每次截取一张图片后,可以将图片上传到对象存储OSS

How to determine the proper HTML5 video codec attribute for an AV1 file based on the FFMpeg encoding command or output?

家住魔仙堡 提交于 2021-02-20 00:46:59
问题 We have some files encoded in AV1, but we recently noticed that Chrome mobile fails to play the files - but it doesn't fall back to an encoding it can use - it just puts the unplayable AV1 file in there. I'm hoping that if we add a codec attribute we can remedy this - but I'm not sure how to determine the codec for these AV1 files. I've come across this documentation on MDN, but I'm not sure how I would determine the proper codec from that. It starts off simple enough, but some of the values

How to keep transparency when scale webm file with ffmpeg

Deadly 提交于 2021-02-20 00:26:10
问题 I'm using ffmpeg to scale my WEBM file, by using below command: ffmpeg -i in.webm -c:v libvpx -vf scale=100:100 out.webm The output has correct resolution as I expected but the problem is transparency become black background. Could someone give me a solution for this. Thank you so much. Below is the log of the operation: ffmpeg version 3.4 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 7.2.0 (GCC) configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib -

How to keep transparency when scale webm file with ffmpeg

笑着哭i 提交于 2021-02-20 00:22:41
问题 I'm using ffmpeg to scale my WEBM file, by using below command: ffmpeg -i in.webm -c:v libvpx -vf scale=100:100 out.webm The output has correct resolution as I expected but the problem is transparency become black background. Could someone give me a solution for this. Thank you so much. Below is the log of the operation: ffmpeg version 3.4 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 7.2.0 (GCC) configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib -

How to keep transparency when scale webm file with ffmpeg

微笑、不失礼 提交于 2021-02-20 00:21:19
问题 I'm using ffmpeg to scale my WEBM file, by using below command: ffmpeg -i in.webm -c:v libvpx -vf scale=100:100 out.webm The output has correct resolution as I expected but the problem is transparency become black background. Could someone give me a solution for this. Thank you so much. Below is the log of the operation: ffmpeg version 3.4 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 7.2.0 (GCC) configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib -

How to keep transparency when scale webm file with ffmpeg

六眼飞鱼酱① 提交于 2021-02-20 00:19:59
问题 I'm using ffmpeg to scale my WEBM file, by using below command: ffmpeg -i in.webm -c:v libvpx -vf scale=100:100 out.webm The output has correct resolution as I expected but the problem is transparency become black background. Could someone give me a solution for this. Thank you so much. Below is the log of the operation: ffmpeg version 3.4 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 7.2.0 (GCC) configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib -

ffprobe/ffmpg silence detection command

随声附和 提交于 2021-02-19 07:48:08
问题 I'm working on a stream silence detection. It's working on the following command in ffmpeg: ffmpeg -i http://mystream.com/stream -af silencedetect=n=-50dB:d=0.5 -f null - 2> log.txt I would like to get a json output of the logfile. There is a json option in 'ffprobe' but silencedetect=n=-50dB:d=0.5 is'nt working. Help! Cheers! 回答1: ffprobe is meant to probe container-level or stream-level metadata. silencedetect is a filter which analyses the content of decoded audio streams; its output isn't

Commands to cut videos in half horizontally or vertically, and rejoin them later

冷暖自知 提交于 2021-02-19 05:36:12
问题 How can I use ffmpeg to cut video in half, vertically or horizontally by resolution; so for a 640 x 480 video, I want to separate that into two halves with a resolution of 320 x 480, or to separate it into two halves horizontally with a resolution of 640 x 240; and afterward, I need to be able to join the separated videos again to make a single video with the original resolution. How can this be done? 回答1: separate into two halves Use the crop filter: horizontal ffmpeg -i input -filter

Java execute command doesn't work in code

三世轮回 提交于 2021-02-18 19:06:49
问题 I am calling java.lang.Runtime.exec(...) in my Java program to run a command (some FFMPEG commands) simply passed to my function: private static void RunCommand(String command) throws InterruptedException { try { // Execute command Process proc = Runtime.getRuntime().exec(command); } } It runs OK for simple FFMPEG cases such as ffmpeg -i input.avi -c copy output.avi . But for one of the commands, apparently it doesn't run. When I copy/paste the exact String in command line, I am able to run

FFmpeg: Batch convert all audio (mp3) in folder to video (mp4) with album artwork

泪湿孤枕 提交于 2021-02-18 18:58:36
问题 I'm looking to batch convert all audio (mp3) in folder to video (mp4) with album artwork. This for uploading audios to youtube. I have pretty much a working code but I want to automate the whole thing. Here's the code from .bat file I'm using. (source:FFMpeg Batch Image + Multiple Audio to video) echo off for %%a in ("*.mp3") do "C:\ffmpeg\bin\ffmpeg" -loop 1 -i "C:\ffmpeg\bin\input.jpg.jpg" -i "%%a" -c:v libx264 -preset veryslow -tune stillimage -crf 18 -pix_fmt yuv420p -c:a aac -shortest