Native .wav loader, Ogg Vorbis loader, Ffmpeg out of core

Return to Panda Features in Development

Native .wav loader, Ogg Vorbis loader, Ffmpeg out of core

Postby rdb » Mon Aug 26, 2013 7:55 am

Hello all,

I've finally split ffmpeg out of the libpanda core. It's bloated, has a restrictive license, and most people don't use a majority of it. A significant part of the runtime distribution size was actually ffmpeg; this seems like a bit of a waste of space.

It's now a separate module, libp3ffmpeg. It is dynamically loaded; only when you actually try loading an audio or video file that is not otherwise supported. These load instructions will be in Confauto.prc by default:
Code: Select all
# These entries work very similar to load-file-type, except they are
# used by the MovieVideo and MovieAudio code to determine which module
# should be loaded in order to decode files of the given extension.

# ffmpeg is added by default because it used to be compiled in.
# The * is a special catch-all extension that is consulted unless a
# loader has been defined with an explicit extension.

load-audio-type * p3ffmpeg
load-video-type * p3ffmpeg


If you need support for ffmpeg (eg. if you use .mp3 or .avi files) in your .p3d you will need to specify "-r ffmpeg" on the packp3d command-line in the future.

I've also gone ahead and upgraded our ffmpeg code to the latest ffmpeg API - Panda will now be able to compile against the latest version of ffmpeg again.

I also realised that most people who load simple .wav or .ogg audio files still won't want to pull in ffmpeg. So, I've created a .wav loader from scratch, and an .ogg loader based on libvorbisfile (which is BSD-licensed and widely supported). The .wav loader supports all the standard encodings - PCM, float, mu-law, and A-law. The .ogg loader supports Ogg Vorbis files.
I've tested some pretty esoteric and broken files, but if you find a .wav or .ogg Vorbis file that doesn't work, please send it to me.

On a similar note, I've also split vrpn out of libpanda. It's now in libp3vrpn and can be imported using "panda3d.vrpn" instead of "panda3d.core". As with ffmpeg, you will in future releases need to specify "-r vrpn" at the packp3d command-line if you need VRPN support.

This is all in CVS; the buildbots haven't caught up yet as of writing.
rdb
 
Posts: 9306
Joined: Mon Dec 04, 2006 5:58 am
Location: Netherlands

Re: Native .wav loader, Ogg Vorbis loader, Ffmpeg out of cor

Postby croxis » Mon Aug 26, 2013 10:39 am

Bless you sir. Bless you.
David - Proud to be saving the world since 1984
croxis
 
Posts: 467
Joined: Thu Feb 12, 2009 4:13 pm
Location: Portland, OR

Re: Native .wav loader, Ogg Vorbis loader, Ffmpeg out of cor

Postby teedee » Mon Aug 26, 2013 3:00 pm

Excellent work! Another great step towards making Panda more portable.
teedee
 
Posts: 849
Joined: Tue May 12, 2009 11:33 pm
Location: Kepler-22b

Re: Native .wav loader, Ogg Vorbis loader, Ffmpeg out of cor

Postby nachus » Wed Sep 25, 2013 2:45 pm

That's great man!! congrats.
Is this change applying for .ogv files (video)?

Thanks!!
nachus
 
Posts: 42
Joined: Wed Feb 25, 2009 3:17 pm

Re: Native .wav loader, Ogg Vorbis loader, Ffmpeg out of cor

Postby rdb » Wed Sep 25, 2013 6:03 pm

Ogg Theora is not supported at this time except through ffmpeg.
rdb
 
Posts: 9306
Joined: Mon Dec 04, 2006 5:58 am
Location: Netherlands

Re: Native .wav loader, Ogg Vorbis loader, Ffmpeg out of cor

Postby nachus » Wed Sep 25, 2013 6:51 pm

Ok, thanks. Are there any plans for supporting Ogg Theora?
nachus
 
Posts: 42
Joined: Wed Feb 25, 2009 3:17 pm

Re: Native .wav loader, Ogg Vorbis loader, Ffmpeg out of cor

Postby rdb » Thu Sep 26, 2013 3:26 am

Not at the moment, but patches are welcome.
rdb
 
Posts: 9306
Joined: Mon Dec 04, 2006 5:58 am
Location: Netherlands

Re: Native .wav loader, Ogg Vorbis loader, Ffmpeg out of cor

Postby rdb » Tue Feb 18, 2014 2:07 pm

For anyone who's run into crashes with the Ogg Vorbis loader: I've just checked in some fixes.
rdb
 
Posts: 9306
Joined: Mon Dec 04, 2006 5:58 am
Location: Netherlands

Re: Native .wav loader, Ogg Vorbis loader, Ffmpeg out of cor

Postby nachus » Thu Apr 10, 2014 10:16 am

Hi,
As of today, does the dev version of Panda sopport ogg theora (.ogv files) ?

Thanks.
nachus
 
Posts: 42
Joined: Wed Feb 25, 2009 3:17 pm

Re: Native .wav loader, Ogg Vorbis loader, Ffmpeg out of cor

Postby rdb » Fri Apr 11, 2014 1:47 am

Ogg Theora is not supported at this time except through ffmpeg.
rdb
 
Posts: 9306
Joined: Mon Dec 04, 2006 5:58 am
Location: Netherlands


Return to Panda Features in Development

Who is online

Users browsing this forum: No registered users and 0 guests