All Questions
122
questions
1
vote
1
answer
66
views
How to merge all mp3 files located in the same directory?
The command below used to work but stopped around ubuntu/kubuntu 20.04.
ls *.mp3 | sed -e "s/\(.*\)/file '\1'/" | ffmpeg -protocol_whitelist 'file,pipe' -f concat -i - -c copy output.mp3
...
1
vote
2
answers
146
views
FFMpeg: How to get the real return value in bash
I've always used ffmpeg via a cmd-script and I always could check the %ERRORLEVEL% which was always '0' on success or '!0' if an error occured.
I'm trying to recode my cmd-scripts in bash (using msys2 ...
3
votes
1
answer
294
views
How to remove all subtitle channels except the first English one with FFmpeg?
I'm not very well versed on FFmpeg, and I've tried to do this many times myself, but I couldn't even figure out the syntax.. So I'm going to ask outwards to people much smarter than myself. I wish to ...
0
votes
1
answer
54
views
How to extract parts of the international conference video based on spoken language using command line
I have an international conference video which contains two spoken languages, i.e. the video is mixed with sentences of English and Chinese. I would like to remove the Chinese part by command line.
...
0
votes
0
answers
65
views
Is it possible to use the signalstats YAVG filter in FFMPEG to control the gamma correction in a video?
I don't know if this is even possible, but something tells me it is… You see, I want to dynamically control the gamma correction in FFMPEG/FFPLAY depending on how bright/dark the frame being ...
0
votes
0
answers
87
views
Using ffmpeg and concat demuxer producing weird video navigation behaviour
When combining multiple videos segments, each encoded with H265 and Vorbis and containing the same number of streams and frame rate, I use:
ffmpeg -f concat -safe 0 -i mylist.txt -c copy output.mkv
...
1
vote
0
answers
60
views
Spliting video with ffmpeg producing wrong durations
I'm currently using a framework where I have to split a video (originally encoded with HEVC video and AAC audio) in multiple parts to process them separately. Then the final result is obtained by ...
2
votes
2
answers
705
views
How can I setup ffmpeg to continuously produce 1 second videos from piped jpgs?
I am using ffmpeg on Ubuntu 22.04 to create 1 second mp4 videos from piped jpgs. The only issue that I have is that ffmpeg stops executing after the first set of jpgs is piped in. I need ffmpeg to ...
0
votes
0
answers
118
views
Optimizing Post-processing Workflow with FFmpeg for Janus Playrecord Plugin
I hope you’re all doing well. I have a question regarding the post-processing of recorded files using the Janus playrecord plugin. Currently, after the recording is done, I end up with two .mjr files (...
0
votes
1
answer
91
views
ffmpeg folder permission unable to find suitable output format
I'm attempting to make a small shell script using ffmpeg it basically accelerates a video to shorten it and then compresses it.
I was successful into running it into the linux terminal but I am having ...
1
vote
1
answer
307
views
FFmpeg command not producing desired video duration from image sequence
I have a set of 5 images and I want to use FFmpeg to create a video sequence from them. I am using the following command to achieve this:
ffmpeg -pattern_type glob -i '*_0[0-5].png' -r 25 -t 8 -c:v ...
0
votes
1
answer
111
views
Need help fading overlay with image-ads in and out - infitely
Im trying overlay an image-ad every x-seconds, by fading the overlay in and out. It's a stream for our company in Southern Denmark.
Should be said im 3 days old in FFMPEG. And that its running on ...
0
votes
0
answers
247
views
ffmpeg auto ended process with output error
How do you make ffmpeg stop during processing if strange words appear which make the live stream error automatically stop?
For example, during the process I often get output like this:
Non-Monotonous ...
2
votes
1
answer
1k
views
How to take file name from yt-dlp and use it as ffmpeg output file name?
I'm trying to get the output name to be the same as the input name while using the pipe command in ffmpeg.
Example:
The file is called 1-Minute Audio Test for Stereo Speakers & Headphones [...
0
votes
0
answers
126
views
How to solve an audio stream encoding workflow thru pipes only
I have the following workflow which is typically executed on a set of provided audio files (can be MP3 files, as assumed in this example, but also different formats):
file000.mp3
file001.mp3
...
What ...
0
votes
1
answer
254
views
Combine 2 FFMPEG commands - 1. Create a video loop and 2. Add track to loop X times / Add track to loop duration of video loop
I have these 2 commands for FFMPEG, but can't work out how to use the output from the first command and link into the 2nd one, and use them as a single process. I have the following:
Loop video for ...
1
vote
0
answers
431
views
How to hard code a list of subtitles to a video using FFmpeg?
I would like to figure out how to stream a list of subtitles to an RTMP server.
The idea is I have a list of MP3 files and a list of subtitles. Each mp3 has its own subtitle. What I was trying to do ...
-1
votes
1
answer
85
views
Script to Find and Resample Audio via FFMPEG Fails on Files with double quotes
Why does this script explode when file names contain double quotation marks?
for i in **/*.flac; do
echo "$i";
done | parallel -j+0 --eta --joblog /tmp/parallel.log --progress --bar --...
2
votes
2
answers
6k
views
Is there a way to extract subtitles from an MKV while maintaining the original format?
I am trying to extract (first, in case of many) subtitle track from mkv files (via CLI only, no GUIs) using ffmpeg or mkvextract.
But there is one downside to this: I have to write the output name ...
0
votes
1
answer
88
views
FFMPEG MultiPlex all video's to all audio's
(windows 10 64)
I have seen & read MULTIPLE (50+) answers to forms of this question but not for what Im trying to do.
I have a folder with 30+ short clips (few seconds each) mp4's
I also have a ...
0
votes
0
answers
259
views
How do I make this ffmpeg command work on mac?
Works on Linux but I have a mac for work. I need to replace alsa and possibly x11grab so it works on MacOS:
screencap() {
file=`date +%Y-%m-%d-%H.%M.%S`
ffmpeg -f alsa -i pulse -f x11grab -...
0
votes
1
answer
358
views
ffmpeg segment naming of rtsp surveillance stream HikVisions
I need to ensure unique segment names: Apparent POE cable defects, etc. around campus cause HikVision camera streams to require their ffmpeg daemons re-started once or twice or more times/day. (I am ...
1
vote
1
answer
1k
views
How to use video filters (cropdetect) with ffprobe
Checking the ffprobe docs apparently there is an option to use cropdetect with it. I am already aware that I could do this with ffmpeg like:
ffmpeg -ss 900 -i "foo.mkv" -vframes 100 -vf ...
0
votes
1
answer
184
views
Perform loop task for audio video encoding with ffmpeg in Linux bash shell
I have files, like these:
01 - A.wav
02 - AB.wav
03 - C.wav ... and so on until 15 - BLA.wav
and I have some command line like these:
dirinwav="/home/akrogun/Videos/CD1" && \
...
2
votes
1
answer
1k
views
ffmpeg merge audio, video and subtitle does not work. What am I doing wrong?
I have seen numerous guides but I don't understand what I am doing wrong. This is the ffprobe code:
ffprobe version N-104437-ge84c83ef98-20211028 Copyright (c) 2007-2021 the FFmpeg developers
built ...
2
votes
1
answer
362
views
Is it possible to conditionally enable or disable filters/streams with user input?
I have a Bash script that runs FFmpeg on a given video file and - along with lots of other things - adds a PNG watermark to it using an overlay. I'd like to be able to only apply the watermark on some ...
1
vote
1
answer
452
views
Fade in/out PNG watermark overlay on video
I have an FFmpeg command in a script that crossfades a main video with an outro and then overlays a semi-transparent PNG watermark on top of it.
ffmpeg -y -i "$1" -i "outro.mp4" -i ...
4
votes
1
answer
3k
views
How to download a portion of a YouTube video
I often come across YouTube videos that I need to crop parts from, but these videos can be long and downloading the entire video just to process a small part of them would take too long and be very ...
0
votes
1
answer
66
views
Using `-to` instead of `-t` when using YouTube link as input
This answer shows how to get a portion of a YouTube video by using URLs as input. The command works mostly fine, but I want to avoid using -t as I need to cut between specific timestamps and I'd ...
0
votes
2
answers
47
views
How to add mp3 inbetween mp3 with ffmpeg - concatenation inbetween
I've 2 mp3 files. a.mp3 is 1000 seconds long and b.mp3 is 10 seconds long. I'd like to add b.mp3 to a.mp3 starting from 50s seconds, so the output will be 1010 seconds long.
How can I achieve it with ...
0
votes
1
answer
858
views
Trying to use simple variables with my bash script for ffmpeg but getting errors
When I run this like this, it works:
ffmpeg -re -y -i /home/video.webm -ss 2 \
-i /home/audio.ogg -map 0:0 -map 1:0 \
-c:v libx264 -preset veryfast -b:v 3000k -maxrate 3000k \
-bufsize 6000k -pix_fmt ...
0
votes
2
answers
781
views
How to order files by "full number name"?
I'm trying to create a video from some png's, a thousand of them, actually. They are named numerically but with a step of 5000, i.e. 0.png, 5000.png , 10000.png and so on.
Im trying to create the ...
1
vote
2
answers
997
views
FFMPEG: Hard subs and trim?
I'm currently using the following command to trim videos, AND include the subtitles:
ffmpeg -ss 0:23:10.5 -to 0:24:40 -i "in.mkv" -vf "subtitles=in.mkv" -c:v libx264 -c:a aac "...
0
votes
1
answer
1k
views
Renaming output file with the name of the first input file
I have a mylist.txt list of files containing videos whose filenames are consistently structured as:
2021_03_18_19_30_02.avi
2021_03_18_19_41_02.avi
...
I'm using ffmpeg to concatenate all files into ...
0
votes
1
answer
826
views
reduce my 90gb collection of mp3 to about 10gb
got an insanely simple and working script already:
#!/bin/bash -x
mkdir .before
mkdir .error
for i in *.m??; do
ffmpeg -n -i "$i" -b:a 16k "${i%.*}.opus" && mv &...
0
votes
2
answers
2k
views
Using variables with bc: syntax error
The original problem
This may be more of a bc or bash question than an FFmpeg one, although I would also appreciate being able to prevent ffprobe from printing carriage returns after its output.
In a ...
0
votes
1
answer
237
views
How to specify size of color filter dynamically
I've been using the following crossfade from Gyan as part of my workflow for a while, as I've found it to look superior to other crossfade solutions and easy to adapt for different inputs. However, I'...
1
vote
1
answer
1k
views
FFmpeg command runs In Terminal, but not in script with TMux
The first time I ran the FFmpeg command I got error:
“Output file #0 does not contain any stream”
…but I could see the Tux session and connect to it.
Then added the full path to the FFmpeg ...
0
votes
1
answer
491
views
"Unknown option "PATH=[...]"" when following the official ffmpeg compilation guide
I wanted to compile ffmpeg myself in order to get a smaller executable I can then dristribute with my program.
While following the official ffmpeg compilation guide for Ubuntu I get an error when it ...
1
vote
1
answer
2k
views
Using ffmpeg on Raspberry Pi to grab video from RTSP: "-t command not found"
I am trying something that should be simple - trying to use the Raspberry Pi ffmpeg to grab a 30 second video from an RTSP stream. The command looks like this:
ffmpeg -i <rtsp:...> -t 30 <...
2
votes
1
answer
2k
views
How do I stop a screen capture with FFmpeg under Windows in a bash script?
When I capture the screen with ffmpeg -i desktop in a Bash script under Windows, I cannot end the capture with taskkill /f, because then FFmpeg won't write the MP4 header.
It has to be shutdown with ...
0
votes
1
answer
1k
views
Audio Downloader from YouTube with youtube-dl and ffmpeg
I am trying to make an audio downloader with youtube-dl and ffmpeg which will:
Download the best format of audio available on YouTube
Embed thumbnail in the file.
Convert the file to mp3.
Delete ...
0
votes
1
answer
435
views
Forcing a Program (FFmpeg) to Fork in BASH
I'm trying to fork an instance of FFmpeg so it will run in the background in a way that I could include in a script, but the obvious way doesn't seem to work with it:
ffmpeg -stream_loop -1 -re -f ...
0
votes
1
answer
362
views
FFMPEG with Python Automation Script
I am new to bash and I want to stick to Python to call bash scripts if required.
My setup.
Plex Server.
Google Drive Rclone.
Transcoding Server.
The question is related to the transcoding server.
I ...
0
votes
0
answers
15
views
ffmpeg extraction path cut [duplicate]
When I am extracting the subtitles from video files within a folder with ffmpeg, sometimes the path is cut and sometimes not and I don't know why.
I'll be grateful if I can get some answers.
Here is ...
0
votes
0
answers
82
views
Run Script Terminal Commands Orderly
how do i run the script below orderly ? (execute task after 1 task is done)
Code 1
for i in *.mp4;
do name=`echo "$i" | cut -d'.' -f1`
echo "$name"
ffmpeg -...
1
vote
1
answer
308
views
loop through subdirectories and ffplay all mp3 files
hi i'm trying to iterate through subdirectories and ffplay all MP3s in subdirectories, but i keep having only one track playing after it stops, here is my code
#!/bin/bash
shopt -s globstar nullglob ...
-1
votes
1
answer
94
views
Batch Script to convert 1 image and 1 audio from image directory and audio directory into mp4
I have a folder of images and a folder of audio, I'm trying to create a script that takes an image from the image directory, merges it with an audio from the audio directory and outputs an mp4 but not ...
1
vote
0
answers
41
views
FFMPEG Bash Script incorrectly using cover metadata instead of images
I'm trying to run a script that that is meant to convert a folder of images and a folder of audio into videos however it's pulling the metadata of the album art instead.
Looking for a correction ...
1
vote
1
answer
678
views
FFMPEG concat ONE intro video to MANY file in directory - all mp4
I'm trying to write a concatenation script (windows) to add an intro.mp4 video to over a hundred other mp4 videos in a directory.
The codec will stay the same mp4, the intro filename will stay the ...