Questions tagged [ffmpeg]

FFmpeg is a free software project that produces libraries and programs for handling multimedia data. The most notable parts of FFmpeg are libavcodec, an audio/video codec library used by several other projects, libavformat, an audio/video container mux and demux library, and the ffmpeg command line program for transcoding multimedia files.

Filter by
Sorted by
Tagged with
4 votes
2 answers
4k views

Why I can't check the bit rate on some videos?

I've downloaded a video from YouTube, well I've downloaded the video stream and the audio stream of a YouTube video separately. Then with this ffmpeg command ffmpeg -protocol_whitelist "file,http,...
Nicryc's user avatar
  • 141
4 votes
1 answer
2k views

How to replace background green color

I'm using lenscorrection filter on a video and the result contains green background as canvas! How Can i replace this color with different one or an image? This is the command i used: ffmpeg -i out....
salem's user avatar
  • 43
4 votes
2 answers
845 views

What does the `-context` parameter mean when using FFV1 in ffmpeg

In the docs for FFV1 there's a parameter -context, which can be set to 'small' or 'large'. That's all the documentation I can find. While I'm at it, what are the relative benefits of the different ...
stib's user avatar
  • 13.7k
4 votes
1 answer
331 views

How does QuickTime Player know when do play a video in HiDPI/Retina/@2x mode?

When you’re on a Mac with Retina Display (HiDPI), and you make a screen recording using QuickTime Player, whenever that video is played in QuickTime Player, it is shown with the expected 2:1 pixel ...
Sean Moubry's user avatar
4 votes
1 answer
9k views

What are the differences between the three bundled ffmpeg prores encoders?

I'm using ffmpeg and while looking through the list of codes with ffmpeg -codecs I realized there are actually three different prores encoders: prores prores_aw prores_ks What are the differences ...
Patrick Kenny's user avatar
4 votes
1 answer
16k views

FFmpeg : How to replace video background color with transparency? (while capturing)

I want to capture a window and overlay it on another video. This is my command: ffmpeg -i MainVideo.avi -f gdigrab -framerate 25 -video_size 300x200 -i title="MyWindow" -filter_complex "[0]setpts=...
Maria's user avatar
  • 223
4 votes
1 answer
3k views

inserting video clip into another video but keep original audio

I need to replace video in a larger mp4 file with a smaller mp4 clip - but leaving the original (larger clip) audio intact. So for example I might want the first 2 seconds of SmallClip.mp4 to replace ...
WoogieBoogie's user avatar
4 votes
1 answer
3k views

ffmpeg audio to visualisation

I would like to "convert" audio to video visualisation (oscilloscope or waveform) sort of like some media players have. I read this thread on how to do so with ffmpeg: How do I turn audio into video ...
Arete's user avatar
  • 176
4 votes
1 answer
5k views

quickly extract video frames with ffmpeg

I am using ffmpeg to extract frames from videos. I have the following code thus far: ffmpeg -i vid.mp4 -vf fps=1/10 images%05d.png My issue is that it takes awhile! 6 seconds per image on average. ...
CephBirk's user avatar
  • 185
4 votes
2 answers
4k views

ffmpeg: mute first 2 seconds in all audio streams

Looking to edit a blip out of the beginning of a video/audio file: How can I use ffmpeg to only edit the first two seconds of the clip so that there's no longer that blip in the audio? How do I ...
Tony's user avatar
  • 151
4 votes
1 answer
5k views

How to specify CRF quality settings for different encoding software

Is there a way of specifying a quality setting for h.264 that is not software dependant? I'm trying to help a colleague create a specification for outside contractors when they deliver video to us ...
stib's user avatar
  • 13.7k
4 votes
1 answer
8k views

Video Capture using ffmpeg (V4L2 indev) Results in Bad A/V Sync

I actually contributed to a bug report on this issue a year and a half ago ( https://trac.ffmpeg.org/ticket/692#comment:15 ). Basically, the problem is that using ffmpeg to record from a USB video ...
ewhac's user avatar
  • 147
4 votes
1 answer
3k views

Creating stereoscopic video from two video files

I've got two video files, each created with ffmpeg from a series of JPEG images, which I've obtained from rendering with a stereo camera in Maya. I would like to somehow merge together these videos ...
AdamHarries's user avatar
4 votes
1 answer
2k views

Is it possible to embed a thumbnail in a .mkv file?

I am trying to embed a thumbnail in a .mkv file with h265 video encoding using ffmpeg from the Linux command line. I am able to embed thumbnails in h264-encoded .mp4 files using the following command: ...
HunterThueson's user avatar
4 votes
1 answer
14k views

Creating transparent video from transparent png files using ffmpeg

I have a set of 300 transparent png files and I would like to create a transparent video file from them. I'm using the ffmpeg command as follows: ffmpeg -f image2 -i anim.%04d.png -r 30 -vcodec png ...
aaragon's user avatar
  • 143
4 votes
1 answer
9k views

How to change start time using ffmpeg?

I am recording a live stream to .ts file. But when I run this file through ffmpeg using ffmpeg -i myRecordedFile.ts it gives me wrong start time which is way out of the range. For example, my file's ...
SZT's user avatar
  • 141
4 votes
1 answer
4k views

FFmpeg: Cutting 3 seconds at the beginning of a video leaves 5 seconds blank

I have an MKV video, and want to cut the first 3 seconds. I tried with FFmpeg: ffmpeg -i /input.mkv -ss 00:00:3.0 -c copy -t 00:09:58.0 output.mkv But the result (when played in VLC) is that there ...
Ondra Žižka's user avatar
4 votes
1 answer
5k views

Convert video to 10 bit images

I have a video with these info: Format : MKV Codec : HEVC (h.265) Bit depth : 10 bits How can I get 10-bit frame grabs from it using ffmpeg?
nam's user avatar
  • 41
4 votes
2 answers
8k views

360 Degree Video Encoding for Playstation Media Player and PSVR

PlayStation 4's Media Player is very picky in terms of supported video formats, codecs, and resolutions. This becomes specifically difficult when converting high-quality virtual reality content for ...
NDB's user avatar
  • 141
4 votes
1 answer
8k views

Converting files to Avid-friendly DNxHD MXF

Please forgive the noob question, I'm new here. I've looked for an answer on this forum but not found one so far. I've also tried the BMXlib forum. I'm trying to convert small video files that have ...
Stuart Bruce's user avatar
4 votes
1 answer
2k views

How to create a x264 (mp4) video with the smallest size using ffmpeg that has just 1 image through entire video?

I'm creating narrated mp4 (x264+aac) videos for books. Each video has just the book's cover as the background. I wonder what would be the most effective way to create such videos with ffmpeg? I've ...
bodacydo's user avatar
  • 271
4 votes
1 answer
759 views

How to fix the difference between duration of ffmpeg input and output?

I am trying to generate a video from a bunch of png images and audio using the command: /usr/bin/ffmpeg -y -framerate 30 -pattern_type glob -i 'images/*.png' -i audio.wav -c:v libx264 -b:v 0 -crf 18 -...
sy_ar001's user avatar
  • 141
4 votes
1 answer
3k views

How to delete the very last frame of a video using ffmpeg / mencoder / transcode or any other?

I am trying to delete the very last frame of a video using ffmpeg / mencoder / transcode / or any other free linux application. Here is what I have so far, and it's only extracting it, it's not ...
Anonymous's user avatar
  • 161
4 votes
1 answer
8k views

how to get realtime output from ffmpeg

I am currently grabbing a live stream video with the following command: ffmpeg -i https://urlToTheStream/playlist.m3u8 -f image2 -q:v 30 C:\pathToOutputFolder\%01d.bmp video is running in 24 fps. I ...
Che's user avatar
  • 41
4 votes
1 answer
904 views

Framerate Timelapse

I'm doing a time-lapse film project about a six-month period. Now I write a script to process the thousands of photos. I use ffmpeg. The paths to the photos are in the list.tmp file and i'm using the ...
mrremo's user avatar
  • 41
4 votes
2 answers
2k views

What options are there for cloud based FFMPEG processing?

Just like Imgix and Cloudinary are image editing as a service platforms, are there any online platforms that provide ffmpeg as a service so we can run ffmpeg commands on their server? At the moment I'...
Ashit Vora's user avatar
4 votes
1 answer
8k views

Dash live streaming

after a lot of googling and after I've read tons of forums, I'm still not able to do a live stream using my cam to another device. My system is made up by a server ( a windows laptop ), that capture ...
user66350's user avatar
4 votes
1 answer
2k views

FFMPEG not writing quicktime "COLR" atom

I am attempting to create Quicktime movs with the "DNXHD" codec with the following ffmpeg command (input part excluded): -c:v dnxhd -b:v 175M -pix_fmt yuv422p10le test.mov This works, and is ...
Bryan Fordney's user avatar
4 votes
1 answer
5k views

ffmpeg: overlay rotated video with transparency

I'm new to ffmpeg (video encoding in general). I have two videos one larger than the other. I want to rotate, resize and overlay the shorter video on the larger one at defined coordinates. So far, I'...
Dhavan Vaidya's user avatar
4 votes
1 answer
3k views

ffmpeg concatenation introduces video stutter but does not affect audio

I've gone through several different variants of this process and it always causes me problems. I've gotten it working sometimes but it doesn't seem to be consistent. I have a video camera which ...
Sloloem's user avatar
  • 151
4 votes
2 answers
4k views

Convert .WMV using FFmpeg

I'd like to use FFmpeg on the Mac Terminal command line to convert a .WMV file. I'm familiar with the syntax: ffmpeg -i /path/OriginalMovieFile.wmv /path/NewMovieFile.??? However, my recent attempt ...
Crowder's user avatar
  • 687
4 votes
0 answers
164 views

Optimized Parameters of `FFMPEG` for Screen Recording

Windows has a great codec for screen recording called Windows Media Video Screen. It generates artifacts free videos which are highly compressed (small size). I was wondering, what would be the ...
Eric Johnson's user avatar
4 votes
0 answers
9k views

moov atom not found

I downloaded this video using youtube-dl's HLS downloader. The video was being HLS streamed using AES-128. Even though I could view it perfectly fine when it was being streamed in the browser, VLC ...
SOuser's user avatar
  • 65
4 votes
0 answers
3k views

Getting FFMPEG to stream video+audio through RTMP

Can someone help me with this: The video streams fine but I can't hear any audio. I just hear random click sounds. Please help: ffmpeg -f video4linux2 -channel 1 -i /dev/video0 -f alsa -i plughw:2,0 ...
Josh's user avatar
  • 141
4 votes
0 answers
2k views

FFmpeg map_channel and video

I have a file that has the following format (note the number of tracks and channels within each track): Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'a.mov': Metadata: major_brand : qt ...
charisk's user avatar
  • 183
3 votes
3 answers
5k views

What's the difference between "visually lossless" and real lossless and what does this mean for future encodes?

In FFmpeg's H.264 Video Encoding Guide we are told: Tip: If you're looking for an output that is roughly "visually lossless" but not technically lossless, use a -crf value of around 17 or 18 (you'...
user3643's user avatar
  • 2,204
3 votes
2 answers
6k views

How to ignore certain type of streams (mjpeg) while encoding videos in ffmpeg

I've several mkv files which have streams similar following. These files may have more than one audio stream and/or subtitles e.t.c. But my problem is mjpeg streams. Stream #0:0 -> #0:0 (h264 (...
Ergec's user avatar
  • 135
3 votes
3 answers
986 views

Can I use h.264 codec inside .mp4 container for my website

I would like to use h.264 as the codec inside .mp4 container for my user uploaded videos for my website. But I saw somewhere that h.264 is non free. I am unsure whether I can use this technology or ...
Robin's user avatar
  • 175
3 votes
2 answers
103k views

Typical size of one hour long mp4 video

What is the typical size of a mp4 video, size 1280x720 encoded by ffmpeg libx264, and lasts for one hour? Currently my file is around 700Mb, is it too much?
Dzung Nguyen's user avatar
3 votes
3 answers
6k views

Is there any ffmpeg command for knowing max bit rate of a video?

I have an MP4 file input.mp4 which is encoded in libx264. By ffprobe command: ffprobe -v error -show_streams input.mp4 I can know the bit rate of input.mp4, but it does not give the information of ...
shintaroid's user avatar
3 votes
1 answer
2k views

Do you have to build ffmpeg from source to use 10-bit codecs in Windows?

I'm trying to find somewhere I can download pre-built binaries of ffmpeg for Windows with 10-bit codec support. Apparently, from what I've read, ffmpeg has to be either 8-bit or 10-bit, and the ...
Patrick Kenny's user avatar
3 votes
2 answers
18k views

How to set pts time format when using ffmpeg filter to add timestamp

I want to add timestamp of current played time to a video, so I use this: ffmpeg -i video.mkv -filter_complex "drawtext=fontfile=/Library/Fonts/Arial.ttf: text='timestamp: %{pts \: hms}': x=5:...
Wayne Chen's user avatar
3 votes
2 answers
10k views

Lossless conversion of yuv420p10le to yuv420p

I have an mp4 movie, containing an h264 video stream (pixel format yuv420p10le), and an AAC audio stream. My favorite player cannot read the yuv420p10le pixel format. I was wondering if it is ...
Frizlab's user avatar
  • 155
3 votes
1 answer
7k views

How to identify i-frame from idr-frame in the ffprobe show frames output?

The ffprobe show frames output shows the following details: [FRAME] media_type=video key_frame=1 pkt_pts=42 pkt_pts_time=0:00:00.042000 pkt_dts=42 pkt_dts_time=0:00:00.042000 pkt_duration=N/A ...
cnvzmxcvmcx's user avatar
3 votes
1 answer
4k views

Convert mkv to mp4 (or webM) with the output file viewable in the process

I'm trying to find a way to convert a MKV file into MP4 and actually already start to view it, while it's still converting. The output file would be viewed via Chrome or Firefox and I would like to ...
user avatar
3 votes
1 answer
21k views

Mono to Stereo using FFMPEG

I have an unusual problem that I hope someone can help me solve. I have 45 video files that I'm batch encoding as MP4. Some of those files have their audio channel position set to Front L R and others ...
d13's user avatar
  • 671
3 votes
3 answers
7k views

FFMPEG - convert video to Black & White with threshold?

I'd like to convert videos to black and white but also specify the threshold of what to convert to black/white. I'm currently using cv2 to do this successfully using the 2 lines below (first converts ...
user3158732's user avatar
3 votes
1 answer
2k views

FFMPEG stop converting from TrueHD to PCM

I'm trying to convert a TrueHD 7.1 soundtrack to PCM format but ffmpeg give me an error and stopped. Here's the output of ffmpeg: user:~$ ffmpeg -i source.thd -c:a pcm_s24le -ar 48000 output.wav ...
Hartman's user avatar
  • 135
3 votes
1 answer
7k views

ffmpeg concat error

I am trying to concatenate two video files using ffmpeg, and am receiving and error. Two eliminate compatibility issues between the two videos, I am been concatenating the same video with itself, and ...
Scorb's user avatar
  • 189
3 votes
2 answers
17k views

How to change output filename in ffmpeg batch?

I'm using windows and ffmpeg to convert video mp4 into audio mp3. I've come up with the following batch line that will do the job: for %f in (*.mp4); do ffmpeg -i %f -vn -ar 44100 -ac 1 -b:a 32k -f ...
user3643's user avatar
  • 2,204

1
3 4
5
6 7
44