Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [ffmpeg]

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

1
vote
1answer
31 views

How to randomly sample a subset of a song on command line

From the command line, I'd like to play a audio clip, or random subset of a song, eg, seconds 5 - 10. This does not seem to be a feature of paplay or mpg123, the two programs I've been using. ffmpeg ...
0
votes
0answers
17 views

Force stream order in ffmpeg (via mpv)

What is the preferred way to force ffmpeg (via mpv) to order the streams with video first and audio second? Wrong stream order can result in playback problems or certain sites rejecting the webm for ...
-1
votes
1answer
27 views

Accelerating Video Conversion

I like to compress large video files before storing them to hard disk. In Fedora-29-bash, I currently use the following ffmpeg command for re-encoding; it balances compression with quality: ffmpeg -...
0
votes
1answer
20 views

How to embed current time with ffmpeg?

I'm using ffmpeg combined with tee and mplayer to have a simple video livestream and recorder over SSH. Now, I'd love to embed the current (server) time in the stream. The format doesn't matter much, ...
0
votes
0answers
66 views

ffmpeg black screen recording

When I record my desktop or recording video with ffmpeg it generates a black video. My operating system is Ubuntu 18:04 bionic kernel 4.16 Here is the command I'm using : ffmpeg -f x11grab -s ...
0
votes
1answer
50 views

error ffmpeg Cannot open display :0.0+0,0, error 1. :0.0+0,0: Input/output error

Hello I get this error when i want to capture my screen on linux with ffmpeg ubuntu 16:04 : the command i'am using : $ ffmpeg -f x11grab -r 15 -s 1920x1080 -i :0.0+0,0 -vcodec rawvideo -pix_fmt ...
0
votes
1answer
28 views

ffmpeg - how to split a .aac audio-file into small parts, exactly 4.00 seconds in size (so ignoring keyframes)

How can I split the audio file .aac into small parts of exactly 4.0 seconds, ie. with ignoring keyframes? The original video file was in .mp4 format. From this video file I got an .aac audio file. ...
0
votes
1answer
45 views

Creating a for loop with find -exec and while

I am trying to make this script that loops through video files created between hours 00 and 12, convert them with ffmpeg and then remove them. The script works in terms of finding the files and ...
0
votes
0answers
38 views

RTSP via ffmpeg

I have 4 noname ip-cams and have troubles with capturing rtsp streams. Randomly output file not even created. I'm capturing stream via ffmpeg. Tried on Ubuntu Server 18.04 with snap ffmpeg and Debian ...
0
votes
0answers
18 views

FFmpeg: Record Camera IP with pcm_alaw into mp4 containter (only .ts works)

i'm trying to record my camera ip with ffmpeg but since it has a (damn) pcm_alaw audio codec it cant be recorded straight into mp4 container - or am i wrong? But looks like when i record stream into ....
0
votes
0answers
33 views

Bash - find certain files and remux with ffmpeg then delete the old one

i just would like to use this command: for i in *.ts; do ffmpeg -i "$i" -c:a aac -b:a 128k -c:v copy -crf 20 "${i%.ts}.mp4"; done but only for a specific files like: above 350 000KB size or created ...
1
vote
0answers
37 views

How to modify blended video durations with a -filter_complex command argument in ffmpeg

Building off the solution provided in this thread, I'd like to know how to make simple modifications to a complex command argument which uses ffmpeg to interweave two videos by dissolving them into ...
0
votes
1answer
59 views

ffmpeg snap package error in Debian 9: libGL error: unable to load driver: r600_dri.so

I am using Debian 9 with an older Radeon GPU (5450). I am interested in using the snap package of ffmpeg (which is version 4.1) because of some issues I may be able to fix with the newer snap instead ...
0
votes
0answers
31 views

How do I extract only certain parts of ffmpeg's standard output as it processes a file?

I want to enter a command that only shows these two lines of ffmpeg's output and I want to see it as it processes a file: from 'input_file.mkv': frame=172534 fps=4622 q=-1.0 Lsize= 8319963kB time=01:...
0
votes
0answers
23 views

convert two channels into a single channel left or right with ffmpeg

I have some .wav files and I would like to convert their frequency (fs) and number of channels (nchannels). I am using ffmpeg on a jupyter notebook, python3.6 but using linux command line with a ...
1
vote
1answer
46 views

How to extract the “stored frames” without rely on fps?

I noticed if I extract frames with this command: ffmpeg -i sample_nosound.mp4 $filename%03d.jpg It will extract depends on fps by default. ffmpeg -i sample_nosound.mp4 shows this video has 6 fps, so ...
0
votes
1answer
73 views

ffmpeg permissions trouble

Try to capture RTSP stream with ffmpeg. Everything goes nice, if I save video to my home folder. Can't save to another directory. ffmpeg says 'Permission denied' even directory premission is 777. In ...
0
votes
1answer
71 views

Convert all video files in a folder to images per frame using ffmpeg iteratively

I use ffmpeg -i FILE_NAME -vf fps=1/1 FILE_NAME%05d.jpg -hide_banner to convert a single file to several images which keep the file name followed by 5 zeros, a counter and then ends with a .jpg. How ...
0
votes
2answers
75 views

How to highlight terms in an output that has a live update?

I'm doing a loop over ffmpeg to convert a bunch of videos, and I would like to highlight some terms in ffmpeg's output. But the solution I tried always made the live progress of the conversion ...
0
votes
2answers
159 views

ffmpeg: filenames with spaces from bash script

I have composed the following bash script to automatically concatenate mp3 files using ffmpeg: i=0 for f in "${@:2}" do filter+="[$i:a:0]" i=`expr $i + 1` files+="-i $f " done ...
0
votes
0answers
46 views

Compress specific frames of a video using ffmpeg

I'm trying to compress a range of frame from a video, is it possible to do it using ffmpeg?, I mean, I want to compress from frame 100 to frame 300. I use this command to compress. ffmpeg -i ...
0
votes
1answer
42 views

Can't Run xvfb @ 16:9 on MATROX MGA-G200

Capturing server screen configured as follow, the screen capture occurs but the ratio captured is not 16:9, is that due to video card ? Did : cvt 1920 1080 60 xrandr --newmode "1920x1080_60.00" ...
3
votes
2answers
74 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 ...
0
votes
0answers
55 views

Using ffmpeg to split an Audible audio-book into chapters?

I've been following this answer to use ffmpeg to convert and play some of my Audible audio-books in LinuxMint. Each book is a single source-file, but I've noticed that ffmpeg lists all the chapters ...
0
votes
1answer
111 views

LD cannot find lib even with specified path

What I've tried: gcc -L/path/to/lib/ -llib ... gcc -l/path/to/lib/lib.so.x.x.x ... Update ldconfig Added path to LD_LIBRARY_PATH file shows correct build version and link to the correct file No ...
1
vote
0answers
78 views

Specify alsa device name or aloop for system ouput audio to be used as input in ffmpeg command

I am using Debian 9 with its version of ffmpeg. This is my ffmpeg command I use to screen record: ffmpeg -thread_queue_size 4096 -f alsa -i plughw:CARD=Device,DEV=0 -thread_queue_size 4096 \ -f alsa -...
1
vote
0answers
15 views

Suitable parameters for hours of screen capture

I need suitable parameters for very, very long screen captures using ffmpeg. Quality: Only occasionally needed. If text is readable, that's enough usually. I can use -qscale:v *[0-32]*, of which ...
0
votes
1answer
84 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: ...
1
vote
1answer
2k views

How to recover a broken mp4 file: moov atom not found

I made a recording with ffmpeg -f alsa -ac 2 -i plughw:0,0 /tmp/audio.mp4 I then moved /tmp/audio.mp4 to another directory (/root/audio.mp4) without stopping ffmpeg leading to a broken .mp4 file: ...
0
votes
0answers
80 views

using ffmpeg instead of avconv

i have 2 bash scripts wich i am trying to use which require avconv when i run the scripts i get the error bash: avconv: command not found but since i dont know where to find avconv in either pacman ...
0
votes
0answers
46 views

Ffmpeg volume detection

I know that ffmpeg has volume detection functionality. Now I'm searching for a way to capture microphone audio and listen constantly without saving any files if there is a volume below my threshold. ...
0
votes
0answers
52 views

FFmpeg fails to record full screen on Linux(Devuan derivative)

Using FFmpeg on Devuan derivative: I have been struggling to record desktop with ffmpeg, below are my attempts so far. Script 1 ffmpeg -f x11grab -i :0.0 -vcodec libx264 -pix_fmt yuv420p -loglevel ...
4
votes
1answer
283 views

record screen and internal audio with ffmpeg

What is the ffmpeg command to record screen and internal audio (on Ubuntu 18.04)? I'll omit the many things I tried that did not work and skip to the something close to what I am looking for; V="$(...
4
votes
2answers
190 views

Duplicate screen Xorg over network (Xpra ?)

I'm looking for a way to duplicate my desktop on a network. (Something that would work on a web browser client would be amazing.) I tried to use vnc / x11vnc but quality/framerate is too low. (cpu ...
2
votes
2answers
327 views

Batch convert (decode) audio into multiple formats with ffmpeg

I have a directory with a bunch of CD quality (16bit 44100Hz) wave-files. How can I batch decode those into different formats (lets say FLAC, OGG and MP3) using ffmpeg? Update: here are the commands ...
0
votes
1answer
187 views

How can I stop ffmpeg from quitting when it reaches the end of a named pipe?

I'm using a program which continuously writes MPEG-TS video data to a file while it's running. I'm expecting it to run continuously for many days. I want to use ffmpeg to transcode this video data ...
0
votes
1answer
162 views

Flickering and artifacts when capturing screen using ffmpeg and x11grab

I'm using the following command to capture my screen: ffmpeg -f x11grab -video_size 1920x1080 -i :0.0+1920,0 -c:v libx264 artifact-test.mkv The resulting video contains flickering artifacts that look ...
0
votes
0answers
79 views

ffmpeg bash script doesn't not work with subtitles when it comes to a filename with spaces

Here is my current script #!/bin/bash while true do for f in *.mkv; do /home5/user/ffmpeg_folder/./ffmpeg-git-20181101-64bit-static/ffmpeg \ -i "$f" -c:v h264 -maxrate 12M -crf 16 -c:a copy -vf ...
0
votes
1answer
138 views

Connection refused to local ffserver

I am unable to send my desktop capture to a localhost ffserver: the connection to the local server is refused. # ffserver >/dev/null 2>&1 & # ffmpeg -video_size 1600x900 -framerate 20 -...
0
votes
1answer
53 views

Cannot send desktop capture to ffserver?

I am simply trying to send a ffmpeg stream consisting of a desktop capture to a local ffserver: # ffserver >/dev/null 2>&1 & # ffmpeg -video_size 1600x900 -framerate 25 -f x11grab -i :...
1
vote
0answers
118 views

FFmpeg playing encoded video stream [closed]

This is the m3u8 playlist file I'm trying to play. #EXTM3U #EXT-X-VERSION:03 #EXT-X-TARGETDURATION:10 #EXT-X-MEDIA-SEQUENCE:1981290 #EXT-X-KEY:METHOD=AES-128,URI="encrypted-file://KEY_1541348762",IV=...
1
vote
1answer
69 views

How to log a process's uptime and restarts

I know that I can check a process's uptime with the following: ps -o etime= -p "PID" where PID = pid number. I would like to write to a log when this process ends, and include it's uptime. The ...
0
votes
1answer
235 views

Splitting up a pcm file into minute using ffmpeg long chunks

I have a large pcm file with about an hour's worth of data. I want to split it up into minute long chunks. Is there a way to ffmpeg to do that pr some other utility? Basically going from 0 - 3600s I ...
0
votes
1answer
62 views

die 2 of 3 ffmpeg recordings (freebsd)

I need to write 1h capture udp to http stream to file for few streams all streams write to one hdd, RAM 8Gb bash script: #!/bin/sh ffmpeg -y -i http://192.168.1.36:7781/udp/232.0.3.12:1234 -c:a ...
0
votes
0answers
71 views

How to drop bad frames in video file?

I've got a video footage from a security cam in MP4 format that from time to time contains broken frames. When I export the video to JPG frames the broken frames can be easily identified: Is there ...
1
vote
1answer
525 views

How to speed up video to make timelapse?

I've got a video file with 1.0 FPS (i.e. one frame per second) and would like to re-encode it so that it plays ca 20x faster. A short 1 FPS sample is here: http://s3.aws.nz/cam-1537668742.mp4 I can ...
1
vote
2answers
49 views

List MP3 files and durations

So I want to show a list of MP3 files with their durations. ffprobe does show me a duration of a file. But its output is nasty. It puts everything into stderr and I have found no way to remove its "...
1
vote
1answer
117 views

How I can to cut line segment video with ffmpeg?

I want to cut video from long-video with ffmpeg, I use this command: ffmpeg -i /home/nantembo/VideoPerl/1.mp4 -f avi -vcodec copy -acodec copy -ss 0:14:47 -t 0:58:55 /home/nantembo/VideoPerl/2.mp4 ...
0
votes
2answers
73 views

How to parse ffmpeg's -b:a option?

When you convert and create a 320kbps mp3 file, you may execute ffmpeg -i original.wav -b:a 320K out.mp3 But why can -b:a designate the bit rate? I've read man ffmpeg and the official ffmpeg ...
3
votes
1answer
352 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 ...