Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
ffmpeg combine images to video and specify duration for each image ? [duplicate]
11 juin, par hanshenrikCan ffmpeg combine images to a video with a specific duration for each image? For example, i want 1.jpg to be displayed for 100 ms, and 2.jpg to be displayed for 120 ms, and 3.jpg to be displayed for 115 ms, and so on.. can ffmpeg do this?
I have a bunch of images, each image has their own timestamp, and the timestamps decides how long each image should be in the video..
This is similar to question Conversion of images to video with variable fps using FFmpeg , but unlike that post, I do not need a gradual increase, but I rather need to specify the duration of each image.
-
Can't import moviepy due to missing ffmpex.exe
11 juin, 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?
-
FFMPEG - Image extraction stretch problem [closed]
11 juin, par karmasanI have a .mov video file with 1440x1080 resolution. I extracted the frames from the video, using scale
-vf scale=1440:-1
but the images are stretched. Even though, the dimension of the extracted images are 1440x1080, the image is stretched on the height dimension and doesn't match the aspect ratio of the video.How can I solve this issue?
Here is the output from FFMPEG for the original video:
Stream #0:0(eng): Video: qtrle (rle / 0x20656C72), rgb24(progressive), 1440x1080, 624445 kb/s, SAR 4:3 DAR 16:9, 25 fps, 25 tbr, 25 tbn (default)
-
Is this a problem in my command, the stream, or FFMPEG itself ?
10 juin, par Ali MustafaI am trying to download a section from approximately 06:40:00 to 06:44:00 from this stream: https://kick.com/grossgore/videos/8d36c089-ff2b-4167-9c92-bc8a3a9d033b
I found the m3u8 URL: https://stream.kick.com/ivs/v1/196233775518/hDSBAWziz2jA/2025/5/25/12/56/LrW3TwZUg7Xk/media/hls/1080p60/playlist.m3u8
I run the following command:
ffmpeg -ss 06:40:00 -to 06:44:00 -i https://stream.kick.com/ivs/v1/196233775518/hDSBAWziz2jA/2025/5/25/12/56/LrW3TwZUg7Xk/media/hls/1080p60/playlist.m3u8 -c copy out.mp4
The command runs for a while, but for some reason the output file is empty once the program has finished. How do I figure out what the problem is?
Log:
ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers built with gcc 11 (Ubuntu 11.2.0-19ubuntu1) configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 [hls @ 0x633e19ea3200] Skip ('#EXT-X-VERSION:3') [hls @ 0x633e19ea3200] Skip ('#ID3-EQUIV-TDTG:2025-05-25T21:04:39') [hls @ 0x633e19ea3200] Skip ('#EXT-X-TWITCH-ELAPSED-SECS:0.000') [hls @ 0x633e19ea3200] Skip ('#EXT-X-TWITCH-TOTAL-SECS:29231.935') [hls @ 0x633e19ea3200] Skip ('#EXT-X-PROGRAM-DATE-TIME:2025-05-25T12:56:26.675Z') [hls @ 0x633e19ea3200] Skip ('#EXT-X-PROGRAM-DATE-TIME:2025-05-25T12:56:39.175Z') [hls @ 0x633e19ea3200] Skip ('#EXT-X-PROGRAM-DATE-TIME:2025-05-25T12:56:51.675Z') [hls @ 0x633e19ea3200] Skip ('#EXT-X-PROGRAM-DATE-TIME:2025-05-25T12:57:04.175Z') ... ... ... [hls @ 0x633e19ea3200] Skip ('#EXT-X-PROGRAM-DATE-TIME:2025-05-25T17:38:43.058Z') [hls @ 0x633e19ea3200] Skip ('#EXT-X-PROGRAM-DATE-TIME:2025-05-25T17:38:55.558Z') [hls @ 0x633e19ea3200] Skip ('#EXT-X-DISCONTINUITY') [hls @ 0x633e19ea3200] Skip ('#EXT-X-TWITCH-DISCONTINUITY') [hls @ 0x633e19ea3200] Skip ('#EXT-X-PROGRAM-DATE-TIME:2025-05-25T17:39:56.883Z') [hls @ 0x633e19ea3200] Skip ('#EXT-X-PROGRAM-DATE-TIME:2025-05-25T17:40:09.383Z') ... ... ... [hls @ 0x633e19ea3200] Skip ('#EXT-X-PROGRAM-DATE-TIME:2025-05-25T21:04:17.516Z') [hls @ 0x633e19ea3200] Skip ('#EXT-X-PROGRAM-DATE-TIME:2025-05-25T21:04:30.016Z') [hls @ 0x633e19ea3200] Opening 'https://stream.kick.com/ivs/v1/196233775518/hDSBAWziz2jA/2025/5/25/12/56/LrW3TwZUg7Xk/media/hls/1080p60/0.ts' for reading [hls @ 0x633e19ea3200] Opening 'https://stream.kick.com/ivs/v1/196233775518/hDSBAWziz2jA/2025/5/25/12/56/LrW3TwZUg7Xk/media/hls/1080p60/1.ts' for reading Input #0, hls, from 'https://stream.kick.com/ivs/v1/196233775518/hDSBAWziz2jA/2025/5/25/12/56/LrW3TwZUg7Xk/media/hls/1080p60/playlist.m3u8': Duration: 08:07:11.94, start: 64.171000, bitrate: 0 kb/s Program 0 Metadata: variant_bitrate : 0 Stream #0:0: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp Metadata: variant_bitrate : 0 Stream #0:1: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 60 tbr, 90k tbn, 120 tbc Metadata: variant_bitrate : 0 Stream #0:2: Data: timed_id3 (ID3 / 0x20334449) Metadata: variant_bitrate : 0 Output #0, mp4, to 'out.mp4': Metadata: encoder : Lavf58.76.100 Stream #0:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 60 tbr, 90k tbn, 90k tbc Metadata: variant_bitrate : 0 Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp Metadata: variant_bitrate : 0 Stream mapping: Stream #0:1 -> #0:0 (copy) Stream #0:0 -> #0:1 (copy) Press [q] to stop, [?] for help [hls @ 0x633e19ea3200] Opening 'https://stream.kick.com/ivs/v1/196233775518/hDSBAWziz2jA/2025/5/25/12/56/LrW3TwZUg7Xk/media/hls/1080p60/1921.ts' for reading [hls @ 0x633e19ea3200] Opening 'https://stream.kick.com/ivs/v1/196233775518/hDSBAWziz2jA/2025/5/25/12/56/LrW3TwZUg7Xk/media/hls/1080p60/1922.ts' for reading [https @ 0x633e1a43f9c0] Opening 'https://stream.kick.com/ivs/v1/196233775518/hDSBAWziz2jA/2025/5/25/12/56/LrW3TwZUg7Xk/media/hls/1080p60/1923.ts' for reading [https @ 0x633e1a877300] Opening 'https://stream.kick.com/ivs/v1/196233775518/hDSBAWziz2jA/2025/5/25/12/56/LrW3TwZUg7Xk/media/hls/1080p60/1924.ts' for reading [https @ 0x633e1a43f9c0] Opening 'https://stream.kick.com/ivs/v1/196233775518/hDSBAWziz2jA/2025/5/25/12/56/LrW3TwZUg7Xk/media/hls/1080p60/1925.ts' for reading [https @ 0x633e1a877300] Opening 'https://stream.kick.com/ivs/v1/196233775518/hDSBAWziz2jA/2025/5/25/12/56/LrW3TwZUg7Xk/media/hls/1080p60/1926.ts' for reading ... ... ... [https @ 0x633e1a877300] Opening 'https://stream.kick.com/ivs/v1/196233775518/hDSBAWziz2jA/2025/5/25/12/56/LrW3TwZUg7Xk/media/hls/1080p60/2338.ts' for reading [https @ 0x633e1a43f9c0] Opening 'https://stream.kick.com/ivs/v1/196233775518/hDSBAWziz2jA/2025/5/25/12/56/LrW3TwZUg7Xk/media/hls/1080p60/2339.ts' for reading [https @ 0x633e1a877300] Opening 'https://stream.kick.com/ivs/v1/196233775518/hDSBAWziz2jA/2025/5/25/12/56/LrW3TwZUg7Xk/media/hls/1080p60/2340.ts' for reading frame= 0 fps=0.0 q=-1.0 Lsize= 0kB time=00:00:00.00 bitrate=N/A speed= 0x video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
-
RTSP Client for H264 Audio/Video Stream
10 juin, par Jean-Philippe EncausseI'm looking for a simple way to get data of an IP Camera RTSP Stream (using H264 Audio/Video) and get on the other side
- a frame by frame byte[]
- a stream of the audio
After many research
- EmguCV Capture seems hanging forever (no answer from forum)
- There is many (too big) RTSP Server few decode H264
- There is "slow" ffmpeg wrapper
- There is some managed DirectShow wrapper
So I don't know where to go ? And how to do this ?
It seems iSpyCamera is doing the job but it's a big project not a little library to query ip cameras.