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

Mpv failed to start #337428

Closed
Shobhit0109 opened this issue Aug 26, 2024 · 10 comments
Closed

Mpv failed to start #337428

Shobhit0109 opened this issue Aug 26, 2024 · 10 comments
Labels
0.kind: bug Something is broken

Comments

@Shobhit0109
Copy link

Shobhit0109 commented Aug 26, 2024

Describe the bug

I used nix-shell to install mpv and try to start it but this error occurs - "Segmentation fault".

Screenshot

image

Additional context

Pipewire version -
image

Metadata

image

@Shobhit0109 Shobhit0109 added the 0.kind: bug Something is broken label Aug 26, 2024
@AchmadFathoni
Copy link

Just small advice, don't screenshot text from terminal. You should copy the text form terminal and paste it here so it could be searched by other.

@Guanran928
Copy link
Contributor

I think you might need to use something like https://github.com/nix-community/nixGL for some graphical stuff to work on non-NixOS distributions.

@Shobhit0109
Copy link
Author

Thanks!! for the solution.
This works for me :)

@Shobhit0109
Copy link
Author

Shobhit0109 commented Aug 26, 2024

Reopening this issue because there is no sound when opening with nixGLIntel.
Using pipewire on ubuntu

@Shobhit0109 Shobhit0109 reopened this Aug 26, 2024
@eclairevoyant
Copy link
Contributor

nixgl isn't a supported solution and doesn't work a lot of the time; in general graphical apps from nixpkgs tend to work only on nixos

@Atemu
Copy link
Member

Atemu commented Sep 13, 2024

What's the error message of pipewire?

@Shobhit0109
Copy link
Author

Problem: No audio in the mpv using nix flakes.

command: nix shell nixpkgs#mpv --command mpv "https://www.youtube.com/watch?v=scuyV9czoy0&list=RDscuyV9czoy0

Logs:
Resuming playback. This behavior can be disabled with --no-resume-playback.
Not seekable, but enabling seeking on user request.
Not seekable, but enabling seeking on user request.
Not seekable, but enabling seeking on user request.
Not seekable, but enabling seeking on user request.
(+) Video --vid=1 () (h264 1280x720 60.000fps)
(+) Audio --aid=1 --alang=eng (
) (opus 2ch 48000Hz)
Subs --sid=1 --slang=en 'English' (webvtt) (external)
Subs --sid=2 --slang=hi 'Hindi' (webvtt) (external)
Subs --sid=3 --slang=hi-orig 'Hindi (Original)' (webvtt) (external)
File tags:
Uploader: Lofi Tape
Channel_URL: https://www.youtube.com/channel/UCOjk6zmyuAtS3MOJ96GB0Sg
[vo/gpu/drm] VT_GETMODE failed: Inappropriate ioctl for device
[vo/gpu/drm] Failed to set up VT switcher. Terminal switching will be unavailable.
[vo/gpu/opengl] Failed to get EGL display.
[vo/gpu] Failed to setup EGL.
[vo/gpu] Failed to commit atomic request: No such file or directory
[vo/gpu-next/drm] Can't handle VT release - signal already used
[vo/gpu-next/drm] Failed to set up VT switcher. Terminal switching will be unavailable.
[vo/gpu-next/opengl] Failed to get EGL display.
[vo/gpu-next] Failed to setup EGL.
[vo/gpu-next] Failed to commit atomic request: Success
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory
[vo/vdpau] Error when calling vdp_device_create_x11: 1
[ffmpeg] AVHWDeviceContext: Cannot load libcuda.so.1
[ffmpeg] AVHWDeviceContext: Could not dynamically load CUDA
[vaapi] libva: dlopen of /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so failed: libigdgmm.so.12: cannot open shared object file: No such file or directory
[vaapi] libva: /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so init failed
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory
AO: [pipewire] 48000Hz stereo 2ch floatp
VO: [wlshm] 1280x720 yuv420p

    Title: In Aankho Me Tum Jab Se Ho Gye Gum 2022 Lofi Version Song | Lofi Tape | Jodha Akbar Zee tv

Saving state.
Exiting... (Quit)

Screenshot:
image

Additional system info: I have both intel & nvidia gpu

@Atemu
Copy link
Member

Atemu commented Sep 15, 2024

That's just the opengl error that requires nixGL to work around.

Please provide the pipewire error when nixGL is in use.

@Shobhit0109
Copy link
Author

Using nixGL with intel card. I got a blue screen & mp audio in mpv and these logs.
I am not sure how to get pipewire logs.

Resuming playback. This behavior can be disabled with --no-resume-playback.
Not seekable, but enabling seeking on user request.
Not seekable, but enabling seeking on user request.
Not seekable, but enabling seeking on user request.
Not seekable, but enabling seeking on user request.
(+) Video --vid=1 () (h264 1280x720 29.970fps)
(+) Audio --aid=1 --alang=eng (
) (opus 2ch 48000Hz)
Subs --sid=1 --slang=en 'English' (webvtt) (external)
Subs --sid=2 --slang=en-orig 'English (Original)' (webvtt) (external)
Subs --sid=3 --slang=hi 'Hindi' (webvtt) (external)
File tags:
Uploader: Swami Mukundananda
Channel_URL: https://www.youtube.com/channel/UCclfz6zVWWOpsQsg3OheI3g
[vo/gpu/opengl] before init_gl: OpenGL error INVALID_OPERATION.
[vo/gpu/opengl] after init_gl: OpenGL error INVALID_OPERATION.
[vo/gpu/opengl] Error: framebuffer completeness check failed (error=0).
[vo/gpu] Error: texture could not be created.
[vo/gpu/opengl] after creating texture: OpenGL error INVALID_OPERATION.
[vo/gpu/opengl] Error: framebuffer completeness check failed (error=0).
[vo/gpu] Error: texture could not be created.
[vo/gpu/opengl] after creating texture: OpenGL error INVALID_OPERATION.
[vo/gpu/opengl] Error: framebuffer completeness check failed (error=0).
[vo/gpu] Error: texture could not be created.
[vo/gpu/opengl] after creating texture: OpenGL error INVALID_OPERATION.
[vo/gpu/opengl] Error: framebuffer completeness check failed (error=0).
[vo/gpu] Error: texture could not be created.
[vo/gpu] Force-disabling compute shaders as an FBO format was not available! See your FBO format configuration!
[vo/gpu] High bit depth FBOs unsupported. Enabling dumb mode.
[vo/gpu] Most extended features will be disabled.
Cannot load libcuda.so.1
[ffmpeg] AVHWDeviceContext: Cannot load libcuda.so.1
Using hardware decoding (vaapi-copy). dynamically load CUDA
AO: [pipewire] 48000Hz stereo 2ch floatp
VO: [gpu] 1280x720 nv12
[vo/gpu/opengl] before video texture creation: OpenGL error INVALID_OPERATION.
[vo/gpu/opengl] Error: framebuffer completeness check failed (error=0).
[vo/gpu] Error: texture could not be created.
[vo/gpu/opengl] after creating texture: OpenGL error INVALID_OPERATION.
[vo/gpu/opengl] Error: framebuffer completeness check failed (error=0).
[vo/gpu] Error: texture could not be created.
[vo/gpu/opengl] after creating texture: OpenGL error INVALID_OPERATION.
[vo/gpu/opengl] Error: framebuffer completeness check failed (error=0).
[vo/gpu] Error: texture could not be created.
[vo/gpu/opengl] after creating texture: OpenGL error INVALID_OPERATION.
[vo/gpu/opengl] Error: framebuffer completeness check failed (error=0).
[vo/gpu] Error: texture could not be created.
[vo/gpu] Force-disabling compute shaders as an FBO format was not available! See your FBO format configuration!
[vo/gpu/opengl] after creating texture: OpenGL error INVALID_OPERATION.
[vo/gpu/opengl] vertex shader source:
[vo/gpu/opengl] [ 1] #version 440
[vo/gpu/opengl] [ 2] #define tex1D texture
[vo/gpu/opengl] [ 3] #define tex3D texture
[vo/gpu/opengl] [ 4] #define LUT_POS(x, lut_size) mix(0.5 / (lut_size), 1.0 - 0.5 / (lut_size), (x))
[vo/gpu/opengl] [ 5] in vec2 vertex_position;
[vo/gpu/opengl] [ 6] in vec2 vertex_texcoord0;
[vo/gpu/opengl] [ 7] out vec2 texcoord0;
[vo/gpu/opengl] [ 8] in vec2 vertex_texcoord1;
[vo/gpu/opengl] [ 9] out vec2 texcoord1;
[vo/gpu/opengl] [ 10] void main() {
[vo/gpu/opengl] [ 11] gl_Position = vec4(vertex_position, 1.0, 1.0);
[vo/gpu/opengl] [ 12] texcoord0 = vertex_texcoord0;
[vo/gpu/opengl] [ 13] texcoord1 = vertex_texcoord1;
[vo/gpu/opengl] [ 14] }
[vo/gpu/opengl] fragment shader source:
[vo/gpu/opengl] [ 1] #version 440
[vo/gpu/opengl] [ 2] #define tex1D texture
[vo/gpu/opengl] [ 3] #define tex3D texture
[vo/gpu/opengl] [ 4] #define LUT_POS(x, lut_size) mix(0.5 / (lut_size), 1.0 - 0.5 / (lut_size), (x))
[vo/gpu/opengl] [ 5] out vec4 out_color;
[vo/gpu/opengl] [ 6] in vec2 texcoord0;
[vo/gpu/opengl] [ 7] in vec2 texcoord1;
[vo/gpu/opengl] [ 8] layout(std140, binding=0) uniform UBO {
[vo/gpu/opengl] [ 9] layout(offset=0) mat3 colormatrix;
[vo/gpu/opengl] [ 10] layout(offset=48) vec3 colormatrix_c;
[vo/gpu/opengl] [ 11] layout(offset=64) vec3 src_luma;
[vo/gpu/opengl] [ 12] layout(offset=80) vec3 dst_luma;
[vo/gpu/opengl] [ 13] layout(offset=96) vec2 texture_size0;
[vo/gpu/opengl] [ 14] layout(offset=112) mat2 texture_rot0;
[vo/gpu/opengl] [ 15] layout(offset=144) vec2 texture_off0;
[vo/gpu/opengl] [ 16] layout(offset=152) vec2 pixel_size0;
[vo/gpu/opengl] [ 17] layout(offset=160) vec2 texture_size1;
[vo/gpu/opengl] [ 18] layout(offset=176) mat2 texture_rot1;
[vo/gpu/opengl] [ 19] layout(offset=208) vec2 texture_off1;
[vo/gpu/opengl] [ 20] layout(offset=216) vec2 pixel_size1;
[vo/gpu/opengl] [ 21] };
[vo/gpu/opengl] [ 22] uniform sampler2D dither;
[vo/gpu/opengl] [ 23] uniform sampler2D texture0;
[vo/gpu/opengl] [ 24] uniform sampler2D texture1;
[vo/gpu/opengl] [ 25] void main() {
[vo/gpu/opengl] [ 26] vec4 color = vec4(0.0, 0.0, 0.0, 1.0);
[vo/gpu/opengl] [ 27] color.r = 1.000000 * vec4(texture(texture0, texcoord0)).r;
[vo/gpu/opengl] [ 28] color.gb = 1.000000 * vec4(texture(texture1, texcoord1)).rg;
[vo/gpu/opengl] [ 29] color = color.rgbr;
[vo/gpu/opengl] [ 30] color.rgb = mat3(colormatrix) * color.rgb + colormatrix_c;
[vo/gpu/opengl] [ 31] color.a = 1.0;
[vo/gpu/opengl] [ 32] // color mapping
[vo/gpu/opengl] [ 33] color.rgb *= vec3(1.000000);
[vo/gpu/opengl] [ 34] color.rgb *= vec3(1.000000);
[vo/gpu/opengl] [ 35] // dithering
[vo/gpu/opengl] [ 36] vec2 dither_coord = vec2(gl_FragCoord.x, 1080.0 + -1.000000 * gl_FragCoord.y);vec2 dither_pos = dither_coord * 1.0/64.0;
[vo/gpu/opengl] [ 37] float dither_value = texture(dither, dither_pos).r;
[vo/gpu/opengl] [ 38] color = floor(color * 255.0 + dither_value + 0.5 / 4096.0) * 1.0/255.0;
[vo/gpu/opengl] [ 39] out_color = color;
[vo/gpu/opengl] [ 40] }
[vo/gpu/opengl] shader link log (status=0):
[vo/gpu/opengl] after rendering: OpenGL error INVALID_OPERATION.
[vo/gpu/opengl] after OSD rendering: OpenGL error INVALID_OPERATION.
[vo/gpu/opengl] after rendering: OpenGL error INVALID_OPERATION.
[vo/gpu/opengl] after OSD rendering: OpenGL error INVALID_OPERATION.

    Title: Meditation on enchanting Shree Krishna | Krishna's Pastime Meditation - Guided by Swami Mukundananda

[vo/gpu/opengl] after rendering: OpenGL error INVALID_OPERATION.
[vo/gpu/opengl] after OSD rendering: OpenGL error INVALID_OPERATION.
[vo/gpu/opengl] after rendering: OpenGL error INVALID_OPERATION.
[vo/gpu/opengl] after OSD rendering: OpenGL error INVALID_OPERATION. [vo/gpu/opengl] after rendering: OpenGL error INVALID_OPERATION.
[vo/gpu/opengl] after OSD rendering: OpenGL error INVALID_OPERATION.
Saving state.
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: Packet corrupt (stream = 0, dts = 3454451).
[ffmpeg] NULL: Invalid NAL unit size (114327 > 50188).
[ffmpeg] NULL: missing picture in access unit with size 50237
Exiting... (Quit)
warning: queue 0x776ee8011be0 destroyed while proxies still attached:
wl_display#1 still attached

@Atemu
Copy link
Member

Atemu commented Sep 17, 2024

Yeah I'm sorry but opengl on non-NixOS Linux is simply not supported in Nixpkgs at this time.

If you have a problem purely with pipewire on non-NixOS Linux we could perhaps look into that because that should work but OpenGL will not work until at least #31189 is solved and it's a hard problem.

@Atemu Atemu closed this as not planned Won't fix, can't repro, duplicate, stale Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests

5 participants