Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
How to correctly pass Windows path with spaces to FFmpeg -vf ass filter in Python ?
9 mai, par Utopiaass_path = r'C:\Users\username\Desktop\Title Of Video.ass' command = [ 'ffmpeg', '-i', mp4_path, '-vf', f"ass='{ass_path}'", # Embed the full path in the filter string, with single quotes '-c:v', 'libx264', '-c:a', 'copy', output_path ]
In the error message I'm getting this message: Unable to parse option value "UsersusernameDesktopTitle Of Video.ass" as image size. Somehow in the command it's stripping the \ away and removed the C:
Does anyone know how to fix this? Thanks.
-
Error importing VideoFileClip from moviepy : AttributeError : 'PermissionError' object has no attribute 'message'
9 mai, par TahlilI'm using jupyter notebook. I have also tried from anaconda console as well.
Tried importing with both the ways shown below
from moviepy.editor import VideoFileClip from moviepy.video.io.VideoFileClip import VideoFileClip
Both of them gave me same error. Full trace is below
AttributeError Traceback (most recent call last) in
() 6 import glob 7 import math ----> 8 from moviepy.editor import VideoFileClip 9 from moviepy.video.io.VideoFileClip import VideoFileClip C:\Program Files\Anaconda3\lib\site-packages\moviepy\editor.py in () 20 # Clips 21 ---> 22 from .video.io.VideoFileClip import VideoFileClip 23 from .video.io.ImageSequenceClip import ImageSequenceClip 24 from .video.io.downloader import download_webfile C:\Program Files\Anaconda3\lib\site-packages\moviepy\video\io\VideoFileClip.py in () 1 import os 2 ----> 3 from moviepy.video.VideoClip import VideoClip 4 from moviepy.audio.io.AudioFileClip import AudioFileClip 5 from moviepy.Clip import Clip C:\Program Files\Anaconda3\lib\site-packages\moviepy\video\VideoClip.py in () 18 19 import moviepy.audio.io as aio ---> 20 from .io.ffmpeg_writer import ffmpeg_write_image, ffmpeg_write_video 21 from .io.ffmpeg_tools import ffmpeg_merge_video_audio 22 from .io.gif_writers import (write_gif, C:\Program Files\Anaconda3\lib\site-packages\moviepy\video\io\ffmpeg_writer.py in () 13 DEVNULL = open(os.devnull, 'wb') 14 ---> 15 from moviepy.config import get_setting 16 from moviepy.tools import verbose_print 17 C:\Program Files\Anaconda3\lib\site-packages\moviepy\config.py in () 49 success, err = try_cmd([FFMPEG_BINARY]) 50 if not success: ---> 51 raise IOError(err.message + 52 "The path specified for the ffmpeg binary might be wrong") 53 AttributeError: 'PermissionError' object has no attribute 'message' Python version info
Python 3.5.2 |Anaconda custom (64-bit)| (default, Jul 5 2016, 11:41:13) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.
Running ffmpeg -version in a console gives me
ffmpeg version N-83507-g8fa18e0 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 5.4.0 (GCC) configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --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-zlib libavutil 55. 47.100 / 55. 47.100 libavcodec 57. 80.100 / 57. 80.100 libavformat 57. 66.102 / 57. 66.102 libavdevice 57. 2.100 / 57. 2.100 libavfilter 6. 73.100 / 6. 73.100 libswscale 4. 3.101 / 4. 3.101 libswresample 2. 4.100 / 2. 4.100 libpostproc 54. 2.100 / 54. 2.100
I'm running 64 bit version of Windows 10.
I can't find any solution anywhere and its driving me crazy! Seems like its not finding the ffmpeg binary but I have put it in C:\ffmpeg\bin and added this to path environment variable. Followed the instruction from here.
-
Scale image overlay over the time with ffmpeg
9 mai, par Nazarii KahaniakI have an overlay image and background video. I want to make the overlay 3 times bigger when 10 seconds of video pass, the scaling animation should take 1 second. Is it possible to do something like this with ffmpeg?
-
Batch merge audio files by specific timestamp without reencoding
8 mai, par SaccarabI want to batch merge mp3 audio files where every single file has a specific start time. So below is the fluent-ffmpeg spawn I use right now to merge 3 files with each starting at respectively 200, 7400 and 10600.
ffmpeg -i firstFile.mp3 -i secondFile.mp3 -i thirdFile.mp3 -filter_complex [0]adelay=200[a0];[1]adelay=7400[a1];[2]adelay=10600[a2];[a0][a1] [a2]amix=inputs=3:dropout_transition=1000,volume=3 -f mp3 pipe:1
This works pretty good, except for longer files re-encoding makes the process take real long. So I wanted to do the same thing using concat demuxer. Since I already know how long each audio file is, I've put in silent audio files between them to create a delay until next audio file so it actually starts on the time position it is supposed to.
#concatfile.txt file silence.mp3 outpoint 200 file firstFile.mp3 file silence.mp3 outpoint 1500 file secondFile.mp3 file silence.mp3 outpoint 2000 file thirdFile.mp3 ffmpeg -f concat -safe 0 -i concatfile.txt -c copy output.mp3
This solution also works okay when merging few files but when I merge higher count of files like 30 or 40 result file will have a slowly increasing synchronization problem where audio files actually start later than the start timestamps they are supposed to have.
Looks like an issue similar to this post
I'm open for any suggestion on solving the issue.
-
ffmpeg creating gif from images, how to prevent loop ?
8 mai, par GeuisI'm creating gifs from a small group of images. Currently the gif loops by default. I've been trying variations of -loop in the ffmpeg command, but the gif still loops. What's the right way to do this?