Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [ffmpeg]

`ffmpeg` is a free software project aimed at producing tools (libraries and programs) for handling multimedia data.

Filter by
Sorted by
Tagged with
0 votes
0 answers
16 views

To make 'trim' and 'atrim' work synchronously

The following command trims a video using the trim video filter: ffmpeg -y -i input.mp4 -vf "trim='00\:00\:05':'00\:00\:10',setpts=PTS-STARTPTS" output.mp4 But if the video also contains ...
jsx97's user avatar
  • 71
2 votes
1 answer
62 views

FFmpeg: To trim a video using 'trim' and specify time using HH:MM:SS format

FFmpeg 7.0.1. I want to understand whether it is possible to trim a video using trim and to specify start and end time using the HH:MM:SS format instead of just seconds. That is, the following command ...
jsx97's user avatar
  • 71
0 votes
1 answer
33 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 ...
jsx97's user avatar
  • 71
0 votes
1 answer
64 views

Trimming a video using FFmpeg leads to black screen

I try to figure out how to use FFmpeg to trim videos. I have created a 30 second .mov screen capture using Apple's QuickTime player, and then tried to trim it using three different ways: Using -...
jsx97's user avatar
  • 71
0 votes
0 answers
27 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=$( ...
Richard Barraclough's user avatar
0 votes
0 answers
28 views

Behavior of ffmpeg when recording a stream and then network does not work for a while

I think it would be good, if ffmpeg would exit with error, if it finds out that network is not working and it thus can not record the given URL. But in my experience it just leaves there and can not ...
jarno's user avatar
  • 640
1 vote
1 answer
22 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 ...
Dmitry Grigoryev's user avatar
0 votes
1 answer
34 views

Fast test for audio file bitrate

I'm trying to identify files with high/low bitrate in my audio collection using a shell script. Doing file test.mp3 is very fast: $time file test.mp3 test.mp3: Audio file with ID3 version 2.3.0, ...
Dmitry Grigoryev's user avatar
1 vote
1 answer
65 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 &&...
Борат Сагдиев's user avatar
1 vote
0 answers
35 views

Can I Store the Output of FFmpeg to a Different PC?

I have a question about storing the output of a screen recording using FFmpeg. Currently, I want to use the: ffmpeg -video_size 1024x768 -framerate 25 -f x11grab -i :0.0 output.mp4 command to grab a ...
Justin's user avatar
  • 11
0 votes
1 answer
268 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
xralf's user avatar
  • 15.2k
0 votes
0 answers
33 views

Passing video from v4l2loopback to v4l2src (edgetpuvision) using netcat

I am trying to use webcam from a tablet as stream source for TensorFlow Model on Coral Dev Board. My idea is to pass the stream from the tablet using netcat: ffmpeg -i /dev/video0 -filter:v fps=30 -f ...
Radek Suski's user avatar
0 votes
0 answers
89 views

How to limit FFmpeg bitrate while recording an RTSP stream with codec copy?

I am trying to record a short video from an RTSP stream using FFmpeg.  And I am facing the following problem: the video size is too large.  Using the command ffmpeg -i file.mp4, I've come to the ...
bram's user avatar
  • 1
1 vote
0 answers
315 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 ...
Abdulla Masud's user avatar
0 votes
1 answer
1k views

ffmpeg: error while loading shared libraries: libavdevice.so.58: cannot open shared object file: Error 74

Since today when I run ffmpeg I have the error in the title of this question. I tried this, but can't apply the solution because I have a directory /etc/ld.so.conf.d and in that directory there are ...
xralf's user avatar
  • 15.2k
1 vote
0 answers
317 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 \ ...
Jan Černý's user avatar
  • 1,441
-1 votes
1 answer
112 views

Flag parameter in bash script misunderstood as file , “no such file or directory"

I’m writing a simple bash script named video2png, using the ffmpeg to turn certain frame of a video into png: #!/bin/bash ffmpeg -ss 30:00 -i "$1" -frames 1 -s 1280x880 -f image2 "$2&...
Wu Eureka's user avatar
0 votes
1 answer
61 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 ...
frumbert's user avatar
  • 125
0 votes
1 answer
88 views

Use `xautolock` to run script which captures image with `ffmpeg` after unlocking

I'm using i3wm and I want a script to run after I've unlocked my screen. I can get this to work when I manually lock my screen, e.g. using the steps outlined in this post. But I can't get this to work ...
nonreligious's user avatar
0 votes
1 answer
88 views

Linux I/O issue? Multiple FFMPEG saving streams as HLS, lose segments despite low CPU and Memory consumption

I'm capturing an RTMP stream as HLS (saving playlist files) using FFMPEG wihout any stream processing, merely copying it. Thanks to such setup I'm able to run tens of processes (I've tried 80 at most),...
Yyyeey's user avatar
  • 1
0 votes
0 answers
126 views

grep the output of FFmpeg

I can use grep to manipulate the output of all applications i use (or do something with sed or other tools). This doesn't work with FFmpeg. This is the output when i convert an audio file: ffmpeg ...
fmeier's user avatar
  • 331
0 votes
1 answer
28 views

ffmpeg inside while loop with find unintentionally alters iteration variable

Can someone please explain to me what is happening here? This is what I have reduced my situation down to: # make 20 test gifs out of the same source file. for i in {1..20}; do cp -p ../some-random-...
WoodrowShigeru's user avatar
0 votes
0 answers
111 views

ffmpeg fails to read m2ts files from libaacs

I have a bluray disc that I am attempting to convert on Manjaro Linux using libbluray and libaacs. AACS handled shows "yes". Additionally, VLC plays the bluray with no problem. but when I ...
Steve's user avatar
  • 21
0 votes
0 answers
347 views

mpv fails to play youtube videos

I've been using mpv for a while, but now whenever I try to play a youtube video the following output shows up: [ffmpeg] https: HTTP error 403 Forbidden Failed to open https://rr5. . . EDL: Could not ...
Ash's user avatar
  • 145
0 votes
0 answers
374 views

ffmpeg redirect stdout and stderr to each file and both to another in correct order

Running a simple ffmpeg command: ffmpeg -i in.avi out.mp4 -loglevel info I want the following result: stdout to both stdout.log and both.log stderr to both stderr.log and both.log The important thing ...
Smeterlink's user avatar
0 votes
0 answers
167 views

ISO Media Videos thumbnails not showing in pop_os 22.04 LTS

all videos that are ISO media doesn't have thumbnails. I have tried the solutions here, but it didn't work (EDIT: im a noob, so its possibly those didnt work because im using pop_os distro, and those ...
S SS's user avatar
  • 1
0 votes
2 answers
553 views

Batch convert flac to ogg with ffmpeg

I'm trying to turn this command into one that will convert a whole directory from flac to ogg: ffmpeg -i musicfile.flac musicfile.ogg I've read through the man page. But honestly it's a bit over my ...
h8uthemost's user avatar
0 votes
0 answers
194 views

Referencing ffmpeg dependencies for PyAV installation

I need to install PyAV for loading and using videos as input (as a Tensor) to a pytorch model. When I try to install the package in my virtual environment I get the following build error: Collecting ...
ptushev's user avatar
0 votes
1 answer
290 views

Capture screen using FFMPEG on a headless VPS

I need a solution to run a graphical application on a Ubuntu VPS and capture the screen using FFMPEG software. the steps I tried already: ###Create a virtual desktop Xvfb :1 -screen 0 1920x1080x24 ## ...
Audrius's user avatar
  • 101
1 vote
0 answers
30 views

How to have the subtitles occupy full screen for an ogg audio file with an srt subtitles files converted into an mp4 video file?

I can embed an mp4 file from an ogg file with embedded subtitles from an srt file alright, thanks to stack*** forums and other internet resources, in two steps: First create a black png file for ...
Rajibando's user avatar
0 votes
1 answer
169 views

Stacking two videos with a precise time offset

I'm trying to use FFmpeg to produce a stereoscopic side-by-side video (Full 3D SBS) from a left-right pair of videos. If the two source videos were perfectly in sync, I could use: ffmpeg -i left.mp4 -...
rgov's user avatar
  • 253
0 votes
1 answer
47 views

How to prevent messages from clogging terminal?

Recently, I have been programming a small game to run in the Linux Terminal. The game involves running an MP3 file from the terminal. However, when this runs using FFMPEG, it sends messages into the ...
CookedTurtle's user avatar
0 votes
0 answers
132 views

what's the fastest way of writing data to ffmpeg for video streams?

I'm live streaming my x11 screen to a v4l2 webcam device (/dev/video0) with FFmpeg through stdin : ffmpeg -re -probesize 32 -analyzeduration 0 -i pipe:0 -s 1280x720 -vf scale=1280:720 -preset veryfast ...
Hackermon's user avatar
  • 101
1 vote
1 answer
488 views

How to remove unneeded languages from video files using ffmpeg?

I have a number of video files (500+) with lots of audio and subtitle streams for languages that I don't need and would thus like to remove to conserve storage space. I tinkered around with ffmpeg, ...
KTorrentNG's user avatar
0 votes
1 answer
260 views

How to copy all FLAC tags using ffmpeg?

I'm using ffmpeg to perform audio filtering on my music library. However, it is not copying all FLAC tags (in particular, it's dropping chapter information). Copy all tags from one FLAC file to ...
Matthew's user avatar
  • 159
0 votes
1 answer
110 views

Chromium cannot read camera: Dequeued v4l2 buffer contains invalid length #561

I installed the v4l2loopback kernel module on my machine and enabled it with sudo modprobe v4l2loopback exclusive_caps=1. I created a camera on /dev/video0 with the rust bindings and started piping a ...
Hackermon's user avatar
  • 101
0 votes
1 answer
399 views

FFMPEG converting FLAC to OPUS with cover image

I got a gigantonormic script to convert my FLACs to OPUS files but I'm struggling with one specific issue. When converting and trying to copy the cover image, it throws an error. Preamble, this is the ...
LukeChriswalker's user avatar
0 votes
0 answers
157 views

High CPU usage from ffmpeg decoding rtsp to v4l2loopback

I got a orangepi5 that has hardware decoders for h264,hevc and other formats. I am using armibian Armbian 23.5.5 Jammy CLI kernel legacy 5.10.160. I've installed a custom ffmpeg that uses RockChip MPP ...
imbr's user avatar
  • 103
1 vote
1 answer
53 views

How to extend sustain in batch wav files?

I have a batch of sound samples which are too short (2.15 sec), and I want to extend the sustain to a total of about 10 seconds, meaning stretch the last 0.50 second of the file to 10 seconds. I can ...
black-clover's user avatar
0 votes
1 answer
338 views

Internal Data Stream Error Reading v4l2 Virtual Cameras with Gstreamer Pipeline

I'm using v4l2loopback to create 2 virtual cameras that I can then stream an mp4 into and simultaneously read from those cameras with a gstreamer pipeline as if the mp4 was the video being recorded by ...
dan178's user avatar
  • 113
1 vote
0 answers
378 views

ffmpeg doesn't record RTSP stream

I'm trying to record RTSP stream from Dahua IP camera which is located on 10.10.10.10 (for example purpose), on Windows it works well and on previous ubuntu version I had (18) it was also working well....
zcoderx's user avatar
  • 11
1 vote
1 answer
210 views

Create a file for writing with controlled flushing to disk in large chunks

On Linux I have a process (ffmpeg) that writes very slowly (even slower than 1kb / s sometimes) to disk. Ffmpeg can buffer this to 256kb chunks that get written infrequently but ffmpeg hangs ...
Pete's user avatar
  • 133
7 votes
1 answer
689 views

ffmpeg: record screen area selected by mouse

I have found a ffmpeg command to record area of my screen: ffmpeg -video_size 2000x1600 -framerate 25 -f x11grab -i :0.0+2140,280 output.mp4 But to find the correct area, I had to do multiple trial/...
Martin Vegter's user avatar
0 votes
1 answer
472 views

Recursively fix corrupted video files with ffmpeg

I think I'm pretty close to having a code which will start at a directory, then spit out a fixed copy, using fd (instead of find) and ffmpeg. I have written the if statement here as psudo-code: for i ...
1toneboy's user avatar
  • 441
3 votes
2 answers
666 views

How to watch video while still downloading including audio?

If I download a video using youtube-downloader I can watch the part file while downloading (in my case using mpv). Suppose I cannot or don't want to select a format containing both video and audio ...
student's user avatar
  • 18.5k
0 votes
0 answers
240 views

Using ALSA with dmix and multi plugins together for recording

I'm trying to set up ALSA for recording some videos with ffmpeg, so I need to both hear the application sound and be able to record it (I actually probably need to record 1 specific application). ...
chimjim126's user avatar
0 votes
0 answers
163 views

V4L buffer doesn't get cleaned properly

I've been trying to write a c program to capture photos from a uvc camera using v4l. I've managed to gt it to work for the most part but every second time i run the program i get a zero-filled yuv ...
Hristos's user avatar
3 votes
0 answers
786 views

How to record audio device with more than 2 channels using SoX?

I have multiple USB audio interfaces that each have 10, 18 or even 32 input channels. Mainly used to record every instrument of a band into a separate track. I record in raw wav format (s32le @48kHz) ...
Forivin's user avatar
  • 907
1 vote
0 answers
200 views

ffmpeg: Get video that contains only every 30th frame and which plays at 30x the original speed

I am trying to use ffmpeg to extract every 30th frame from a video stream. For this, I have consulted all of https://superuser.com/questions/573747/drop-every-even-or-odd-frames-using-ffmpeg How to ...
performancematters's user avatar
0 votes
0 answers
291 views

Change the fingerprint of a video file with ffmpeg without re encoding it

I am searching for a way to edit a video file to not have the same fingerprint anymore. It should not have a high CPU impact and all the tracks of the original file should be copied (so it needs map 0)...
Leon D's user avatar
  • 136

1
2 3 4 5
14