32 votes
Accepted

What is KeyInt and min-keyint and no-scenecut

The frames in your H.264 video are grouped into units called GOPs (Group Of Pictures). Inside these GOPs frames are classified into three types: I-frame: frame that stores the whole picture P-frame: ...
mcont's user avatar
  • 760
25 votes
Accepted

How to fade in/out a video/audio clip with unknown duration?

#1 To simultaneously fade the audio in/out: ffmpeg -i clip.mp4 -vf 'fade=in:0:30,fade=out:960:30' -af 'afade=in:st=0:d=1,afade=out:st=32:d=1' -c:v libx264 -crf 22 -preset ...
Gyan's user avatar
  • 33.1k
15 votes

How to fade in/out a video/audio clip with unknown duration?

It's a terrible hack, but this might work if all you want to do is audio fade in/out but don't know exactly how long the clip is: ffmpeg -i input.mp4 -filter_complex "afade=d=0.5, areverse, afade=d=0....
marekventur's user avatar
12 votes

Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly

The usual solution for this situation: -fflags +genpts It should eliminate the warning, but there's no guarantee your sync issues will be solved.
Mike Brown's user avatar
10 votes
Accepted

Can video have multiple streams (like it has 2 audio streams)

Yes. MPEG-4 Part 14 (the MP4 container format) supports any number of objects (e.g. video, audio and subtitle streams) and isn't limited to only one stream per content type. In practice however, you ...
MoritzLost's user avatar
  • 5,412
9 votes
Accepted

ffmpeg concat introduces a/v sync problem

Run ffmpeg -i titlefile.mp4 -vf setdar=16/9 -video_track_timescale 29971 -ac 1 newtitle.mp4 and then run concat with the new title video. Modern containers like MP4 have Presentation TimeStamps, ...
Gyan's user avatar
  • 33.1k
8 votes
Accepted

Loudness control LUFS level adjustments

FFmpeg's loudnorm filter can be used. Basic syntax is ffmpeg -i in.mp4 -c:v copy -af loudnorm=I=-23:LRA=1 -ar 48000 out.mp4 The loudness range (LRA) should be 2 x max deviation. Also see the ...
Gyan's user avatar
  • 33.1k
8 votes
Accepted

FFMPEG: Loop video to the length of audio

For video, stream_loop option should be used. ffmpeg -y -stream_loop -1 -i video -i audio.mp3 -fflags +shortest -max_interleave_delta 50000 -c copy output.mp4 You'll have to use a very recent ...
Gyan's user avatar
  • 33.1k
7 votes
Accepted

Mono to Stereo using FFMPEG

If you run ffmpeg -layouts, you will see that stereo indicates the presence of two channels, one assigned as Front Left and the other as Front Right. If you use -ac 2 in your encode, ffmpeg will ...
Gyan's user avatar
  • 33.1k
7 votes

What is KeyInt and min-keyint and no-scenecut

Most video encoders apply temporal compression i.e. most frames only store the difference in image content relative to other frames, thus saving storage space, while a few frames store the whole image....
Gyan's user avatar
  • 33.1k
6 votes
Accepted

Do I need an audio recorder?

Back in the day when movie cameras recorded to film, the sound made by the cameras was something to be isolated from the sound recording process. Digital video cameras make very little noise (with ...
Michael Tiemann's user avatar
6 votes
Accepted

App to quickly analyze audio loudness of several video files?

ffmpeg, a free multi-platform command-line tool, can do this. Use the volumedetect and EBUR filters on each of the files ffmpeg -i input.mov -af volumedetect,ebur128 -f null - 2> input.log This ...
Gyan's user avatar
  • 33.1k
6 votes

How to modify audio level of video according to replaygain info?

FFmpeg, a free command-line tool, has a volume filter that should do this. Syntax would be ffmpeg -i input.mp4 -c:v copy -af volume=replaygain=track output.mp4 The af invokes the volume filter with ...
Gyan's user avatar
  • 33.1k
5 votes
Accepted

How to precisely synchronise an audio and video track from separate devices?

First off, if you have audio with your video (that you want to replace with your high-quality audio recording), then step #1 is to nudge the Zoom audio track to line up the impulse of the clap with ...
Michael Tiemann's user avatar
5 votes
Accepted

By how much can video and audio be out of sync?

There are, in fact, several standards on audio/video or lip sync. The problem is, they can't all agree on what the acceptable error is. What is well understood is that if the audio lags the video it ...
Michael Liebman's user avatar
5 votes
Accepted

What is the difference between audio Sampling rate and Frame rate?

Audio samples are encapsulated into frames as well. For PCM, the framing is notional, but for DCT-based codecs, it's a basic requirement. AAC typically bundles 1024 samples per frame, so 1 second of ...
Gyan's user avatar
  • 33.1k
5 votes
Accepted

How to tell ffmpeg to copy all streams except one audio stream (to encode)?

Use ffmpeg -i input.mkv -map_metadata 0 -map 0 -c copy -c:a:0 ac3 -vbr 3 output.mkv See https://superuser.com/a/1219824 for an illustrated guide to how stream options are parsed.
Gyan's user avatar
  • 33.1k
5 votes
Accepted

Are most scenes in movies voiced over in post production?

It's generally preferred to use the actual dialog audio from the take. It matches the movement of the lips, it sounds right for the environment, the actor is giving an authentic performance, etc. ...
wrosecrans's user avatar
4 votes

Increasing Overall Audio level

Yes. You can use FFmpeg, a free command-line tool, like so: ffmpeg -i video.wmv -c:v copy -af dynaudnorm out.wmv dynaudnorm is a dynamic audio normalizer, which will maintain the original range ...
Gyan's user avatar
  • 33.1k
4 votes
Accepted

Do a sort of HEAC - High Efficiency Audio Codec exists?

I think HE-AAC fits that bill. High-Efficiency Advanced Audio Coding (HE-AAC) is an audio coding format for lossy data compression of digital audio defined as an MPEG-4 Audio profile in ISO/IEC ...
Gyan's user avatar
  • 33.1k
4 votes
Accepted

Why headphones doesn't work with mic out port?

Microphones output at mic level, which is a signal that ranges from around 0.001 volts to 0.01 volts. Headphones work at closer line level, which is around 1 volt. Based off that information, you can ...
Michael Liebman's user avatar
4 votes

Using FFMPEG, how does one manage to find the file to convert?

If a filename or its folder has spaces or other special characters, you need to enclose it in quotes i.e. ffmpeg -i "c:\this\file name\and path\has\spaces in it.mp4" ...
Gyan's user avatar
  • 33.1k
4 votes

Extract all audio channels as separate wave file from a multichannel file

For me the -map_channel option did the trick: get the file layout using ffprobe multichannelinputfile.mov ffprobe version 4.1 Copyright (c) 2007-2018 the FFmpeg developers built with Apple LLVM ...
kaosbeat's user avatar
4 votes

Error converting mp4 to matroska format

Your ffmpeg is outdated. Update and it will automatically insert some bitstream filters (at least aac_adtstoasc, hevc_mp4toannexb, h264_mp4toannexb). According to the aac_adtstoasc documentation: ...
llogan's user avatar
  • 10.1k
4 votes
Accepted

Disguising the identity of a voice over

You have a few options for disguising a voice, but several of them intentionally make the sound unnatural. Have someone else record the voiceover. This is the only technique that results in a truly ...
Michael Liebman's user avatar
4 votes
Accepted

Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly

this worked for me as an option to ffmpeg: -use_wallclock_as_timestamps 1
shafi's user avatar
  • 333
4 votes

Decreasing levels of other channels when voice channel comes in

"Ducking" is the canonical term for what you want, usually done with a compressor in the main program chain with the sidechain taken from your mic channel. Audition 2018 has a auto ducking feature ...
Dan Mills's user avatar
  • 211
4 votes
Accepted

Is there any way to record external audio from a Canon Rebel R6?

Welcome to Video Production Stack Exchange! Bad news first- Unfortunately, you are stuck with the in-camera mic with the T6. The T6i has a microphone jack for mounting an external microphone. If ...
Joshjurg's user avatar
  • 395
4 votes

What is the typical audio to video sync threshold when it becomes noticeable?

I don't know if there's a "standard", my personal opinion - "it depends". In general you'll get away with a frame or two out of sync, although most editors will just line it up as accurately as ...
Peter Barton's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible