-
-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sync issue with varying audio delay progressively getting worse over time of the video #192
Comments
I have a similar issue when streaming for a long time over HLS. After about a night running uninterruptedly, the next morning Chrome browser refuses to play the stream entirely. ffplay shows an A-V sync of about -150 (meaning video is 150 frames behind audio). In fact, ffplay shows the A-V sync is drifting immediately as soon as picam is started, although the value is very small and unnoticeable in the beginning. |
Anyone found a workaround? I have run into the same issue when live streaming to YouTube. Using a Samson go USB mic. My workaround is to place it in a bash script that pkills libcamera-vid every 20 minutes and restarts the livestream. But sometimes the pkill doesn't work. Maybe there is a more elegant solution?
|
As for picam, please try setting the resolution to 1280x720 (using @feacluster For libcamera-vid issues, I recommend reaching out to the libcamera-vid community for further assistance. |
Also try using a lower fps like If the recording problem persists, I think the Raspberry Pi is doing too much work. |
Thank you for this repository. I am getting varying audio delays. In beginning of video, audio seems fine but audio delays keep getting progressively worse over the time of the video. I tried using itsoffset as referenced in another issue but since the sync issue varies over time, a consistent delay does not work. It can get audio synced in the middle of the video but then audio in beginning is behind and later in video it is ahead. Any ideas? Below is the bash script I use to call picam commands and below that is --dump-hw-params. Please let me know if need any additional information. Thank you again!
Bash script to run 5 minutes of video with a few sleeps before, during, and after
Hardware dump
$ arecord --dump-hw-params -D hw:1,0
Recording WAVE 'stdin' : Unsigned 8 bit, Rate 8000 Hz, Mono
HW Params of device "hw:1,0":
ACCESS: MMAP_INTERLEAVED RW_INTERLEAVED
FORMAT: S16_LE
SUBFORMAT: STD
SAMPLE_BITS: 16
FRAME_BITS: 16
CHANNELS: 1
RATE: [44100 48000]
PERIOD_TIME: [1000 5944309)
PERIOD_SIZE: [45 262144]
PERIOD_BYTES: [90 524288]
PERIODS: [2 1024]
BUFFER_TIME: [1875 11888617)
BUFFER_SIZE: [90 524288]
BUFFER_BYTES: [180 1048576]
TICK_TIME: ALL
arecord: set_params:1339: Sample format non available
Available formats:
The text was updated successfully, but these errors were encountered: