Bug 1239 - GLMediaPlayer cannot open camera on OSX
: GLMediaPlayer cannot open camera on OSX
Status: RESOLVED FIXED
: None
: Jogl
: JogAmp
: util (show other bugs)
: 2.3.2
: All macosx
: --- normal
: Sven Gothel
:
:
:
 
Reported: 2015-09-30 20:38 CEST by voorbeeld
Modified: 2015-10-05 14:26 CEST (History)
0 users

:
Type: DEFECT
SCM Refs:
4e237f265146b4c1e00856f19a8794aabf54d12c da45b374f0274fa014310c08164e67f7736c1f7d 9abd252b4d30e0611a360d37d228dbae427c9cd5 c82ab4d75a50cd88c675e6c1e757dc9ed2db9655 e984e8f9b4d325c0cd3e1e9852c188ddea9c679b
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description voorbeeld 2015-09-30 20:38:45 CEST
Tested against ffmpeg 2.8, OSX 10.10, jogl 2.3.2-rc20150929.

tried to open URI camera:/0?width=1280;height=720;rate=30

debug output gives:

initStream: p1 GLMediaPlayer[Uninitialized, vSCR 2147483647, frames[p 0, d 0, t 0 (0.0 s), z 0 / 166], speed 1.0, 0 bps, hasSW false, Texture[count 4, free 0, 
                dec 0, tagt 0xde1, ifmt 0x1908, fmt 0x1908, type 0x1401], Video[id 0, <unknown>, 0x0, glOrient false, 0.0 fps, 0.0 fdur, 0 bps], Audio[id -2, <unknown>, 0 bps, 
                0 frames], uri camera:/0?width=1280;height=720;rate=30, camera: 0]
initStream: p2 preferred AudioDataFormat[sampleRate 44100, sampleSize 16, channelCount 2, signed true, fixedP true, packed, little-endian], 
                GLMediaPlayer[Uninitialized, vSCR 2147483647, frames[p 0, d 0, t 0 (0.0 s), z 0 / 166], speed 1.0, 0 bps, hasSW false, Texture[count 4, free 0, dec 0, tagt 
                0xde1, ifmt 0x1908, fmt 0x1908, type 0x1401], Video[id 0, <unknown>, 0x0, glOrient false, 0.0 fps, 0.0 fdur, 0 bps], Audio[id -2, <unknown>, 0 bps, 0 frames], 
                uri camera:/0?width=1280;height=720;rate=30, camera: 0]
initStream: p3 cameraPath 0, isCameraInput true
initStream: p3 stream camera:/0?width=1280;height=720;rate=30 -> camera:/0?width=1280;height=720;rate=30 -> camera:/0?width=1280;height=720;rate=30
initStream: p3 vid 0, sizes null, reqVideo 1280x720@30, aid -2, aMaxChannelCount 8, aPrefSampleRate 44100

it ends with EVENT_CHANGE_ERR in attributesChanged
RuntimeException while initializing: GLMediaPlayer[Uninitialized, vSCR 2147483647, frames[p 0, d 0, t 0 (0.0 s), z 0 / 166], speed 1.0, 0 bps, hasSW false, 
                Texture[count 4, free 0, dec 0, tagt 0xde1, ifmt 0x1908, fmt 0x1908, type 0x1401], Video[id 0, <unknown>, 0x0, glOrient false, 0.0 fps, 0.0 fdur, 0 bps], 
                Audio[id -2, <unknown>, 0 bps, 0 frames], uri camera:/0?width=1280;height=720;rate=30, camera: 0]
Comment 1 Sven Gothel 2015-10-05 14:16:25 CEST
building ffmpeg on osx
see <https://trac.ffmpeg.org/wiki/CompilationGuide/MacOSX>

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-frei0r --with-libass --with-libvo-aacenc --with-libquvi --with-libvorbis --with-libvpx --with-opencore-amr --with-openjpeg --with-opus --with-rtmpdump --with-schroedinger --with-speex --with-theora --with-tools --with-x265
Comment 2 Sven Gothel 2015-10-05 14:18:14 CEST
commit c82ab4d75a50cd88c675e6c1e757dc9ed2db9655
  Support OSX input via 'avfoundation' ; 
  Use remaining camera ID (index) as filename for OSX

commit 9abd252b4d30e0611a360d37d228dbae427c9cd5
  Update FFMPEGMediaPlayer API doc (versions and OSX resources)

commit da45b374f0274fa014310c08164e67f7736c1f7d
  Add support for UYVY422 (swizzled YUYV422)

commit 4e237f265146b4c1e00856f19a8794aabf54d12c
    Fix GLMediaPlayer.CameraInputScheme API doc; 
    GLMediaPlayerImpl.updateAttributes avoid div-by-zero (fps inf)
Comment 3 Sven Gothel 2015-10-05 14:26:01 CEST
commit e984e8f9b4d325c0cd3e1e9852c188ddea9c679b
  Fix comment in c-code 'how to set preferred pixel_format'

Working .. w/ build-in camera (macbook) and desktop capture.