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
73
votes
9answers
59k views

How to grep standard error stream (stderr)?

I am using ffmpeg to get the meta info of an audio clip. But I am unable to grep it. $ ffmpeg -i 01-Daemon.mp3 |grep -i Duration FFmpeg version SVN-r15261, Copyright (c) 2000-2008 Fabrice ...
37
votes
4answers
49k views

Merge two video clips into one, placing them next to each other

I have two video clips. Both are 640x480 and last 10 minutes. One contains background audio, the other one a singing actor. I would like to create a single 10 minute video clip measuring 1280x480 (in ...
23
votes
2answers
12k views

Strange errors when using ffmpeg in a loop

I have a bash script looping through the results of a find and performing an ffmpeg encoding of some FLV files. Whilst the script is running the ffmpeg output seems to be interupted and is outputting ...
22
votes
5answers
21k views

How do I merge two *.avi files into one

I have two *.avi files: sequence1.avi sequence2.avi How do I merge these two files using a command-line or GUI?
25
votes
2answers
29k views

Trim audio file using start and stop times

I have an FFmpeg command to trim audio: ffmpeg -ss 01:43:46 -t 00:00:44.30 -i input.mp3 output.mp3 The problem I have with this command is that option -t requires a duration (in seconds) from 01:43:...
1
vote
1answer
4k views

How to pipe the output ffmpeg?

I'd like to use the output of ffmpeg in order to encrypt the video with openssl: I tried to use name pipe without sucess. With the command: mkfifo myfifo ffmpeg -f alsa -ac 2 -i plughw:0,0 -f ...
187
votes
8answers
267k views

How can I reduce a video's size with ffmpeg?

How can I use ffmpeg to reduce the size of a video by lowering the quality (as minimally as possible, naturally, but I need it to run on a mobile device that doesn't have much available space)? I ...
27
votes
5answers
20k views

How to get near-perfect screen recording quality?

Someone suggested I direct a copy of the unmodified X display to a file and afterwards convert that file to a general purpose video file. What commands would I use to do this on a Kubuntu system? (...
5
votes
1answer
20k views

FFmpeg - Split video multiple parts

I read the following thread, and the solution works if I want to split a video into pieces every two minutes: Split video file into pieces with ffmpeg The problem is that I want to split a video into ...
12
votes
3answers
7k views

How to record my full screen with audio?

If I want to record my desktop, I use: ffmpeg -f x11grab -s `xdpyinfo | grep -i dimensions: | sed 's/[^0-9]*pixels.*(.*).*//' | sed 's/[^0-9x]*//'` -r 25 -i :0.0 -sameq valami.avi But it doesn't ...
11
votes
2answers
31k views

How get the best quality when converting from mp4 to avi with ffmpeg?

When I use this, the quality doesn't look bad. ffmpeg -same_quant -i video.mp4 video.avi In the ffmpeg documentation is written: "Note that this is NOT SAME QUALITY. Do not use this option unless ...
10
votes
3answers
15k views

Play subtitles automatically with mpv

Subtitle files come in a variety of formats, from .srt to .sub to .ass and so on and so forth. Is there a way to tell mpv to search for subtitle files alongwith the media files and if it does to start ...
5
votes
1answer
7k views

Split video file into pieces with ffmpeg

When you want to extract two minutes of a video file from minute 2 to minute 4, you will use command ffmpeg -i input.mpg -sameq -ss 00:02:00 -t 00:02:00 output.mpg I'd like to split the video into ...
4
votes
1answer
2k views

Anyone gotten the switch '-segment_times' working with ffmpeg?

While searching through U&L I noticed a fair amount of questions asking how to script the generation of ffmpeg command lines like these: ffmpeg -i video.mp4 -ss 00:00:00 -t 00:10:00 -c copy 01....
3
votes
1answer
1k views

CUDA Context for NVENC not found after system suspend

Context I recently updated my nVidia drivers to 375.26 and recompiled FFmpeg N-83180-gcf3affa and OBS 17.0.2-5-g43e4a2e (sorry if these numbers don't mean anything, I'm not quite sure what version ...
7
votes
3answers
8k views

How to check if a video is completely downloaded?

I have a bunch of videos which I want to check if they are complete or not. Some of them may be downloaded partially, but they are not faulty. How can I efficiently check if these video are completely ...
3
votes
1answer
3k views

ffmpeg: error while loading shared libraries: libtheoraenc.so.1

When I want to run ffmpeg I get the following error: ffmpeg: error while loading shared libraries: libtheoraenc.so.1: cannot open shared object file: No such file or directory This is output of ls \...
3
votes
1answer
431 views

How to stream a local video to webcam using ffmpeg?

I have a local video and I want to stream it to a dummy webcam video device from v4l2loopback. I created the dummy device at /dev/video1. How to use ffmpeg to steam that local video trial_video.mp4 to ...
2
votes
1answer
5k views

ffmpeg and libmp3lame produces bad audio quality?

when I get a flash video from YouTube, why is the quality of the audio much worse than the origin video on YouTube? When I downloaded the flash movie, I convert it to avi like this: ffmpeg -i ~/"$...
1
vote
1answer
121 views

How can I edit my bash script to account for whitespace entries? [duplicate]

I made a script to automate ffmpeg conversion from mkv > m4v > open the m4v in Subler.app to import the metadata manually, at which point I'll move the file into my iTunes library. I use iTunes ...
4
votes
2answers
11k views

Save find -exec output to text file

I have a set of videos in the folder. I would like to get the info about this videos using ffmpeg -i command and save the output to file. So I wrote the line: find . -type f -exec ffmpeg -i {} \; &...
3
votes
2answers
100 views

How to transition smoothly and repeatedly between two videos using command line tools?

I want to output a video using two videos as input, where these two videos fade (or dissolve) into each other in a smooth and repetitive manner, every second or so. I'm assuming a combination of ...
3
votes
1answer
2k views

How to use sox or ffmpeg to detect silence intervals in a long audio file and replace them by zeros (aka suppress background noise)?

I have a long audio file that was created by concatenating many short files. I would like to detect silence between the speech segments (just a threshold is enough for my purposes) and replace them by ...
2
votes
0answers
2k views

Rotating a video (ubuntu 12.04)

I have a video, shot on my android phone, which I want to rotate 90 degrees clockwise for computer viewing. Here's what I expect should work: ffmpeg -i infile.mp4 -vf "transpose=1" -an -vcodec mpeg4 ...
2
votes
1answer
3k views

Split a video to multiple chunks according to multiple starting and ending frame indices

Are there any tools (like FFmpeg or OpenCV) can split a video into multiple chunks according to some specific starting and ending frame indices? For example, given (0,20),(21,33),(40,60)..., each ...
2
votes
1answer
4k views

how to convert MOD video file without loosing quality to modern popular format for TV

I have MOD video file. My LG TV doesn't support MOD. How can I convert MOD video file without loosing quality to modern video format to watch it on different modern TVs?
2
votes
1answer
1k views

How to read a webcam that is already used by a background capture?

A ffmpeg webcam capture is running in the background. ffmpeg -f video4linux2 -s vga -i /dev/video0 capture.mp4 (1) I am therefore unable to read it with ffplay since the device /dev/video0 is ...
1
vote
1answer
2k views

FFMpeg : GIF to MP4 conversion throws code error.

I am trying to convert a GIF to a MP4. I am getting an error while doing that with specific parameters. What am I doing wrong? Any help would be nice. I would like a mp4 video with high quality, size ...
1
vote
1answer
244 views

find command fails in jenkins, but not in terminal

I want to export all frames from a lot of video files, automatically in a jenkins build job using ffmpeg. This script is running fine when I ssh into the slave and execute it in the same folder: ...
0
votes
1answer
306 views

error while configuring FFmpeg in CentOS: Segmentation fault & gcc is unable to create an executable file

I am trying to compile FFmpeg in CentOS from source code. I referenced the official compilation guide (https://trac.ffmpeg.org/wiki/CompilationGuide/Centos) for CentOS step by step, and have installed ...