ffmpeg

ffmpeg - make a seamless loop with a crossfade

ぐ巨炮叔叔 提交于 2021-02-18 16:08:34
问题 I want to apply a crossfade to the last x frames of a video with the first x frames in order to obtain a seamless loop. How can I do that? 回答1: Let's say your video is 30 seconds long and your fade is 1 second long. Your command would be ffmpeg -i video.mp4 -filter_complex "[0]split[body][pre]; [pre]trim=duration=1,format=yuva420p,fade=d=1:alpha=1,setpts=PTS+(28/TB)[jt]; [body]trim=1,setpts=PTS-STARTPTS[main]; [main][jt]overlay" output.mp4 The video is split into two identical streams. The

ffmpeg Using -movflags faststart

做~自己de王妃 提交于 2021-02-18 08:07:33
问题 I tried to use the command -movflags faststart And got the following error: Microsoft Windows [Version 6.0.6002] Copyright (c) 2006 Microsoft Corporation. All rights reserved. C:\uploads\1\videos>ffmpeg -i simple1.mp4 -codec copy -map 0 -movflags faststart output.mp4 -movflags faststart output.mp4 ffmpeg version N-34549-g13b7781, Copyright (c) 2000-2011 the FFmpeg developers built on Nov 6 2011 22:02:08 with gcc 4.6.1 configuration: --enable-gpl --enable-version3 --disable-w32threads --enable

Detect bad frames in OpenCV 2.4.9

一个人想着一个人 提交于 2021-02-18 06:29:05
问题 I know the title is a bit vague but I'm not sure how else to describe it. CentOS with ffmpeg + OpenCV 2.4.9. I'm working on a simple motion detection system which uses a stream from an IP camera (h264). Once in a while the stream hiccups and throws in a "bad frame" (see pic-bad.png link below). The problem is, these frames vary largely from the previous frames and causes a "motion" event to get triggered even though no actual motion occured. The pictures below will explain the problem. Good

使用AutoML Vision进行音频分类

荒凉一梦 提交于 2021-02-18 04:11:18
作者 | Vivek Amilkanthawar 来源 | Towards Data Science 编辑 | 代码医生团队 对于给定的音频数据集,可以使用 Spectrogram 进行音频分类吗? 尝试 使用 Google AutoML Vision 。 把音频文件转换成各自的频谱图,并使用频谱图作为分类问题的图像。 这是 频 谱图的正式定义 频谱图是信号频率随时间变化的直观表示。 在本次实验中,将使用 Kaggle 的音频数据集 如下 https://www.kaggle.com/c/freesound-audio-tagging/data 继续下载数据集 { 警告 !! :数据集超过 5GB ,因此在对数据集执行任何操作时需要耐心等待。对于实验,在 Google Can Platform ( GCP )上租了一台 Linux 虚拟机,将从那里执行所有 步骤 。此外需要一个 GCP 帐户才能学习本教程 } 步骤1:下载音频数据集 训练 数据( 4.1 GB ) curl https://zenodo.org/record/ 2552860 /files/FSDKaggle2018. audio_train.zip?download= 1 --output audio_train.zip upzip audio_train.zip 测试数据( 524 MB ) curl

What does “copy” do in a ffmpeg command line?

一笑奈何 提交于 2021-02-17 20:33:07
问题 I know that it copies something but other than that what does it do (to what extend it affects the output file)? Is it a switch or option? Why does it not have a hyphen before the word itself? I see from other questions that it can copy streams without transcode but what are other possibility that I can manipulate it? I have done ffmpeg --help but I don't see any documentation about it. Is there a website I can read more about it? 回答1: copy is neither a switch nor an option. It's the value

ffmpeg convert from H.264 (High 4:4:4 Profile) to H.264 (Main Profile)

我的未来我决定 提交于 2021-02-17 15:20:08
问题 How can I convert a video from H.264 (High 4:4:4 Profile) to H.264 (Main Profile) using ffmpeg? I can't do that with this command: ffmpeg -i 1/25359.mp4 -profile:v main out.mp4 . That'd return an error: ... That'd return an error: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1/25359.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf56.40.101 Duration: 00:00:06.08, start: 0.000000, bitrate: 1059 kb/s Stream #0:0(und): Video: h264 (High 4:4:4

ffmpeg: `select` filter output frame numbers are off

我怕爱的太早我们不能终老 提交于 2021-02-17 07:12:41
问题 I want to extract certain frames from video, but using this command ffmpeg -i "video-a.mkv" -vf select="eq(n\,100)" -vsync 0 -frame_pts true "a_%06d.jpg" ffmpeg -i "video-b.mkv" -vf select="eq(n\,100)" -vsync 0 -frame_pts true "b_%06d.jpg" it seems I'm getting inconsistent results. for different videos I get differently named files: a_000103.jpg b_000101.jpg why is that? 回答1: The input in the log file has a delayed video start time. Reset timestamps, to make it independent of that possibility

Use ffprobe to view audio tracks by language [closed]

我只是一个虾纸丫 提交于 2021-02-17 06:07:59
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . Improve this question I wish to use ffprobe to list all audio streams, and show what language is used. Simply this is part of me trying to find ways to automatically remove non-english tracks from video files. I am new to ffprobe, but have had some experience using ffmpeg. Because I

FFMpeg: how to use between() to select last second?

对着背影说爱祢 提交于 2021-02-17 05:55:03
问题 I'm trying to apply a caption using drawtext that should disappear one second before the video end: ffmpeg -i input.mp4 -vf "drawtext=enable='between(t,0,5)':fontfile=font.ttf:text='Some caption':x=60:y=640:fontsize=40:fontcolor=#f0f0f0@0.9" -vcodec libx264 -crf 27 -preset ultrafast -strict -2 -acodec copy output.mp4 The problem is that I don't know the video length beforehand. I've tried using 'between(t,0,-1)' but it doesn't work, the caption never shows up. Anyone knows if is there a way

ffmpeg: consider increasing probesize error, but it is never satisfied

人盡茶涼 提交于 2021-02-17 03:52:47
问题 I was trying to use an Arch solution for streaming to twitch today through FFMPEG, but all of my attempts were in vain because of one simple thing on FFMPEG. it says that the probesize is not large enough, so I instinctively increased the probesize value more and more... and now it is -probesize "500M" yet it is still saying it is not enough. here is the code snippet [x11grab @ 0x5631f846cd00] Stream #0: not enough frames to estimate rate; consider increasing probesize Input #0, x11grab, from