Login  Register

FFMPEGMediaPlayer not playing mp3 under Windows

Posted by klubi on Oct 15, 2014; 6:47am
URL: https://forum.jogamp.org/FFMPEGMediaPlayer-not-playing-mp3-under-Windows-tp4033352.html

Hello again guys,

here I am again after a longer time. This time having a problem under Windows7.
Using the GLMediaPlayer to play audio only (works on my Raspberry only thanks to your help) does not seem to work on my Windows PC 64bit.
I tried libav as well as ffmpeg and pointed the native libraries folder in the jogl project to where the libav dlls are deployed. Then I try to use the CrossFadePlayer (or my similar version of it, that I provided in my last topic here).

It all seems to work fine until playing starts. No sound of course :) and a few debug statements which bother me a bit (mostly because I don't understand them):

*********************************************
GLMediaPlayer[Uninitialized, vSCR 2147483647, frames[p 0, d 0, t 0 (0.0 s), z 0 / 0], speed 1.0, 0 bps, hasSW false, Texture[count 0, free 0, dec 0, tagt 0xde1, ifmt 0x1908, fmt 0x1908, type 0x1401], Video[id -1, <unknown>, 0x0, glOrient false, 0.0 fps, 0.0 fdur, 0 bps], Audio[id -1, <unknown>, 0 bps, 0 frames], uri <undefined stream>]
Created new player: jogamp.opengl.util.av.impl.FFMPEGMediaPlayer
filename = res/test.mp3
file:/C:/Prog/git/raspimusic/raspberry/res/test.mp3
State of player: Uninitialized

...initializing stream...
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 0, free 0, dec 0, tagt 0xde1, ifmt 0x1908, fmt 0x1908, type 0x1401], Video[id -2, <unknown>, 0x0, glOrient false, 0.0 fps, 0.0 fdur, 0 bps], Audio[id -1, <unknown>, 0 bps, 0 frames], uri file:/C:/Prog/git/raspimusic/raspberry/res/test.mp3]
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 0, free 0, dec 0, tagt 0xde1, ifmt 0x1908, fmt 0x1908, type 0x1401], Video[id -2, <unknown>, 0x0, glOrient false, 0.0 fps, 0.0 fdur, 0 bps], Audio[id -1, <unknown>, 0 bps, 0 frames], uri file:/C:/Prog/git/raspimusic/raspberry/res/test.mp3]
initStream: p3 cameraPath null, isCameraInput false
initStream: p3 stream file:/C:/Prog/git/raspimusic/raspberry/res/test.mp3 -> C:\Prog\git\raspimusic\raspberry\res\test.mp3 -> C:\Prog\git\raspimusic\raspberry\res\test.mp3
initStream: p3 vid -2, sizes null, reqVideo -1x-1@-1, aid -1, aMaxChannelCount 8, aPrefSampleRate 44100
AudioSink.isSupported: true: av[fmt S16, rate 44100, chan 2] -> AudioDataFormat[sampleRate 44100, sampleSize 16, channelCount 2, signed true, fixedP true, packed, little-endian]
audio: id 0, fmt S16, AudioDataFormat[sampleRate 44100, sampleSize 16, channelCount 2, signed true, fixedP true, packed, little-endian], aFrameSize/fc 0
video: id -2, fmt 0x0, null, planes 0, bpp 0/0, usesTexLookupShader false
video: p[0]: 0
video: p[1]: 0
video: p[2]: 0
video: total tex 0x0

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 0, free 0, dec 0, tagt 0xde1, ifmt 0x1908, fmt 0x1908, type 0x1401], Video[id -2, <unknown>, 0x0, glOrient false, 0.0 fps, 0.0 fdur, 0 bps], Audio[id -1, <unknown>, 0 bps, 0 frames], uri file:/C:/Prog/git/raspimusic/raspberry/res/test.mp3]
XXX Initialize @ updateAttributes: GLMediaPlayer[Initialized, vSCR 2147483647, frames[p 0, d 0, t 0 (250.2 s), z 0 / 166], speed 1.0, 203204 bps, hasSW true, Texture[count 0, free 0, dec 0, tagt 0xde1, ifmt 0x1908, fmt 0x1908, type 0x1401], Video[id -2, <unknown>, 0x0, glOrient false, 0.0 fps, 0.0 fdur, 0 bps], Audio[id 0, <Audio: mp3, 44100 Hz, 2 channels, s16p, 203 kb/s>, 203129 bps, 0 frames], uri file:/C:/Prog/git/raspimusic/raspberry/res/test.mp3]

***
Event mask changed: 7471105
Timestamp: 1413354534748
State of player: Initialized

Duration: 250200ms
Volume: 1.0
player.initGL()...
initGL: p3 avChosen AudioDataFormat[sampleRate 44100, sampleSize 16, channelCount 2, signed true, fixedP true, packed, little-endian]
initGL: p4 chosen AudioDataFormat[sampleRate 44100, sampleSize 16, channelCount 2, signed true, fixedP true, packed, little-endian]
initGL: p4 chosen jogamp.opengl.util.av.NullAudioSink@b71888d

***
Event mask changed: 8
Timestamp: 1413354534748
State of player: Paused

player.play()...
setPlaySpeed(1.0): Paused, 1.0 -> 1.0, GLMediaPlayer[Paused, vSCR 2147483647, frames[p 0, d 0, t 0 (250.2 s), z 0 / 166], speed 1.0, 203204 bps, hasSW true, Texture[count 0, free 0, dec 0, tagt 0xde1, ifmt 0xffffffff, fmt 0xffffffff, type 0xffffffff], Video[id -2, <unknown>, 0x0, glOrient false, 0.0 fps, 0.0 fdur, 0 bps], Audio[id 0, <Audio: mp3, 44100 Hz, 2 channels, s16p, 203 kb/s>, 203129 bps, 0 frames], uri file:/C:/Prog/git/raspimusic/raspberry/res/test.mp3]
mp.setPlaySpeed(1f) returned: true
Audio: mp3, 44100 Hz, 2 channels, s16p, 203 kb/s
Seek(0): Paused, frames[(p 0, d 0) / 0, 250.2 s, z 0 / 166], speed 1.0, dAV -2147483648, vSCR 2147483647, vpts 0, dSCR[-2147483647, avrg 0], aSCR 2147483647, apts -2147483648 ( 1 ), AudioSink[frames [p 0, q 0, f 1, c 0], time 0, bytes 0], Texture[count 0, free 0, dec 0]
Seek(0): Paused -> Paused, GLMediaPlayer[Paused, vSCR 2147483647, frames[p 0, d 0, t 0 (250.2 s), z 0 / 166], speed 1.0, 203204 bps, hasSW true, Texture[count 0, free 0, dec 0, tagt 0xde1, ifmt 0xffffffff, fmt 0xffffffff, type 0xffffffff], Video[id -2, <unknown>, 0x0, glOrient false, 0.0 fps, 0.0 fdur, 0 bps], Audio[id 0, <Audio: mp3, 44100 Hz, 2 channels, s16p, 203 kb/s>, 203129 bps, 0 frames], uri file:/C:/Prog/git/raspimusic/raspberry/res/test.mp3]
libav play err: -40

***
Event mask changed: 4
Timestamp: 1413354534749
State of player: Playing

playing...
GLMediaPlayer[Playing, vSCR 2147483647, frames[p 0, d 0, t 0 (250.2 s), z 0 / 166], speed 1.0, 203204 bps, hasSW true, Texture[count 0, free 0, dec 0, tagt 0xde1, ifmt 0xffffffff, fmt 0xffffffff, type 0xffffffff], Video[id -2, <unknown>, 0x0, glOrient false, 0.0 fps, 0.0 fdur, 0 bps], Audio[id 0, <Audio: mp3, 44100 Hz, 2 channels, s16p, 203 kb/s>, 203129 bps, 0 frames], uri file:/C:/Prog/git/raspimusic/raspberry/res/test.mp3]
jogamp.opengl.util.av.NullAudioSink@b71888d
Info: Has avresample 1, swresample 0, device 1, refCount 0
[mp3 @ 000000000044ed80] max_analyze_duration 5000000 reached
Input #0, mp3, from 'C:\Prog\git\raspimusic\raspberry\res\test.mp3':
  Metadata:
    encoded_by      : LAME 3.90.3 Modified
    album_artist    : Razorlight
    track           : 4
    artist          : Razorlight
    TBPM            : 90
    album           : Razorlight
    title           : America
    genre           : Rock
    date            : 2006
  Duration: 00:04:10.20, start: 0.000000, bitrate: 203 kb/s
    Stream #0.0: Audio: mp3, 44100 Hz, 2 channels, s16p, 203 kb/s
Streams: 1, req vid -2 aid -1
Stream: 0: is-video 0, is-audio 1
Found vid -2, aid 0
A channels 2 [l 3], sample_rate 44100, frame_size 0, frame_number 0, [afps -1.#IND00, cfps 44100.000000, sfps 14112000.000000], nb_frames 0, [maxChan 8, prefRate 44100, req_chan_layout 0, req_chan 0], sink-support 1
Info: Need resample 1, Use avresample 0, swresample 0
SEEK: vid -2, aid 0, pos0 0, pos1 0, pts: 0 -> 0
SEEK.0: pre  : s 0 / 0 -> t 0 / 0
SEEK: post : res -2, u 0

*********************************************

Do you have any idea, what could be wrong with this output? The only thing I can see is:
Info: Need resample 1, Use avresample 0, swresample 0
Althoug the avresample seems to load.

Once again I am at the limit with my knowledge and thank you for your support in advance.

Cheers,
Martin