[FFmpeg-user] Audio Desynchronization When Utilizing Segmentation

Gabriel Balaich roderrooder at gmail.com
Sun Mar 25 00:05:36 EET 2018

 Hey all, I was hoping I could a get  a bit of help on a problem I'm having.

Here is my code:
ffmpeg -y -thread_queue_size 5096 -f dshow -video_size 3440x1440 -rtbufsize
2147.48M -framerate 100 -pixel_format nv12 ^
-itsoffset 00:00:00.015 -i video="Video (00 Pro Capture HDMI 4K+)"
-thread_queue_size 5096 -guess_layout_max 0 -f dshow ^
-rtbufsize 2147.48M -i audio="SPDIF/ADAT (1+2) (RME Fireface UC)" -map
0:0,1:0 -map 1:0 -c:v h264_nvenc -preset: llhp ^
-pix_fmt nv12 -b:v 250M -minrate 250M -maxrate 250M -bufsize 250M -b:a 384k
-ac 2 -r 100 -async 1 -vsync 1 ^
-max_muxing_queue_size 5096 -segment_time 300 -segment_wrap 9 -f segment

My goal is to continuously record without filling up my hard drive keeping
the last hour and 30 minutes of footage at all times.
I'd like to have the ability to edit a group or even just a single segment
without any dependencies. As in be able to drag one
or more clips into a video editing program like adobe premiere regardless
of how long I have been recording and have
everything line up perfectly, including desirable audio to video
synchronization.Segmentation seemed perfect for this... but
when I drag the segments into a video editing program like Adobe premiere
the audio slowly drifts from the video after each
break. If I remove segmentation and record one continuous clip this does
not seem to be a problem, video and audio stay
synchronized. Is there anyway to force the beginning of each segment to
pick up exactly where the last one left off?

Apologies if any part of my code is redundant, and thank you for any help.

More information about the ffmpeg-user mailing list