video playback

BlitzMax Forums/BlitzMax Programming/video playback

pete03(Posted 2011) [#1]
I'd like to be able to playback video - anybody got any helpful suggestions .


xlsior(Posted 2011) [#2]
Pantsonhead created playback libraries for both Ogg Theora (BSD license) and MPEG (GPL license)
If you intend to use it for a commercial program, Ogg Theora is probably the way to go. You can download them here: http://www.pantson.com/mods/

IIRC there's at least one other MPEG playback module, but none of them support synchronized audio, it's just the video portion of the file.


xlsior(Posted 2011) [#3]
(And of course, there's converters from AVI / MPEG / etc to Ogg Theora)


AdamRedwoods(Posted 2011) [#4]
I made a quicktime module for Windows, but it shouldnt be too hard to make a Mac version since the sdk is already in an Xcode install ( i think).

Works great.

http://blitzmax.com/codearcs/codearcs.php?code=2698


pete03(Posted 2011) [#5]
Great I will check them both out. I thought I saw somewhere something about playing flash .flv. Anyone any idea about that or was I just dreaming?


pete03(Posted 2011) [#6]
So the Pantsonhead playback libraries for MPEG (GPL license) works fine but Ogg Theora (BSD license) I could not get it to run - got undefined reference to `__mingw_vprintf' and couldn't find a quick solution. I will look at the quicktime module.


TLM(Posted 2011) [#7]
Are these the only options (with out a ton of work) for playing video in bmax? It seems like I am looking for something very similar as the initial poster. I want to be able to play a video clip and then ask a question about it. I work with video, so I don't care about the format. Even .FLV is fine, but I am having trouble finding any other solutions than the ones offered above. I need sound tied to the video.

Patsonhead MPEG might work, but I may want to release something commercially and don't want to get too far along if that's going to be a stumbling block.

Thanks!


AdamRedwoods(Posted 2011) [#8]
You can use Quicktime commercially, but you'll need to read the license. I don't think you can distribute the Quicktime installer, but again, read the license.

FLV playback might be done by tapping into the ActiveX through Internet Explorer, but I haven't heard of any native BMax modules for it.


NOTES ON LICENSING (as far as i know):
Ogg is the best choice for indies, because we don't have to rely on licensing the technology behind the video, MPEG:
http://www.mpegla.com/main/Pages/About.aspx

Quicktime, on the other hand, takes care of the licensing, but we have to deal with Apple.

Ogg is the most liberal format and licensing.


TLM(Posted 2011) [#9]
Thanks for the quick reply. I wouldn't mind working with Ogg, but it looks like I would have to rely on Patsonhead and no sound. I could extract the sound, but I would be worried about sync issues on different systems, etc.

Quicktime is a similar issue where you helped us with a player, but only for MSW (from what I can tell). Which might be okay too, but I'm starting out at a very high level right now and don't want to limit the capabilities if I don't need to.

Thanks again.


pete03(Posted 2011) [#10]
I could not get the quicktime mod to run. I have problems with mingw not having scope - MacTypes.h: No such file or directory


AdamRedwoods(Posted 2011) [#11]
"MacTypes.h" is under the CIncludes folder.
Make sure you register and download the whole QuicktimeSDK for windows (from the Apple website).

Also check the path structure as I laid out in the code archives.


Cobra Blade(Posted 2012) [#12]
How strange, I decided to give it a try on a Win box and I got the same as pete03.

But it is definitely there.
BlitzMax\mod\addons.mod\quicktime.mod\QuicktimeSDK\CIncludes\MacTypes.h


AdamRedwoods(Posted 2012) [#13]
ah, mingw isn't finding the includes. the lines in quicktime.bmx:
ModuleInfo "CC_OPTS: -IQuicktimeSDK/CIncludes/"
ModuleInfo "CC_OPTS: -IQuicktimeSDK/CIncludes/CoreFoundation"
ModuleInfo "CC_OPTS: -IQuicktimeSDK/CIncludes/GNUCompatibility"

probably aren't working.

QUESTION: does anyone know when the BMK.EXE was updated to incorporate CC_OPTS? or is this Brucey's BMK that I'm using and I don't realize it? I thought I did a fresh install of the latest BMax and it worked fine.


What version of BMax are you using?

Last edited 2012


Cobra Blade(Posted 2012) [#14]
I was using the standard 1.45 release downloaded from here on the Win box.


AdamRedwoods(Posted 2012) [#15]
ah, i may have found it, my fault. try:
quicktime.bmx
?Win32
ModuleInfo "CC_OPTS: -IQuickTimeSDK/CIncludes/"
ModuleInfo "CC_OPTS: -IQuickTimeSDK/CIncludes/CoreFoundation"
ModuleInfo "CC_OPTS: -IQuickTimeSDK/CIncludes/GNUCompatibility"
Import "maxquicktime_glue.cpp"
Import "QuickTimeSDK/Libraries/QTMLClient.lib" 
Import "QuickTimeSDK/Libraries/CVClient.lib"
?MacOS
'ModuleInfo "LD_OPTS: -framework/System/Library/Frameworks/QuickTime.framework"
ModuleInfo "LD_OPTS: -framework QuickTime"
Import "maxquicktime_glue.cpp"
?


should be "QuickTime" not "Quicktime"

Last edited 2012


Russell(Posted 2012) [#16]
Don't forget about Brucey's lib Theora module, which is only available through svn. It plays Theora video files with synchronized sound perfectly!


Cobra Blade(Posted 2012) [#17]
Thanks Adam, replaced those lines in quicktime.bmx with these but it still seems to come up with the same.

I may be doing something wrong though or missing something. So here are the first few lines of the output if it helps.

Building Modules
Compiling:maxquicktime_glue.cpp
In file included from C:/BlitzMax/mod/addons.mod/quicktime.mod/maxquicktime_glue.cpp:13:
C:/BlitzMax/mod/addons.mod/quicktime.mod/QuickTimeSDK/CIncludes/QTML.h:20:22: MacTypes.h: No such file or directory
C:/BlitzMax/mod/addons.mod/quicktime.mod/QuickTimeSDK/CIncludes/QTML.h:24:23: MacMemory.h: No such file or directory
C:/BlitzMax/mod/addons.mod/quicktime.mod/QuickTimeSDK/CIncludes/QTML.h:28:24: MacWindows.h: No such file or directory
C:/BlitzMax/mod/addons.mod/quicktime.mod/QuickTimeSDK/CIncludes/QTML.h:32:21: OSUtils.h: No such file or directory
C:/BlitzMax/mod/addons.mod/quicktime.mod/QuickTimeSDK/CIncludes/QTML.h:36:19: Files.h: No such file or directory
In file included from C:/BlitzMax/mod/addons.mod/quicktime.mod/maxquicktime_glue.cpp:13:
C:/BlitzMax/mod/addons.mod/quicktime.mod/QuickTimeSDK/CIncludes/QTML.h:75: error: expected constructor, destructor, or type conversion before "QTMLYieldCPU"
C:/BlitzMax/mod/addons.mod/quicktime.mod/QuickTimeSDK/CIncludes/QTML.h:75: error: expected `,' or `;' before "QTMLYieldCPU"
C:/BlitzMax/mod/addons.mod/quicktime.mod/QuickTimeSDK/CIncludes/QTML.h:93: error: expected constructor, destructor, or type conversion before "QTMLYieldCPUTime"
C:/BlitzMax/mod/addons.mod/quicktime.mod/QuickTimeSDK/CIncludes/QTML.h:93: error: expected `,' or `;' before "QTMLYieldCPUTime"