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
fix 'Could not found v4l2 muxer' on linux #2718
Conversation
There is indeed a problem. Could you please post the output of |
I suggest this instead: diff --git a/app/src/v4l2_sink.c b/app/src/v4l2_sink.c
index cae3eee9..95e20541 100644
--- a/app/src/v4l2_sink.c
+++ b/app/src/v4l2_sink.c
@@ -183,8 +183,11 @@ sc_v4l2_sink_open(struct sc_v4l2_sink *vs) {
goto error_mutex_destroy;
}
- // FIXME
- const AVOutputFormat *format = find_muxer("video4linux2,v4l2");
+ const AVOutputFormat *format = find_muxer("v4l2");
+ if (!format) {
+ // Alternative name
+ format = find_muxer("video4linux2");
+ }
if (!format) {
LOGE("Could not find v4l2 muxer");
goto error_cond_destroy; (I'm still interested in the result of |
neither18.04 nor20.04 can work
|
Yes, your solution works on ubuntu 18.04/20.04 |
The AVOutputFormat name is a comma-separated list. In theory, possible names for V4L2 are: - "video4linux2,v4l2" - "v4l2,video4linux2" - "v4l2" - "video4linux2" To find the muxer in all cases, we must request exactly one muxer name at a time. PR #2718 <#2718> Co-authored-by: Romain Vimont <rom@rom1v.com> Signed-off-by: Romain Vimont <rom@rom1v.com>
That's what I expected. On my computer (Debian sid), I get:
Both names are valid: https://github.com/FFmpeg/FFmpeg/blob/cd38fbf4f7992dec59da6f76344e6e6c1826efea/doc/indevs.texi#L1336 Merged into |
The AVOutputFormat name is a comma-separated list. In theory, possible names for V4L2 are: - "video4linux2,v4l2" - "v4l2,video4linux2" - "v4l2" - "video4linux2" To find the muxer in all cases, we must request exactly one muxer name at a time. PR #2718 <#2718> Co-authored-by: Romain Vimont <rom@rom1v.com> Signed-off-by: Romain Vimont <rom@rom1v.com>
The AVOutputFormat name is a comma-separated list. In theory, possible names for V4L2 are: - "video4linux2,v4l2" - "v4l2,video4linux2" - "v4l2" - "video4linux2" To find the muxer in all cases, we must request exactly one muxer name at a time. PR #2718 <#2718> Co-authored-by: Romain Vimont <rom@rom1v.com> Signed-off-by: Romain Vimont <rom@rom1v.com>
on ubuntu 20.04, test scrcpy with v4l2, it can't work