Questions tagged [ffmpeg]
`ffmpeg` is a free software project aimed at producing tools (libraries and programs) for handling multimedia data.
685 questions
0
votes
0
answers
22
views
How does hardware accelaration (e.g. VA-API) work internally so that it does not work with ffmpeg filters but ok with icc-profiles?
Recently I've used mpv with set icc-profile and it worked with hwdec=auto-safe setting. Then I've tried to change colors via set vf colorchannelmixer but got an error "Impossible to convert ...
0
votes
1
answer
70
views
ffmpeg/audio: realtime read, pipe into stdout and archive+encode segmented files on disk
I work with audio and I want to write a python script which:
runs a single ffmpeg process (preference, not hard requirement)
ffmpeg process reads from a mic in real time, applies automatic gain (...
0
votes
0
answers
262
views
What is the quality level option for ffmpeg VAAPI encode with AV1?
It's really fast to use hardware acceleration to encode video using ffmpeg.
I successfully did it today, however, I don't know how to configure the so-called quality level.
I ran this command:
ffmpeg \...
1
vote
2
answers
70
views
Ffmpeg generate fixed binary digit filename pattern
Suppose I have filenames like these 4-bit patterns:
0000.ts
0001.ts
...
1111.ts
Basically, that file was generated from an RTSP stream that chunks every second. So, for each binary number ...
0
votes
0
answers
56
views
Why must I use scale_vaapi with kmsgrab, but hwupload with x11grab when using vaapi with ffmpeg?
I am wondering why, when using vaapi with ffmpeg, if I use x11grab I must use -vf format=nv12,hwupload but with kmsgrab I must use -vf scale_vaapi=format=nv12 instead.
In particular I want to know 2 ...
0
votes
2
answers
397
views
How to merge Audio and Video file into one
all. Hope you guys are doing well.
I have downloaded a 28min mp4 from a site but its audio and video got downloaded into 2 separate mp4 file both of 28min. Now how can I merge them?
Thanks in advance
...
0
votes
0
answers
38
views
How can I grep the output of ffprobe? [duplicate]
I'd like to only see those lines containing "Stream #" from an ffprobe output. But whatever I do, it continues to show the whole output. Neither "|" nor ">" pipes work....
0
votes
0
answers
70
views
Why are quotation marks and backslashes not working as expected in variables? [duplicate]
I'm trying to pass a command through to ffmpeg, but I'm struggling to get it to work with spaces in the name.
I've tried this:
filters="-vf subtitles='$filename.$format':force_style=Fontsize=24&...
0
votes
0
answers
68
views
FFmpeg not detecting input streams for RTMP live recording
getting this type of error
Opening an output file: rtmp://localhost:1935/live/stream.
FFmpeg stderr: [out#0/flv @ 0x600003b843c0] No explicit maps, mapping streams automatically...
FFmpeg stderr: ...
2
votes
1
answer
147
views
Does adding silence to a flac with an ffmpeg filter result in any quality loss?
I'm attempting to add a few seconds of silence to the end of several flac audio files. One recommended method is:
# ffmpeg -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=48000 -t 5 silence....
2
votes
2
answers
926
views
How can I convert an animated gif to indivual frames and then back again to animated gif?
I want to manually modify an animated gif. So I'm trying to convert it to individual (editable) frames, after which I can draw my modification and then re-assemble the frames.
First I convert a 31 ...
0
votes
1
answer
104
views
Correctly drop one field instead of deinterlacing in ffmpeg
So, I have a 1920x1080 interlaced video recording. I want to recode using ffmpeg to procuce a 960x540 non-interlaced video. And ideally I'd like to avoid deinterlacing - instead I just want to drop ...
0
votes
0
answers
33
views
Hit noise when playing part of wave file with ALSA PCM interface
I am working a WAVE file playing with ALSA PCM interface in Linux, and I heard noise when I played the file quickly and partially.
Here is my playing function.
static int playback_function(uint8_t *...
0
votes
1
answer
68
views
audio to video with ffmpeg
I would like to know if it is possible to combine video with audio using ffmpeg batch converter but the video should end when the audio sound ends. Does anyone know how to do this?
0
votes
1
answer
981
views
yt-dlp -- how to add ffmpeg conversion after download
I'm using a rather long yt-dlp command to download and convert the downloaded files into mp4 format. However, the resulting mp4 files sometimes cause problems. That's why I would like to add a ffmpeg ...
0
votes
1
answer
3k
views
How to convert Opus audio file to mp3 with maximum quality use FFmpeg?
How to convert Opus audio file to mp3 with maximum quality use FFmpeg? Linux.
Source audio file is Opus, stereo 48 kHz, 138 kbps, Bits per sample:32
I used
ffmpeg -i audio.opus -c:a libmp3lame -q:a 0 ...
1
vote
1
answer
127
views
inotifywait to convert (ffmpeg) multiple files
I want to automatize a job, i.e. the conversion of videos (taken by mobile phones) with ffmpeg on my nextcloud server. The bashscript I run manually runs fine:
#!/bin/bash
for i in *.3gp *.avi *.m4v *...
0
votes
1
answer
50
views
FFmpeg: The option 'to' works differently depending on where we put it. Why is it so?
Could anybody explain, why
ffmpeg -i input.mov -ss 00:00:10 -to 00:00:15 output1.mov
produces a 5-second video, from second 10 to second 15, whereas
ffmpeg -ss 00:00:10 -i input.mov -to 00:00:15 ...
0
votes
0
answers
29
views
ffmpeg causes do loop to exit after first iteration [duplicate]
I have this loop to find mp4 files that I want to convert to webm.
find "./$1" -type f -iname "*.mp4" | while IFS== read -r f; do
echo "found: $f"
fn=$( ...
1
vote
1
answer
183
views
How to extract song lyrics from an m4a subtitle stream?
I have these .m4a files for which ffprobe (on Debian 12.1) reports:
Stream #0:1[0x2](eng): Data: bin_data (text / 0x74786574), 0 kb/s
Metadata:
handler_name : SubtitleHandler
...
1
vote
1
answer
510
views
FFPLAY - loop sound until signal received
I have a bash script which starts ffplay in background, looping a short sound sample indefinitely. Then it does some other work, and finally it kills ffplay.
foo() {
ffplay -loop 0 sound.wav &&...
0
votes
1
answer
1k
views
Convert swf files to mp4
I came accross this nice web. There are swf and mp3 files.
I'd like to convert them to mp4 or something, so it is viewable.
I tried gnash and ffmpeg without success.
I'm on Lubuntu 22.04
1
vote
0
answers
2k
views
How to get proper ffplay output with UVC camera?
My end goal is to use a UVC webcam with esp32 or Raspberry PI. I was hoping to learn while doing some fun projects.
I have an old UVC webcam (Creative model ct6840) but I can't seem to get it to work ...
1
vote
0
answers
1k
views
FFMPEG: Impossible to convert between the formats supported by the filter 'graph 0 input from stream 1:0' and the filter 'auto_scale_0'
this my ffmpeg call in script:
ffmpeg -hwaccel vaapi -hwaccel_output_format vaapi -vaapi_device /dev/dri/renderD128 \
-i "_$v" -i /home/john/Web/blackblog/_meta/graphics/watermark.png \
...
0
votes
1
answer
179
views
How to detect if a process runs longer than X seconds, then do something with it?
I’m on debian.
I am calling a ffmpeg process to generate a mp3. this gets called from a php script using shell_exec. This works fine 99% of the time.
Sometimes, the ffmpeg process doesn’t exit and I’m ...