B4A Library Exoplayer 2.18.5 Streams Player

Zero7

Member
Hello @PassionDEV,

I've tested your library to play MPEG-TS stream but seems to fail to play audio (video works ok).

As you can see, the same problem happens with ExoPlayer wrapper by Erel: https://www.b4x.com/android/forum/t...udio-in-http-mpeg-ts-stream-exoplayer.141533/

Seems that a FFMPEG extension is needed for ExoPlayer to play this kind of stream/files for some audio codecs support: https://github.com/google/ExoPlayer/tree/release-v2/extensions/ffmpeg

B4X:
The FFmpeg module provides FfmpegAudioRenderer, which uses FFmpeg for decoding and can render audio encoded in a variety of formats.

Sample formatDecoder name(s)
Vorbisvorbis
Opusopus
FLACflac
ALACalac
PCM μ-lawpcm_mulaw
PCM A-lawpcm_alaw
MP1, MP2, MP3mp3
AMR-NBamrnb
AMR-WBamrwb
AACaac
AC-3ac3
E-AC-3eac3
DTS, DTS-HDdca
TrueHDmlp truehd

Can you take a look?

If you need, I can send you some mpeg-ts samples.
 
Last edited:

Addo

Well-Known Member
Licensed User
i will look into this during weekend please send files privately
 

nedium

Active Member
Licensed User
Longtime User
Hi, @PassionDEV

You can add a ResizeMode, which allows you to center the width and height of the screen, the fit option expands until it leaves the screen and does not allow you to use the entire resolution of the device.

You can also add all the options that exoplayer allows you in ResizeMode.

Thank you
 

Addo

Well-Known Member
Licensed User
New Version has been updated in the first Post
Changes

Version 1.10
  • FFMPEG Extension is Supported
  • FFmpegavailabe << to check weather ffmpeg is available or not.
  • player.Initialize("player", True) <<Initialize has a new parameter to give you the choice if you want to use ffmpeg as your audio decoder or not.
  • added a Fullscreen Support >> as already implemented Here Thanks to Erel
  • Example updated to describe More.
Note you need to redownload the additional AAR to get exoplayer-ffmpeg-extension-2.18.2.aar
 
Last edited:

Almora

Active Member
Licensed User
Longtime User
Hello there . I tested but it gave this error.

 

Addo

Well-Known Member
Licensed User
That was quite hard to get it done but finally i done it,
Since FFMPEG that been published by google on Exoplayer Repo supports only Audio Decoding it wasnt good to support FFMPEG to decode audio only which is frustrating.
I have compiled FFmpeg and wrapped it my self to be able to add FFMPEg Video Renderer.

library updated in the first Post

Version 1.20
  • FFMPEG Now Support Video Rendering which will give the exoplayer the ability to play many mediacodecs video & audio.
have a nice day everyone.

Note you need to re-download the additional aar and place them in your Additional folder.
 
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…