09:59
I want to add new audio stream (ONE) to some video file (which already has 1 or more audio streams):
ffmpeg.exe -y -i "C:\\video.mp4" -i "C:\\video Fre.mp4" -c:v copy -c:a copy -map 0:v -map 0:a -map 1:1 -map_metadata 0 -metadata:s:a:0 language=eng -metadata:s:a:1 language=fre "C:\\result_1.mp4"
Now I manually set language metadata for existing stream (-metadata:s:a:0 language=eng) and also manually set number for new audio stream (metadata:s:a:1).
Is there any possibility set metadata for the LAST audio stream just like:
-metadata:s:a:last language=fre
And (...)
21:01
I cannot manage to make a working script for this under Linux.
Basically i want a script that execute a ffmpeg command and output the files to a subdirectory with the same name as the source.
Long story short it is to convert audio from several mkv files, but i want to keep the same name and as ffmpeg doesn't overwrite files, i need to output them to a subdirectory.
There is this answer :
https://superuser.com/questions/912730/ffmpeg-batch-convert-make-same-filename?newreg=4676efc538b54a178fcbcc17e1fd2127
But the Linux solution:
mkdir outdir
for i in (...)
14:54
I am working on a Node.js application that uses ffmpeg to convert videos to mp3 files. I have installed ffmpeg full build (libmp3lame included), and I have configured the path to ffmpeg correctly in my application. However, when I try to convert a video to mp3, I get the error "Output format mp3 is not available.
ffmpeg(inputPath)
.outputOptions('-vn', '-ab', '128k', '-ar', '44100')
.toFormat('mp3')
.save(outputPath)
.on('error', (err) => console.error(`Error converting (...)
09:55
TL;DR
I'm trying to programmatically download a part of a YouTube video. The widely known procedure doesn't work for some videos and I'd like to overcome this situation.
Context
I'm trying to programmatically download a part of a YouTube video. As described in How to download portion of video with youtube-dl command?, you can achieve this by the following commands.
#Converts a human-readable URL to longer URLs for internal use.
~ $ youtube-dl --get-url (...)
07:45
What im trying to do in python is to convert a 4k mkv video to 1080p mp4 video using the ffmpeg library.
import subprocess
def convert_4k_to_1080p(input_file, output_file):
cmd = f'ffmpeg -i "input_file" -crf 18 -c:v libx264 -c:a aac -s 1920x1080 "output_file"'
subprocess.run(cmd, shell=True)
input_file = "c:/Users/Shaahid/Videos/Movies/Series/Arcane.S01E02.2021.2160p.UHD.WEB.AI.AV1.Opus.MULTi5-dAV1nci.mkv"
output_file = "c:/Users/Shaahid/Videos/Movies/Series/Test.mp4"
convert_4k_to_1080p(input_file, output_file)
however i (...)
10:16
I tried hunting for all existing questions and couldn't find a match :-(
I have a video and a PNG image that I overlay on top of that. The PNG needs to move across the video (this I have working). But I want the PNG to use a "multiply" blend effect vs. a standard alpha overlay. Whenever I try to apply both filters I get an error.
This code works and moves the image (the last one) across as expected:
ffmpeg -i d6b5ec90-8823-41cf-9b81-3086ce83054a.mp4 -loop 1 -i 593e677d-02bb-49c2-a0c6-c3dd8f8c2f72.png -loop 1 -i 32fea58f-ebe1-447e-b079-06f8ebb9df52.png -loop 1 -i (...)