Skip to content
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

Recording audio from host pc: synchronize audio and video #26

Open
vinipsmaker opened this issue May 15, 2020 · 2 comments
Open

Recording audio from host pc: synchronize audio and video #26

vinipsmaker opened this issue May 15, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@vinipsmaker
Copy link

I've spent an hour trying to record audio and sync'ing with the video. I'm gonna paste my findings here and possibly get back to this issue when I have the time.

Just put -f pulse -ac 2 -i default to ffmpeg command and it'll record the audio. However, ffmpeg is very picky about ordering of the args. You must put these options after output path.

Also, I've tried to use the arg -use_wallclock_as_timestamps 1, but it wasn't good enough. This thread has a few other methods to try: https://superuser.com/questions/1042988/ffmpeg-audio-out-of-sync-when-transcoding-demuxing-from-dv/1054478

I've also tried to replace ffmpeg with gst-launch, but I only managed to capture the first frame and that's another story anyway.

@rien
Copy link
Owner

rien commented May 16, 2020

Hi, I've been troubleshooting a bit and apparently ffplay is unable to work with multiple streams.

If you want to give multiple inputs to ffmpeg, the -i input_url should be the argument in the 'group' for that input. So -f pulse -i default should either be the first argument "group", or be placed after the -i -.

What is is specifically that you want to achieve and what is not working yet?

@vinipsmaker
Copy link
Author

What is is specifically that you want to achieve and what is not working yet?

The A/V sync makes the whole endeavour unusable. I need to tune options to get usable A/V sync.

@rien rien changed the title Recording audio from host pc Recording audio from host pc: synchronize audio and video Jul 13, 2020
@rien rien added the enhancement New feature or request label Jul 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants