Skip to main content

Questions tagged [ffmpeg]

Media tool with support for multiple codecs, filters, and containers. Include your actual command and the complete console output when asking questions involving FFmpeg tools. An easy way to do this is by adding `-report` to your command and pasting the contents of the logfile generated. For help with CLI use only of ff* binaries - ffmpeg, ffprobe, ffplay. For help with API usage, post on Stack Overflow.

Filter by
Sorted by
Tagged with
0 votes
0 answers
59 views

FFmpeg filter use other streams characteristics

I have a workflow in which I have a ffmpeg command with several images and a video as input ffmpeg -loop 1 -r 50 -t 4.0 -i img1.png -loop 1 -r 50 -t 1.0 -i img2.png -i video.mp4 -loop 1 -r 50 -i img3....
Rems's user avatar
  • 5
1 vote
0 answers
89 views

FFMPEG > The transcoded video contains insufficient number of frames

I am trying to transcode the videos (which I receive via the javascript media recorder in streaming mode by telephone) to use the VP9 codec and also to resolve concerns about the duration of these ...
Kalkilo Najmax's user avatar
0 votes
0 answers
41 views

ffmpeg audio amerge with volume level adjustment and sidechain processing stopped working

I'm trying to merge my stereo background music with a mono voiceover audio with volume adjustment and sidechain processing to duck the music when voiceover is playing. This command used to work fine ...
kaushal's user avatar
0 votes
1 answer
63 views

What is the "data" format in FFmpeg?

There is a format in FFmpeg called "data" and every way I've tried using it causes the Output file does not contain any stream error. I've tried: ffmpeg -f data -i in.bin -f data out.bin ...
marbens's user avatar
  • 203
1 vote
1 answer
58 views

How can I detect which channels contain compressed audio in a video file by using command line tools?

I have an MXF file that contains 16 audio tracks. I know the first two tracks (stereo) contain Dolby E compressed video. Using MediaInfo (gui) it lists 16 audio streams with a mix of Dolby E and PCM ...
kfank's user avatar
  • 11
0 votes
0 answers
70 views

FFMPeg: Avoiding clipping of image when rotating overlay

Im trying to add an image overlay on top of a video and have to rotated the image arbitrarily. Below is the command I'm using to rotate by -30 deg. ffmpeg -i input_video.mp4 -i crown.png -...
Aneesh's user avatar
  • 115
0 votes
0 answers
151 views

ffplay hwaccel mjpeg playback

TL;DR: How can I play MJPEG stream from my WebCAM/HDMI Capture device via FFPLAY with hardware acceleration on Ubuntu 22.04 ? Long Description: I have some cheap HDMI capture devices that can output ...
Sertac TULLUK's user avatar
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 ...
Novum Gain's user avatar
2 votes
1 answer
240 views

Why am I getting pixelated videos in FFmpeg when converting to a GIF?

I want to encode this WEBM video: https://buggem.github.io/connecting.webm I have been noticing the fact that FFmpeg has been played up when it comes to quality. I am doing WEBM to GIF, if that ...
Missing User's user avatar
1 vote
1 answer
75 views

ffmpeg Error when trying to concatenate 2 parts with different speed

I'm trying to concatanate to parts of the same input video but one is speeded up 20x. The code I'm using is this: ffmpeg -i 7.mp4 -filter_complex "[0:v]select='between(t,0,9)',setpts=PTS-STARTPTS[...
Ricardo Bohner's user avatar
1 vote
1 answer
146 views

Why is it when an MKV video converted by FFmpeg to MP4 only plays on VLC media player?

I have a video in MKV format that I wanted to convert to MP4, so I used ffmpeg to convert it. The command I used was pretty simple: ffmpeg -i <path_and_name_of_file>.mkv <...
Alfrodo8's user avatar
1 vote
0 answers
120 views

FFMPEG : Error parsing filterchain subtitles

I have built ffmpeg from source to allow GPU usage on Google Colab, with this code: !apt install nvidia-driver-525 !apt install nvidia-cuda-toolkit !mkdir ~/nvidia/ %cd ~/nvidia/ !git clone https://...
Sulli's user avatar
  • 137
0 votes
0 answers
28 views

Fail to convert png from 3gp

Here is the command I used to convert the video. ffmpeg -skip_frame nokey -i input.3gp -vsync vfr -frame_pts true output.png (The command can't be modified because this is a code section captured from ...
Alex's user avatar
  • 1
1 vote
1 answer
428 views

Want to understand encoding with Opus for maximum audio quality in FFmpeg. Bitrate stuck at 96kbps?

I'm sort of new to FFmpeg, but I got much of the basics down. I am trying to understand how to encode audio with Opus. My knowledge is a bit weak when it comes to audio, bitrates, sample rate and Hz. ...
peppy's user avatar
  • 13
3 votes
1 answer
299 views

How to repair damaged AAC file without re-encoding using FFmpeg or other tools?

I have a 256Kbps AAC file that has a corrupted segment lasting less ~1/20th of a second. I'm seeking to "repair" the damaged portion without re-encoding - or, at least via a minimally ...
U2Joshua's user avatar
1 vote
1 answer
392 views

why the ffmpeg cuda decoder much slower than the cpu decoder?

# cpu ffmpeg -i test.ts -f null /dev/null -benchmark # gpu ffmpeg -hwaccel cuvid -hwaccel_output_format cuda -c:v h264_cuvid -i test.ts -f null /dev/null -benchmark ffmpeg 4.4.2 the CPU is 1.5x ...
Wang's user avatar
  • 862
0 votes
0 answers
267 views

Error parsing filterchain with ffmpeg

My ffmpeg command command = f"ffmpeg -hwaccel cuda -loglevel error -y -i input.mp4 -filter_complex \"subtitles='subtitles.srt'\" output.mp4" subprocess.run(command, shell=True) ...
Sulli's user avatar
  • 137
0 votes
0 answers
64 views

Bug in FFmpeg signature?

I tried using the signature filter on two completely different videos. For below command where video1 and video2 are completely different videos, the signature filter code still passes the coarse ...
stilloo's user avatar
0 votes
1 answer
368 views

Can not use drawtext with ffmpeg

I’m using this code to install ffmpeg with GPU support on Google colab: !apt install nvidia-driver-525 !apt install nvidia-cuda-toolkit !mkdir ~/nvidia/ %cd ~/nvidia/ !git clone https://git.videolan....
Sulli's user avatar
  • 137
0 votes
1 answer
44 views

Nmap does not show open RTP and RTCP ports

I am running ffmpeg as in: ffmpeg -t 00:05:00 -i rtsp://admin:[email protected]:554 -c:v copy -an output2.mp4 While ffmpeg is running, I run nmap as in: nmap -p1-65535 192.168.1.64 I see the ...
Sunny's user avatar
  • 369
1 vote
0 answers
100 views

How to extract subtitle timestamps using ffprobe (not working as expected)?

I am trying to extract subtitle timestamps from a M2TS file using ffprobe. This does not work as expected. The M2TS file is known to contain 1001 subtitles in track 4, but I am getting about 4000 ...
Binarus's user avatar
  • 1,835
0 votes
0 answers
29 views

How do I stream audio from a respeaker 2-mic hat in a raspberry pi with FFmpeg?

I'm trying to follow this to stream audio from a mic in my raspberry pi. ignacio@pi-satellite-bigbedroom:~ $ ffmpeg -re -f pulse -ac 1 -i plughw:CARD=seeed2micvoicec,DEV=0 -f rtsp -rtsp_transport tcp ...
Ignacio's user avatar
  • 101
1 vote
1 answer
102 views

FFmpeg trimming of Linux Screencast video does not work as described in another answer

I used the answer(s) from this questions, however my video is not trimmed. Using ffmpeg to cut up video How to reproduce reproduce: The Video I am talking about was recorded via the Ubuntu 22.04 ...
Daraan's user avatar
  • 129
1 vote
1 answer
563 views

Error submitting a packet to the muxer: Cannot allocate memory

I'm attempting to trim and concatenate several video files using ffmpeg. These videos have already been transcoded with H.264 at a resolution of 720p. However, when executing the command, I encounter ...
Zahra's user avatar
  • 11
0 votes
2 answers
200 views

Adaptive streaming to rtsp relay

I have a camera at /dev/video4 under linux, and I want to stream this to a mediamtx server. I am able to do that locally using ffmeg with the following command: ffmpeg -re -i /dev/video4 -f rtsp -...
kuon's user avatar
  • 11
1 vote
0 answers
49 views

How can multiple, non-regular segments be extracted from a video using ffmpeg on Windows?

I'm trying to extract some segments from a video (and optionally combine them) using ffmpeg... but I'm not getting very far. Compared to the various examples I've found here, in the ffmpeg docs and ...
Skeeve's user avatar
  • 51
0 votes
1 answer
37 views

How to use ffmpeg speedup video specific time range in one line ffmpeg cli

I try following splited cli, they work well ffmpeg -i "$input_file" -filter_complex "[0:v]trim=start=0:end=10,setpts=PTS/10[v1];[0:a]atrim=start=0:end=10,asetpts=PTS/10[a1]" -map &...
chikadance's user avatar
1 vote
0 answers
750 views

How can I transcode a Dolby Vision video?

I would like to use FFmpeg to take a Dolby Vision video, and output Dolby Vision at the end. I can see that x265 has some flags to pass, so I have made some attempts using that. An example is: ffmpeg -...
SubJunk's user avatar
  • 121
0 votes
1 answer
173 views

Change subtitle font size with ffmpeg

I’m able to change the FontName when hardcoding subtitles with ffmpeg: ffmpeg -y -i temp.mp4 -vf subtitles=subtitles.srt:force_style='FontName=Roboto-Condensed-Bold' output.mp4 but unable to change ...
Sulli's user avatar
  • 137
0 votes
1 answer
32 views

Can’t concatenate videos with ffmpeg

I’m trying to concatenate a video generated with this command: ffmpeg -y -loop 1 -i screenshot.png -filter_complex "[0:v]scale=1920x1080,subtitles=subs.srt" -c:v libx264 -c:a aac -shortest -...
Sulli's user avatar
  • 137
1 vote
0 answers
265 views

Raspberry Pi with Bullseye: how to stream from camera to Youtube Live, and simultaneously save the stream to video files locally

I have raspberry pi 3b+ with Arducam camera and Debian Bullseye, and I would like to achieve the following: get video from libcamera-vid, 800x600, 15 fps get audio from default audio source stream ...
tputkonen's user avatar
  • 385
0 votes
1 answer
142 views

How can I detect which audio channels in a video file are silent using FFMPEG?

I need to be able to scan video files and report which audio tracks/channels are silent without knowing anything about the file's audio mapping ahead of time. I have tried this ffmpeg (v4.1) command ...
kfank's user avatar
  • 11
2 votes
0 answers
56 views

Yet another ffmpeg concat audio sync issue [closed]

I've read through dozens of posts, tried many suggestions, nothing seems to work for me. The funny part is that the video is fine in some players (e.g. Quicktime) but not the others (e.g. Chrome). ...
Demiurg's user avatar
  • 261
1 vote
1 answer
96 views

FFMpeg "vp9_cuvid" doesn't save HDR10 from VP9 4k input video in output HEVC video

I try to encode this 4k VP9 HDR10 vídeo: https://www.youtube.com/watch?v=kgppJX0G--E using this command line: ffmpeg \ -vsync 0 \ -hwaccel cuda \ -hwaccel_output_format cuda \ -c:v vp9_cuvid \ ...
membrillo's user avatar
0 votes
0 answers
89 views

Streaming Dynamically Created .ts Files to RTMP Without Concatenation Corruption using ffmpeg

I'm working on a project where .ts video files are generated in real-time, and I need to stream these to an RTMP server without pre-concatenating them. Initially, I attempted using a named pipe and ...
Dhairya Verma's user avatar
0 votes
1 answer
121 views

ffmpeg How to keep only some metadata tags for mp3

I want to remove all metadata tags form an mp3 but keep "album" and the mp3 "cover image" how would I proceed in that case? I would expect something like this but it doesn't work: ...
Ricardo Bohner's user avatar
2 votes
0 answers
102 views

Encode video via GPU - slow speed

My PC: ryzen 5700x, 32 GB RAM 3200 MHz, RTX 4070Ti Super, SSD. I encode video from h264 to h265 using ffmpeg (nvenc) and GPU. ffmpeg -i "input.mov" -c:v hevc_nvenc -rc:v vbr -cq:v 34 -c:a ...
Georgiy's user avatar
  • 21
0 votes
0 answers
81 views

Pausing the video for 15 seconds

I have a video which is 40 seconds long, I want to make it 55 seconds long, I wanted that the video's first frame along with it's audio freezes (frame freezes) for the first 15 seconds and after the ...
AAB's user avatar
  • 21
1 vote
1 answer
181 views

"-vf crop" doesn't work on FFMpeg hevc_nvenc

This command line downscales fine my 4k video: $ ffmpeg -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i input_video.mkv -vf scale_cuda=1920:1080:interp_algo=bicubic -c:v hevc_nvenc -preset slow -...
membrillo's user avatar
1 vote
0 answers
93 views

Capturing raw video stream from second pc (HDMI Splitter & Capture Card)

I would like to create a test setup in which I transmit the raw stream from one PC via an HDMI splitter and display it on a second PC where I receive the HDMI signal with a capture card.. Due to the ...
valle's user avatar
  • 11
1 vote
2 answers
116 views

Encode images into a video as they become available with FFMPEG?

I have an application which takes roughly 25 seconds to process each frame of a video, and then it saves each processed frame to a dedicated directory which contains nothing but frames, and each frame ...
HackerDaGreat57's user avatar
0 votes
0 answers
41 views

REPLAYGAIN value being ignored on some MP3's - FFmpeg Transcoder cs - process Error Data Received:454

I am having an issue per below. I use Windows, and just installed ffmpeg-2024-03-07-git-97beb63a66-full_build, which did not correct it. I have added Track ReplayGain to my music library using Foobar. ...
Mike Gravitt's user avatar
1 vote
0 answers
156 views

"-pix_fmt p010le" and "-pix_fmt yuv420p10le" doesn't work on FFMpeg hevc_nvenc

This command line works fine: $ ffmpeg -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i input_video.mkv -vf scale_cuda=720:404 -c:v hevc_nvenc -preset p7 -rc vbr -rc-lookahead 20 -b:v 2000k -...
membrillo's user avatar
0 votes
0 answers
19 views

Use font attachment from an mkv container when burning hard subtitles

I want to use the font that is in an mkv as an attachment when I burn in subtitles. I found a way to do this using -dump_attachment first. ffmpeg -dump_attachment:t "" -i video.mkv ffmpeg -i ...
Ilias Karim's user avatar
1 vote
0 answers
49 views

Generating ffmpeg command to mux in subtitles matching the style of VLC

I am trying to mux in subtitles with ffmpeg, but I am having trouble getting the desired style and output with a reference point being VLC's standard format of showing subtitles matching the look of ...
bigboss's user avatar
  • 11
0 votes
1 answer
105 views

Converting audio tracks only in mkv files to AC3

I have an LG CX TV. The internal video player does not recognise DTS audio format. I'd like to be able to play MKV files (which might have DTS audio tracks) from an external USB device. I was looking ...
Alastair's user avatar
0 votes
0 answers
181 views

Extract Video Frames as HEIC/HEIF images

How do I extract frames from videos as heif/heic images? I want to use ffmpeg but they don't support it. What other tools can do the trick?
user1897354's user avatar
0 votes
0 answers
185 views

How do I create visually lossless images from videos using FFmpeg?

How do I create visually lossless images from videos where the differences are so undetectable that you won't notice even if you zoom in, all by using FFmpeg? I have the following types of videos: H....
user1897354's user avatar
0 votes
1 answer
127 views

FFMPEG - Add a green video overlay at a fixed Interval in a video. How to define the interval?

I am trying to add a green screen video overlay on the top of my main video. The green video overlay is like a thumbs up that shows up every few minutes in the video. I have a ffmpeg command that adds ...
DigitalNomad's user avatar
  • 1,708
0 votes
1 answer
66 views

Apply the file's audio effects

I'm new to ffmpeg, as the title says, I want to apply effects to audio files, like this app [https://play.google.com/store/apps/details?id=com.baviux .voicechanger] How can I determine the value of ...
Văn Mạnh Trịnh's user avatar