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

Not producing frames with no signal #18

Open
deadbeef84 opened this issue May 28, 2020 · 1 comment
Open

Not producing frames with no signal #18

deadbeef84 opened this issue May 28, 2020 · 1 comment

Comments

@deadbeef84
Copy link

It seems when my Kona4 card doesn't have a signal, the V4L2 driver doesn't produce any output. I guess this makes sense, but it becomes a problem in my ffmpeg pipeline, which looks something like this:

ffmpeg -f v4l2 -i /dev/video0 -f alsa -i hw:Kona4,0 ...

The problem with this is that audio samples are still delivered from alsa, but no frames are generated when there's no signal. When it gets a signal, ffmpeg tries to make up for the missing frames by duplicating them, but for some reason it doesn't seem to recover. I've tried different -vsync options but with different degrees of success.

Now I'm wondering if it would be possible for this driver to continue producing frames even when there's no input? I'm thinking either duplicate frames, send null frames, or send black frames. It seems v4l2loopback has exactly this feature, do you have any experience using that together with this driver?

@davids635
Copy link
Contributor

What you ask is not unreasonable. The driver could produce black frames with the same timing that the audio is using. I am trying to find time to work on updating the driver for new kernels. Perhaps I can add this feature at the same time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants