18:19
I try to play a movie in two languages.
Audio 1 to Speaker
Audio 2 to Headset
mpv --lavfi-complex="[aid1] [aid2] amix [ao]" "input.mp4"
Play the video and mix audio1 & audio2 and output is standard device
mpv "input.mp4" --vid=1 --aid=1 --audio-device="wasapi/d3178b30-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Play video with audio1
mpv "input.mp4" --aid=2 --no-video --audio-device="wasapi/06a44940-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Play audio2 only
how to combine (...)
16:01
I have some problem which i cannot find answer to. After installing scikit-video and FFmpeg i got this error:
AttributeError: 'FFmpegWriter' object has no attribute '_proc'
can you help me to find solution to this.
from skvideo.io import FFmpegWriter
def main():
...
video_writer = FFmpegWriter('video.mp4')
...
if __name__ == '__main__':
main()
Already tried to install pyaudio, reinstall FFmpeg and skvideo and install different versions of packages. Does not help at (...)
22:41
I'm using sendcmd to update my crops to follow a specific object around a screen.
It works perfectly on my mac
It fails on my AWS Lambda function.
This issue only occurs when I add an instance name like cropⓐcrop_0
When I don't use instance names it works only on the first input video.
My actual command is more complicated and has multiple input crops so i need instance names.
I must run this in a single command.
Both environments are running ffmpeg 6
ffmpeg -y -i input.mp4 -filter_complex (...)
21:03
I'm going crazy trying to figure this out.
Essentially I'm trying to apply sidechain compression using ffmpeg (for the sake of speed and automation). a2.mp3 in this example is the full length track and a1.wav is a short 5 second, spoken-word clip. The code currently applies the sidechain compression well, but the output file is only that of the spoken-word clips length, so 5 seconds. Is it at all possible to make the output match that of a2.mp3's length instead? Switching around the input order is not something that's possible as it'll apply the compression (...)
11:42
I am downloading a video using ytdl-core and converting it to mp3 using node-fluent-ffmpeg. It seems that the code after the ffmpeg conversion gets executed before the conversion finishes as trying to upload the .mp3 file to a Google Cloud Storage bucket throws an error. I am trying to detect 'end' or 'finish' events but none are being triggered.
Code:
ytdl(url?.toString() as string)
.once('data', (data) =>
console.log('start', data);
)
.on('progress', async function (progress, downloaded, total)
(...)
11:37
I am trying to bulk watermark videos with the watermark being in the top center of the video (no issue with that).
The watermark is not maintaining the width of the video.
Here is the ffmpeg command in a loop:
for %%a in ("*.mp4") do ffmpeg -i "%%a" -i watermark-image.png -filter_complex "[1]scale=w=iw[wm];[0][wm]overlay=x=(W-w)/2:y=0" -preset ultrafast "newfiles\\%%~na.mp4"
I tried using scale2ref filter but didn't work for (...)
04:22
I am in the need of creating exact seconds segments of a video
Currently I am using this command (Javascript string) where I read from a folder multiple videos
segmentLenght is usually obtained through computations, so its value is a float like 1.66666 or 1.5 seconds or even whole numbers like 2
ffmpeg -hide_banner -err_detect ignore_err -i "$inputFolder + '/' + video" -r 24 -codec:v libx264 -vsync 1 -codec:a aac -ac 2 -ar 48k -f segment -preset fast -segment_format mpegts -segment_time $segmentLenght -force_key_frames "expr: gte(t, n_forced * (...)
03:35
When reading real time video stream by using ffmpeg, pFormatCtx-> streams [i]-> codecpar is 0x00, but pFormatCtx-> streams [i]is 0x55555579bbc0.
my source code is as below where error occurs in line if (pFormatCtx->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO)
//open media file
if (avformat_open_input(&pFormatCtx, url, NULL, &avdic) != 0)
std::cout<<"can't open the file. \\n";
return;
//find the infomation of the stream
if (avformat_find_stream_info(pFormatCtx, NULL) < 0)
std::cout<<"Could't (...)
02:44
This is the current command:
ffmpeg -i pipe:0 -pix_fmt yuv420p -f mp4 -vf "transpose=1" -f matroska pipe:1
Essentially, it takes an MP4 file, rotates it 90 degrees, and converts it back to mtk and outputs it to STD_OUT.
This is the error:
WARNING:root:[mov,mp4,m4a,3gp,3g2,mj2 ⓐ 000001ff9979dd00] stream 0, offset 0x50: partial file
[mov,mp4,m4a,3gp,3g2,mj2 ⓐ 000001ff9979dd00] Could not find codec parameters for stream 0 (Video: h264 (avc1 / 0x31637661), none, 170x144, 32 kb/s): unspecified pixel format
Consider increasing the value for the (...)