Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
ffmpeg segment doesn't show file size update in real time
9 juillet, par Lucas CardosoI'm trying to run ffmpeg mp3 stream with segmentation for each hour. Everything is working perfectly, except for one thing: when i run the command, the file size doesn't grow in real-time as i need, it only grows in packages of 256k.
Is there a way to turn a "real-time mode"?
I'm using ubuntu 18.04 with ffmpeg 3.4.6
This is the code i'm trying to run on linux terminal:
ffmpeg -i http://radiocentova.conectastm.com:8363/stream -y -acodec libmp3lame -b:a 16k -ac 1 -ar 11025 -vn -strftime 1 -f segment -segment_time 3600 -flush_packets 1 @test_%Y%m%d%H%M%S+00.mp3
-
FFmpeg Not Working on Windows Opens New CMD Window Then Closes [closed]
9 juillet, par D PlusI recently downloaded the FFmpeg binary for Windows. I unzipped it navigated to the bin folder using CMD, and tried to run
ffmpeg -version
But when I do that, instead of showing any output, it opens a new CMD window for a second and then it closes immediately. The original CMD stays empty no errors, no output.I've tried:
- Navigating manually to the bin folder using cd
- Calling .\ffmpeg.exe -version
- Using full path like "C:\path\to\ffmpeg\bin\ffmpeg.exe" -version
- Checking if the .exe file is blocked in Properties (nothing to unblock)
- Redirecting output using ffmpeg -version > output.txt (file is empty)
Still, no luck.
Has anyone experienced this? Any ideas on what I might be missing?
-
ffmpeg rotate filter - how to format in complex filter [closed]
9 juillet, par Giles BradshawI can't get this to work and wondering if anyone could help
command is
ffmpeg -y -i "input/002 David Lynch Music Video.mp4" -filter_complex "[0:v]rotate=-185:ow=rotw(iw,ih):oh=roth(iw,ih):c=black@0[clip_0155_0_d16f34]" -map [clip_0155_0_d16f34] -c:v libx264 -preset veryfast -crf 23 -r 30 -vsync 2 -pix_fmt yuv420p -fflags +genpts -an /tmp/video_montage_si9nw2x2/clip_0155_0_d16f34.mp4
it gives me
[AVFilterGraph @ 0x5557af6a6c80] No such filter: 'ih):oh' Error initializing complex filters. Invalid argument
-
av1 -colorspace bt709 Error reinitializing filters [closed]
9 juillet, par Voxffmpeg 7.1.1 svt-av1 2.3.0 command:
./ffmpeg7 -y -i src.mp4 -c:v libsvtav1 -colorspace bt709 -an -f mp4 out.mp4
src.mp4:
color_range=tv color_space=ycgco color_primaries=bt709 color_transfer=bt709
I get error:
[vf#0:0 @ 0x56391fc13e00] Error reinitializing filters! [vf#0:0 @ 0x56391fc13e00] Task finished with error code: -22 (Invalid argument) [vf#0:0 @ 0x56391fc13e00] Terminating thread with return code -22 (Invalid argument) [vost#0:0/libsvtav1 @ 0x56391fc13fc0] Could not open encoder before EOF [vost#0:0/libsvtav1 @ 0x56391fc13fc0] Task finished with error code: -22 (Invalid argument) [vost#0:0/libsvtav1 @ 0x56391fc13fc0] Terminating thread with return code -22 (Invalid argument) [out#0/mp4 @ 0x56391fbefb40] Nothing was written into output file, because at least one of its streams received no packets.
If I remove
-colorspace bt709
, this works fine.Please someone help me.
-
Can I use t with drawbox to simulate a playhead over a waveform in a generated video ?
9 juillet, par terrorrussia-keeps-killingI want to simulate a playhead moving over a waveform, like when playing a track in an audio editor. As far as I understand, I can generate this effect if I have both the audio file and an image of the waveform.
declare -r DURATION=$(ffprobe -i audio.flac -show_entries format=duration -v quiet -of csv="p=0") ffmpeg -hide_banner -loop 1 -framerate 30 -i waveform.png -i audio.flac \ -filter_complex " drawtext=text='%{pts\\:hms} -- %{n} -- %{pts\\:flt}':x=32:y=32:fontsize=24:fontcolor=black@0.75:box=1, drawbox=x=t*${DURATION}/iw/10000000:y=0:w=16:h=ih:color=CC1144@0.5:t=fill " \ -map 1:a -shortest -t 5 -pix_fmt yuv420p playhead.mp4
What it does:
- Retrieves the duration of
audio.flac
. - Generates a video using
waveform.png
as a static background andaudio.flac
as the audio track. Usingdrawtext
, I overlay time information on the video, and withdrawbox
I attempt to render the moving playhead. (For quicker testing, I limit the video to the first 5 seconds.)
Note that I divide
t
by 10000000 just to make the box appear at all (otherwise it seems to be so big that it cannot fit the viewport). For whatever reason the box remains static, and I don't think thatt
even changes.What detail am I missing, and how can I at least obtain the value of
t
(for debug), so I can make the box move in sync with the current timestamp? - Retrieves the duration of