Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
Why can't I compile ffmpeg's shared libraries ? errors with "recompile with -fPIC"
14 juillet, par Vigronderror:
LD libavcodec/libavcodec.so.61 /usr/bin/ld: /home/user/ffmpeg_build/lib/libopus.a(celt.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: failed to set dynamic section sizes: bad value collect2: error: ld returned 1 exit status make: *** [ffbuild/library.mak:119: libavcodec/libavcodec.so.61] Error 1
so far I've removed
--enable-libfdk_aac
and--enable-libmp3lame
with the same errors, and now it is erroring onlibopus
I thought
-fPIC
could be done with--enable-shared
but it seems not the caseversion:
ffmpeg 7.1.1
command:
PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \ --prefix="$HOME/ffmpeg_build" \ --pkg-config-flags="--static" \ --extra-cflags="-I$HOME/ffmpeg_build/include" \ --extra-ldflags="-L$HOME/ffmpeg_build/lib" \ --extra-libs=-lpthread \ --extra-libs=-lm \ --bindir="$HOME/bin" \ --enable-gpl \ --enable-libfreetype \ --enable-libharfbuzz \ --enable-libopus \ --enable-libvpx \ --enable-libx264 \ --enable-libx265 \ --enable-nonfree \ --enable-shared \ --enable-avisynth \ --enable-pic \ --enable-version3 \ --enable-ffplay \ --enable-ffprobe
-
FFMPEG : Invalid data found when processing input
14 juillet, par SchülerI am unable to upload mp3 or mp4 is there any specific path format? Here is my code. I have tried this also
ffmpeg -i Video/" + Name + " -ss 01:30 -r 1 -an -vframes 1 -f mjpeg Video/" + Name + ".jpg
exec("ffmpeg -y -i Video/" + Name + " -map_metadata -1 -ab 192k Video/" + Name + ".jpg", function(err) { if (err) {console.log(err)} console.log('Done', {'Image' : 'Video/' + Name + '.jpg'}); });
Here is the error
{ Error: Command failed: ffmpeg -y -i Video/ac9358e25dd41a69e95a72d3e71e4881 -map_metadata -1 -ab 192k Video/ac9358e25dd41a69e95a72d3e71e4881.jpg ffmpeg version 4.1.1 Copyright (c) 2000-2019 the FFmpeg developers built with gcc 8.2.1 (GCC) 20190212 configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth libavutil 56. 22.100 / 56. 22.100 libavcodec 58. 35.100 / 58. 35.100 libavformat 58. 20.100 / 58. 20.100 libavdevice 58. 5.100 / 58. 5.100 libavfilter 7. 40.101 / 7. 40.101 libswscale 5. 3.100 / 5. 3.100 libswresample 3. 3.100 / 3. 3.100 libpostproc 55. 3.100 / 55. 3.100 Video/ac9358e25dd41a69e95a72d3e71e4881: Invalid data found when processing input at ChildProcess.exithandler (child_process.js:275:12) at emitTwo (events.js:126:13) at ChildProcess.emit (events.js:214:7) at maybeClose (internal/child_process.js:925:16) at Socket.stream.socket.on (internal/child_process.js:346:11) at emitOne (events.js:116:13) at Socket.emit (events.js:211:7) at Pipe._handle.close [as _onclose] (net.js:557:12) killed: false, code: 1, signal: null, cmd: 'ffmpeg -y -i Video/ac9358e25dd41a69e95a72d3e71e4881 -map_metadata -1 -ab 192k Video/ac9358e25dd41a69e95a72d3e71e4881.jpg' }
-
Can't import moviepy due to missing ffmpex.exe
14 juillet, par SilentGrove_99I was trying to create an application with python using the moviepy library. I installed it using:
pip install moviepy
I found this from a MoviePy crash-course:
# Import everything needed to edit video clips from moviepy.editor import * # or from moviepy import * # moviepy v2 after removal of editor
After trying to run this line i get this error:
Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> # Import everything needed to edit video clips ... from moviepy.editor import * Traceback (most recent call last): File "
", line 2, in File "C:\Python27\lib\site-packages\moviepy\editor.py", line 22, in from .video.io.VideoFileClip import VideoFileClip File "C:\Python27\lib\site-packages\moviepy\video\io\VideoFileClip.py", line 3, in from moviepy.video.VideoClip import VideoClip File "C:\Python27\lib\site-packages\moviepy\video\VideoClip.py", line 20, in from .io.ffmpeg_writer import ffmpeg_write_image, ffmpeg_write_video File "C:\Python27\lib\site-packages\moviepy\video\io\ffmpeg_writer.py", line 15, in from moviepy.config import get_setting File "C:\Python27\lib\site-packages\moviepy\config.py", line 38, in FFMPEG_BINARY = get_exe() File "C:\Python27\lib\site-packages\imageio\plugins\ffmpeg.py", line 86, in get_exe raise NeedDownloadError('Need ffmpeg exe. ' imageio.core.fetching.NeedDownloadError: Need ffmpeg exe. You can download it by calling: imageio.plugins.ffmpeg.download() What is the problem here, and how can i fix it?
-
Cutting multimedia files based on start and end time using ffmpeg
14 juillet, par KalaiyarasanI tried to cut the video using the start and end time of the video by using the following command:
ffmpeg -ss 00:00:03 -t 00:00:08 -i movie.mp4 -acodec copy -vcodec copy -async 1 cut.mp4
By using the above command I want to cut the video from
00:00:03
to00:00:08
. But it is not cutting the video between those times instead of that it is cutting the video with first 11 seconds. -
Error in writing video file using moviepy and ffmpeg
13 juillet, par Divakar SharmaI have been working with moviepy library for the first time. I have a video clip around 7 hours long, and I'd like to clip it into small clips. I have a list of start and end time.
video = VideoFileClip("videoFile.mp4") clips = [] for cut in cuts: clip = video.subclip(cut[0], cut[1]) clips.append(clip) clips clip = video.subclip("7:32:18", "7:38:38") clips.append(clip) for clip, title in zip(clips, title_list): clip.write_videofile(title + '.mp4', threads=8, fps=24, audio=True, codec='libx264',preset=compression) video.close()
clips[] contain the start and end time for clipping. I have a list of title too which I have scraped from youtube. I have not included the two lists here but a small example could be:
cuts = [('0:00', '2:26'), ('2:26', '5:00'), ('5:00', '7:15'), ('7:15', '10:57'), ('10:57', '18:00'), ('18:00', '18:22'), ('18:22', '19:57'), ('19:57', '20:37'), ('20:37', '28:27'), ('28:27', '40:32'), ('40:32', '49:57'),... title_list = ['Introduction (What is Todoist?), tech stack talk', 'Showing the final application (with dark mode!)', 'Installing create react app', "Clearing out what we don't need from create react app", "Let's get building our components!", 'Installing packages using Yarn', 'Building the Header component', 'Building the Content component',...
OSError: [Errno 32] Broken pipe MoviePy error: FFMPEG encountered the following error while writing file Introduction(WhatisTodoist?),techstacktalkTEMP_MPY_wvf_snd.mp3: b'Introduction(WhatisTodoist?),techstacktalkTEMP_MPY_wvf_snd.mp3: Invalid argument\r\n' In case it helps, make sure you are using a recent version of FFMPEG (the versions in the Ubuntu/Debian repos are deprecated).
Above is the error I am getting after running the write_videofile(). I have looked at the documentation and the issues on github, I tried updating the ffmpeg through pip too. I don't know why it can't write the audio file.