Bug 725 - FFMPEGMediaPlayer audio frame decode and playback
Summary: FFMPEGMediaPlayer audio frame decode and playback
Status: RESOLVED FIXED
Alias: None
Product: Jogl
Classification: JogAmp
Component: core (show other bugs)
Version: 2
Hardware: All all
: --- enhancement
Assignee: Sven Gothel
URL:
Depends on:
Blocks:
 
Reported: 2013-04-24 23:07 CEST by Xerxes Rånby
Modified: 2013-08-31 10:53 CEST (History)
2 users (show)

See Also:
Type: ---
SCM Refs:
062f3e9e1ecfeb63ea61eb540d94d17a2de1412a ...
Workaround: ---


Attachments
decode.c ffmpeg/libav audio decode and openal playback native example. (6.70 KB, text/x-csrc)
2013-04-24 23:07 CEST, Xerxes Rånby
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xerxes Rånby 2013-04-24 23:07:36 CEST
Created attachment 457 [details]
decode.c ffmpeg/libav audio decode and openal playback native example.

Adding audio playback support to FFMPEGMediaPlayer will make it awesome.

The attached decode.c demonstrate audio decode using ffmpeg/libav and playback using openal.

We may choose to let the JOGL util FFMPEGMediaPlayer package depend on JOAL in order to facilitate easy playback of decoded audio frames.
Comment 1 Xerxes Rånby 2013-04-29 00:01:56 CEST
I have started working on this bug, a in progress git branch is available:
https://github.com/xranby/jogl/commits/FFMPEGMediaPlayer-audio
Comment 2 Xerxes Rånby 2013-05-12 08:05:47 CEST
I have now implemented a crude proof of concept FFMPEGMediaPlayer with plain Java Sound and a most simple a/v sync.

I only buffer audio frames for now. Video is played a bit ahead of time in order to generate enough audio frame buffer to prevent audio buffer under-runs during video "Thread.sleep" sync.

https://github.com/xranby/jogl/commit/062f3e9e1ecfeb63ea61eb540d94d17a2de1412a
Comment 3 Sven Gothel 2013-08-31 10:53:24 CEST
.. commits are to numerous to list here,
however, Xerxes's brought in audio frame decoding w/ JOAL output support!

Latest FFMPEG GLMediaPlayer / ALAudioSink refined such support ranging from:
  [from 6332e13b2f0aa9818d37802302f04c90a4fa4239
  to 1693604b4daae4571069b58bdc863516b95999a6]