patriciogonzalezvivo / glslViewer

Console-based GLSL Sandbox for 2D/3D shaders
BSD 3-Clause "New" or "Revised" License
4.72k stars 350 forks source link

Webcam input fails with "Failed to decode packet: End of file" #358

Open jschmdt opened 6 months ago

jschmdt commented 6 months ago

My specs: Macbook Pro M3, OSX Sonoma 14.4.1, glslViewer 3.30 (built from source)

Task: Testing webcam input with shader example: glslViewer -l test_video.frag --video 0

Issue: Webcam input is shown inside of glslViewer for 1-2 frames but then immediately stops with following error: Failed to decode packet: End of file

FFMPEG:

[AVFoundation indev @ 0x138005ea0] AVFoundation video devices:
**[AVFoundation indev @ 0x138005ea0] [0] FaceTime HD-Kamera
[AVFoundation indev @ 0x138005ea0] [1] Capture screen 0
[AVFoundation indev @ 0x138005ea0] [2] Capture screen 1**
[AVFoundation indev @ 0x138005ea0] AVFoundation audio devices:
[AVFoundation indev @ 0x138005ea0] [0] MacBook Pro-Mikrofon

Testing if webcam works:

ilanataha commented 1 week ago

I am having the same issue on MacBook Pro M1 Sonoma 14.0, glslViewer 3.26.3 cloned from Git. Webcam works fine on other platforms and having no issues running the same shader on a video file input. Any fix on this?