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.

2,610 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
11 votes
0 answers
6k views

Extracting Opus from WebM losslessly with FFmpeg or MKVToolNix

I have come across a strange problem when remuxing Opus audio stream from WebM to another container like ogg or opus. Running the output files through a spectrum analyzer clearly shows that there is ...
  • 141
9 votes
0 answers
3k views

Injecting 360 video metadata with ffmpeg

I'm working on a library that injects/embeds/writes metadata into a .mp4 file to allow the video to be displayed correctly as a 360 video. The input file is a standard .mp4 file in the equirectangular ...
  • 191
9 votes
1 answer
4k views

Combine/concatenate multiple MP4 files, making each file into a chapter

I am looking to use handbrake to combine 43 short mp4 files into one larger file. However, I want to ensure that the start of each file is recognized as a chapter. I'd be using vlc to play the file.
8 votes
1 answer
7k views

Use input filename in output filename with FFMPEG

When using FFMPEG with a globbing pattern for the input file list, Can you re-use the input filename in the output filename pattern? i.e input file pattern *.jpg → output filename %{...
8 votes
1 answer
833 views

IE will not seek audio/webm file

I'm trying to create a WebM audio file that will play back and seek in all browsers using the HTML5 <audio> tag and MIME type audio/webm. I've found workarounds to get this to work in all ...
  • 81
8 votes
0 answers
2k views

Trying to remove 1152 samples, but the queue is empty

I am streaming mp3 files,using this command : ffmpeg -re -i 'INPUT.mp3' -map_metadata -1 -map 0:0 URL I create a loop which stream files,and there is no problem with reviving stream,just from server ...
7 votes
0 answers
8k views

How to utilize all cores on high-end CPUs using ffmpeg

I have a high-end HPE ProLiant DL325 G10 server with an AMD EPYC 7401P 24-core/48-thread CPU, 128GB DDR4 RAM, and a Intel P4800x PCIe NVMe. I tried to run ffmpeg to convert a video (MKV) to MP4 for ...
6 votes
2 answers
12k views

FFMPEG encoding settings for 1080/60fps/h264 - framedrops

I want to use latest ffmpeg to encode set of JPG frames to 1920x1080 60fps h.264 movie. I'm looking for set of parameters that will allow smooth playback of encoded video on fairly strong PC machines ...
  • 163
6 votes
1 answer
3k views

Convert png sequence to x264 with ffmpeg

I am trying to convert a series of pngs into an mp4 video. I am using ffmpeg, and want to encode the video with the H.264 codec. Using the command ffmpeg -y -r 30 -b 1800k -i _tmp%04d.png -vcodec ...
  • 161
6 votes
2 answers
20k views

How to provide multiple input to ffmpeg?

I'm using ffmpeg to create time-lapses and it's working great. As input I have images named 001.jpg, 002.jpg, etc. and then with the command ffmpeg -i %3d.jpg -sameq -s 1440x1080 video.mp4 I create ...
  • 219
5 votes
0 answers
4k views

ffmpeg: "moov atom not found" on a seemingly valid file

GoPro cameras cut up video in 4GB MP4 files. Attempting to merge them with ffmpeg 4.4.1 like so: ls GH017642.MP4 GH027642.MP4 | while read line; do echo "file '$line'"; done | ffmpeg -...
  • 333
5 votes
0 answers
184 views

Access microphone with gphoto2

There is a lot of documentation for using gphoto2 to use a DSRL as a webcam. With those techniques, the system sees the camera as a new video device gphoto2 --stdout --capture-movie | ffmpeg -i - -...
  • 181
5 votes
1 answer
4k views

ffmpeg meets unknown timestamps error

I use ffmpeg concat to merge multiple ts files, I use following command ffmpeg -y -f concat -i filelist.txt -c copy output.mkv all ts files' path is put in filelist.txt, most of time it runs well, ...
  • 93
5 votes
0 answers
856 views

Keep equirectangular side-data when using video filter on 360 Video in ffmpeg

I have a 360° Video and want to shift it sideways using ffmpeg so that the default viewpoint when opening the video in a player is shifted. I found this question (How to offset a video horizontally in ...
  • 51
5 votes
0 answers
12k views

FFmpeg error "track X: codec frame size is not set"

I just found out about FFmpeg and I need it to cut loads of MP4 files to the last 20 seconds of each. Each MP4 file has one video track and two audio tracks. I've been using this line of code: for %...
5 votes
0 answers
468 views

ffmpeg concat transition of images

I would like to make transitions via concat with ffmpeg for a slideshow. In my case the number of images is often changing. Is there a way to use concat to set the transition or can i define a ...
  • 175
5 votes
0 answers
2k views

How to make FFmpeg wait for input

I have a program which saves game play in a file. I want to run FFmpeg and give the file as input for live streaming. Below is how I use FFmpeg to stream the video file. %ffmpeg% -re -i %fileloc%%...
5 votes
0 answers
2k views

FFmpeg mp3 file header restore

I got mp3 files without headers, ffmpeg -i shows: . . . [mp3 @ 003e9700] Header missing . . . They sound well, but not in all players. So how can I restore header info or re-pack file without re-...
  • 173
5 votes
0 answers
3k views

ffmpeg speed up video but keep same quality

I made a timelapse out of an image sequence using ffmpeg and the copy codec to disable compression and keep the quality to a max. The timelapse is a bit too long (10 minutes and up) so I tried to use ...
5 votes
0 answers
821 views

Adding audio to video being created with image2pipe option

I am creating a video in mp4 format from a sequence of images and an MP3 audio file. For performance reasons I switched from image2 option to image2pipe option and now video is creating OK but without ...
  • 373
5 votes
0 answers
2k views

How to properly concaternate two audio files together?

I ripped two Blu-rays and I'm trying to combine the audio from both into one file. I've decoded it from DTS-HD MA to Wave64, and I used avisynth to remove the black screen audio (4 seconds) from the ...
  • 2,095
5 votes
1 answer
8k views

Is there a way to deal with ffmpeg http input losing connection?

I'm recording a stream from my IP webcam (and storing it to a server but that's not the issue right now). The command looks something like this: ffmpeg -f mjpeg -i http://ip.ad.dd.res/videostream.cgi?...
  • 151
5 votes
0 answers
2k views

Use FFMPEG for Video to Frames, then Frames to Video with Original Sound

Is there a way to use FFMPEG to decompose a video into individual image files, and then reassemble those image files into a video with the audio from the original video in sync with the new video ...
5 votes
0 answers
7k views

Stream video with FFMPEG, "Output file does not contain any stream"

I would like to stream an H.264 encoded elementary stream wrapped in RTP headers to a port using FFMPEG. I have tried the following command lines to no avail... ffmpeg -i 1080p_1.h264 -f rtp -vcodec ...
5 votes
1 answer
2k views

Is there a way to make FFmpeg seek faster to an end of file on a network share?

I'm using ffmpeg to generate image previews from flv videos. The OS is Debian 5 and it's the apt version of ffmpeg. The flv files are located on a NAS share that is mounted as NFS. Getting the ...
  • 151
4 votes
0 answers
325 views

How do I make FFPLAY automatically skip ahead while playing a stream without distorting audio?

I've been a long time lurker, but now I've gone and made an account. Like I said in the title, I want to play an SRT stream with FFPLAY, but whenever a drop in the connection happens, I need it to ...
  • 41
4 votes
0 answers
166 views

Reset metadata for a specific stream only

In my usecase I'd like to recode audio streams into a different format with ffmpeg. The source files (MKV) contain a video stream, two audio streams and three subtitle streams as well as chapters. ...
  • 41
4 votes
1 answer
2k views

How to copy unsupported data streams with ffmpeg?

Briefing I have some .wmv files (actually, my full batch file deals with multiple filetypes) with weird data streams that are needed for an external program to recognize them. I'm trying to remove ...
4 votes
0 answers
2k views

Broadcast a screen with ffmpeg via http

These quarantine days I was going to share my desktop to friends to explain them what is git in a practice. The problems are: I use FreeBSD. We are behind NATs. But I've got a VPS with VPN (Wireguard)...
4 votes
1 answer
4k views

Chromium won't play mp4

I have chromium (version 79) installed on my Red Hat 7.6 system and cannot play any mp4 videos. I attached an image below of what it looks like when I run chromium-browser <mp4 video>. I have ...
  • 51
4 votes
0 answers
5k views

How do I continuously stream multiple .mp4 files with ffmpeg to an rtmp server?

I am an Software Engineering trainee and I need to make a video stream that continuously streams several videos on repeat. I have made an rtmp server using nginx and their rtmp module and as ...
  • 41
4 votes
0 answers
1k views

How To Stop Cmd Window From Scrolling Down Automatically

I'm making a batch file that runs some ffmpeg commands. When ffmpeg is encoding, it shows you the progress of the encode, updating it every second or so. The problem is that sometimes I want to ...
4 votes
0 answers
170 views

Hindi matra misplaced in subtitles burned with ffmpeg

When trying to burn in subtitles, I get incorrectly shaped subs, when the text should have actually read कहानियों के बारे में The command was ffmpeg -i ~/in.mp4 -y -vf subtitles=~/hindi.srt:...
  • 41
4 votes
0 answers
7k views

How to use libx264 ffmpeg in conda environment?

I tried to convert an avi video file into an h264 processed mp4 file, but I ran into the following error: $ ffmpeg -i sa1-video-fram1.avi -c:v libx264 -crf 19 -c:a libfdk_aac -b:a 192k -ac 2 out.mp4 ...
4 votes
0 answers
1k views

Strip x264 copyright information during ffmpeg copy

I am trying to remove the copyright string from the generated mp4 file using ffmpeg (copyright string is already present in avi file). I have an input avi which I'd like to make 'streamable' and ...
  • 1,151
4 votes
0 answers
5k views

How to remap channels of AC3 stream within .mkv or .mp4? (ffmpeg, 3f2m/lfe - > 3f2r/lfe)

So this is my problem, I've backed up quite a number of DVDs and a few Blu-Ray discs to .mkv files for archival purposes, and for my plex server. I used: x264 for video ac3 for audio (for ...
  • 41
4 votes
0 answers
1k views

How to copy not recognized streams on conversion with FFmpeg?

I am trying to compress some Videos using FFmpeg, that contain multiple streams, some of them not recognized by FFmpeg: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'GX010686.MP4': Metadata: ...
  • 1,423
4 votes
0 answers
1k views

Time of extracted frame from video using FFMPEG

I'm using the command ffmpeg -i video.webm -vf fps=1 thumb%04d.jpg to get one frame every second. However, I cannot figure out way to get the exact timestamp of an extracted frame. I need that ...
4 votes
1 answer
7k views

Black video generated by ffmpeg

When I generate a video starting from a sequence of .png snapshots, the output video is black. Here is a minimal working example: I generate the video from these two frames with the following command ...
  • 151
4 votes
0 answers
3k views

Compile ffmpeg with mmal

I'm trying to compile ffmpeg with omx and mmal support for the raspberry pi zero on Debian Jessie. Omx seems fine and I got the headers from libomxil-bellagio-dev as per this stack overflow answer ...
  • 143
4 votes
0 answers
5k views

ffmpeg reduce background noise

Audacity has a great noise reduction process that I've found works very well: select a "quiet" sample section of audio, choose Effects>Noise Reduction>Get Noise Profile. Then select whole stream, ...
4 votes
0 answers
9k views

FFmpeg error with video stream

Please see Edit 2. The problem has been updated. Error 1: Writing encrypted data to socket failed av_interleaved_write_frame(): I/O error Error 2: (libx264) Conversion failed! I'm trying to stream ...
  • 91
4 votes
1 answer
3k views

How to accurately split and combine videos with ffmpeg respecting inpoint/outpoint

I'm learning how to split and combine videos with ffmpeg. Presently I'm practicing on a 799 KB MP4, one_through_ten-timestamped.mp4, where each frame has a burnt-in "frame number" (up to frame 40, the ...
  • 395
4 votes
0 answers
1k views

How to keep transparency when scale png file with ffmpeg

I'm using ffmpeg to scale my PNG icon, by using below command: ffmpeg -i sticker.png -vf scale=300:300 out.png The output has correct resolution as I expected but the problem is transparency parts ...
4 votes
0 answers
2k views

Android TCP error failed to resolve host name from static library

I'm using ffmpeg on android and i have encountered and error, that does not occur when i'm using the library on my linux VM. I'm using FFmpeg Static Builds, from here. I am using the stable 3.1.5 ...
4 votes
0 answers
1k views

FFMPEG Subtitle Burning - Make Them Look Like Youtube Captions

I want to burn subtitles into videos and make them look as close to the YouTube captions as possible. I've gotten pretty close with the following: ffmpeg -i VIDEOFILE.mkv -vf subtitles="f=SUBSFILE....
  • 141
4 votes
0 answers
9k views

How to know which framerate should I use to capture webcam with ffmpeg?

I'm capturing video from my webcam with the following command: ffmpeg -r 30 -f v4l2 -video_size 160x120 -i /dev/video0 output.avi The -r option indicate the framerate I want. However, it's not that ...
4 votes
0 answers
4k views

What ffmpeg command line matches the one YouTube uses?

I am trying to use the same command line YouTube uses for quality etc. in H.264/MP4 containers. I have been working on converting videos into multiple formats, scales, sizes and adjusting the bit ...
  • 549
4 votes
0 answers
1k views

Ffmpeg not copying location metadata

I'm converting vidoes and even though I"m using -map_metadata 0 ffmpeg -i input.mp4 -map_metadata 0 output.mp4 The above code defaults to libx264/libvo_aacenc. The location metadata is not copied, ...
4 votes
0 answers
1k views

How to check .mp4 file is corrupted or not.

I am recording two different videos in the .mp4 format using ffmpeg command and after that combining them. But sometimes one of the video is get corrupted because of that it will affecting on the ...

1
2 3 4 5
53