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
9 votes

Remove flickering due to artificial light with ffmpeg

The following worked well for me, based on the same ideas http://www.premiumbeat.com/blog/quick-trick-for-de-flickering-your-video-shots/ https://superuser.com/questions/1025794/merge-two-videos-...
niscove's user avatar
  • 91
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.2k
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
4 votes

Sync several movie clips with one audio file

This sounds like a perfect candidate for using multi-camera editing. You can automagically synch all the clips using their audio, and turn them into a multicam source, which lets you edit from the ...
stib's user avatar
  • 13.7k
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
Accepted

ffmpeg to cut subtitle file in sync with the cut video

Found out that ffmpeg works on the text based subtitle file just as well: $ cat subtitles.srt 1 00:00:06,000 --> 00:00:20,000 This is demo subtitle 1 2 00:00:20,000 --> 00:00:40,000 This is ...
xpt's user avatar
  • 185
3 votes
Accepted

Audio without video is OK, but WITH video it is delayed

You've to reset the timestamps: [1:a]atrim=start=2.52:end=1:38.0,aloop=100:7700,asetpts=N/SR/TB[audio]
Gyan's user avatar
  • 33.2k
3 votes
Accepted

Syncing audio and video from different sources

This is a rather common problem. The issue is NOT sample-rate. And the issue is NOT frame-rate, either. Most modern editing software (or file-manipulation software) is capable of easily resolving ...
Richard Crowley's user avatar
3 votes
Accepted

Is it possible to capture video signal waveform as audio for video replay?

The short answer to your question is "no". The sample rate of video is typically measured in MHz or GHz. If you have a 1080p24 signal at 8 bits per pixel, the actual frame is 2750 x 1125 pixels (...
Michael Tiemann's user avatar
3 votes
Accepted

OBS Studio: desktop audio falls out of sync

So with everything I've tried I'm not sure if I messed anything up, but.... Turning off "Use device timestamps" in the properties of "desktop audio" fixed the problem.
xyious's user avatar
  • 141
3 votes
Accepted

Lossless A/V delay with ffmpeg

Basic method is ffmpeg -i in.mp4 -itsoffset -0.6 -i in.mp4 -map 0:v -map 1:a -c copy new.mp4 FFmpeg will write an editlist in new.mp4. Players like VLC, Potplayer which parse the editlist will honor ...
Gyan's user avatar
  • 33.2k
3 votes

What causes audio sync drift when digitizing VHS?

Audio drift can have a couple of causes, dropped frames (which a TBC can help with), and unstable clocks, where the audio isn't recorded at quite the precise rate it should be, causing drift, as ...
Peter Barton's user avatar
3 votes
Accepted

How to combine multiple audio tracks without sounding blasted?

When you record each track, make sure that the level never goes up to zero on the meter. If it hits zero, it means that the recording is clipping. Clipping is when the computer can no longer ...
tomh's user avatar
  • 7,782
2 votes

Losing audio/video sync in Adobe Premiere with mp4's

I had the same issue on Windows 10 with a Variable Frame Rate (VFR) video recorded using Shadowplay. Here's how I fixed it without requiring to convert the video using Handbrake or any other converter:...
Molten Ice's user avatar
2 votes

Sync several movie clips with one audio file

Premiere and FCP-X both have auto-sync features to get multiple audio and video clips synced together. Chances are very good that you can get your first video clip to align with the audio clip ...
Michael Tiemann's user avatar
2 votes

Sync several movie clips with one audio file

Create a timeline from the master audio track, then drop the video clips one by one onto a matching video track using the native sound from those clips as a guide to line them up with the good audio. ...
Jim Mack's user avatar
  • 4,674
2 votes
Accepted

How is 29.97 timecode generated over a full day without frame errors?

As per the Broadcast Engineer's Reference Book, p. 203 This correction will match DF time to real time to within approximately 2.6 frames per day; to eliminate the residual error the timecode ...
Gyan's user avatar
  • 33.2k
2 votes
Accepted

Rolling shutter strobe pattern

No matter when the camera shutter is active, if the frequencies of the video vertical timing (the frame rate) and the laser pulse are not congruent, you'll see partial exposures as they drift apart. ...
Jim Mack's user avatar
  • 4,674
2 votes

Resynchronizing audio in a variable framerate video with missing timing data

No matter how you slice it, this sounds like it's going to be painful if not impossible, mostly because you say the rate changes dynamically. My best suggestion would be to use a software like Adobe ...
John Barton's user avatar
2 votes
Accepted

Subtitles do not match spoken dialogue. Why?

This is an educated guess as I'm not sure anyone can give a concrete answer as to this particular show's specific reason, but since it was dubbed, there's a solid possibility that the subtitles are a ...
AJ Henderson's user avatar
  • 19.4k
2 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

This error can also be eliminated in some situations (VFR source files with unusual timebases) by using -vsync 0 -enc_time_base -1
electron.rotoscope's user avatar
2 votes

Audio/video sync software for Linux (preferably open source)

I assume that you have a sound channel recorded on the camera which is in sync with the picture. In that case you only have to find the offset between the audio channels. This tool claims just that: ...
beemtee's user avatar
  • 121
2 votes
Accepted

Add timecode information to file

@Gyan gives the answer in comments: MP4s and MOVs store only the TC of the first frame, as a literal frame count, along with the framerate. The consuming app converts that frame count back to a TC ...
iter's user avatar
  • 251
2 votes

What causes audio sync drift when digitizing VHS?

No, a TBC won't solve an audio-video sync problem. Most likely the sync problem is coming from a shortcut in the capture device or driver that samples the audio and video with separate and/or unstable ...
Michael Liebman's user avatar
1 vote
Accepted

How long should video clips be to be in sync with a 90 BPM song?

If you want a new image at every beat, start with the frame rate of your video. 30 frames per second gives 1800 frames per minute. Divide that by 90 to get the number of frames per beat, in this case ...
Jim Mack's user avatar
  • 4,674
1 vote
Accepted

SDI loop through with LTC embedder

It is quite possible to make, but think FPGA with 3 Gig SERDES (so probably a modest Kintex 7 or something similar) with a couple of SDI line IO parts (TI) and maybe a PLL from SI Labs, add some power ...
Dan Mills's user avatar
  • 211
1 vote
Accepted

Syncing Multiple Audio Streams With One Video Stream (FFMPEG)

Just thought I'd let you guys know that I got this working. I needed to use -framerate instead of -r to get it to duplicate dropped frames, the reason I wasn't using -framerate in the first place is ...
ninbura's user avatar
  • 121
1 vote
Accepted

ffprobe/ffplay/ffmpeg command for checking audio/video sync

This tool is impossible. Almost. To check sync of audio/video, you need something what appeared in both streams, what can be used as sync points. In old days used Clapperboard during film shooting. ...
bukkojot's user avatar
  • 675
1 vote

Imported video getting out-of-sync audio in Adobe Premiere

It sounds like your source media went through quite a lot of different operations, which makes it difficult to say what exactly has upset the audio/video sync. I would start by trying to isolate the ...
Tony Sepia's user avatar

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