SFML community forums

Help => Graphics => Topic started by: mjaoo on November 28, 2010, 01:35:45 am

Title: Playing .avi et c with SFML
Post by: mjaoo on November 28, 2010, 01:35:45 am
Hey.

I have gone trought tons of tutorials on how you can play .AVI movies etc
with SFML. But all of them wants me to use FFMPEG.
So my questions is:

- Is it possible to use anything else than FFPEG? And how?


- If FFPEG is a must. How the f*** do i install it all? - Geeks can't make any good tutorials. Its like walking into a wall everytime you try to read a tutorial.

And how come do SFML dont have a simple video codec? Its just dumb.

<3 Love.
Title: Playing .avi et c with SFML
Post by: Xorlium on November 28, 2010, 08:27:36 am
Hi,

I assume you are using windows (since on linux it's super-easy, as usual). (If you don't know what you are using, or don't know what an operating system is, then you are using something called "windows".)

To install ffmpeg, you must download the "shared-dev" package from here: http://ffmpeg.arrozcru.org/autobuilds/

Make sure you download the shared-dev.

To make it even easier for you, for win32, it's here:
http://ffmpeg.arrozcru.org/autobuilds/ffmpeg/mingw32/dev/shared/

and for win64, it's here:
http://ffmpeg.arrozcru.org/autobuilds/ffmpeg/mingw-w64/dev/shared/

If you don't know what you are using, you are using windows 32.

Then download it and uncompress it, and put the .dll's in either your directory or somewhere, and then tell visual studio or codeblocks or whatever IDE you are using where they are. Also, tell it where to use

And finally, if you don't want to deal directly with ffmpeg, Celyo's sfml video player is pretty good:
http://www.sfml-dev.org/forum/viewtopic.php?t=3463

Or if you just want image, and no sound, you can use mine, and you use it just like you would use an image:
http://www.sfml-dev.org/wiki/en/sources/video_integration

I'm a geek, so maybe I can't write tutorials :) If so, I apologize.
Title: Playing .avi et c with SFML
Post by: K-Bal on November 28, 2010, 02:14:31 pm
I thoroughly enjoyed the windows bashing. Deving on win is a pain.
Title: Playing .avi et c with SFML
Post by: mjaoo on November 28, 2010, 05:27:47 pm
Yea. Im using Win 7 32.

Also im using codeblocks.
One thing. How do i tell codeblocks where to look for them?(.dll)
Only in linker settings? or only serc directorys?
Aswell do i need to include it in my project as in other linker options?


And do i only need that share dev? dont i need anything else? since alot of tutorials say "Eey u need this. And this". Like in ure tutorial ;)

Yea. Linux is awsome with this crap.
But. Im forced to work in windows atm so and i rly need this to work.
Title: Playing .avi et c with SFML
Post by: Xorlium on November 29, 2010, 02:03:36 am
Hehe, I only bashed windows once.

Anyway, in codeblocks, go to Project->Build Options. This opens a window. On the left panel of the window, it should say:
myProject
   Debug
   Release

where "myProject" is of course the name of your project. Click there. Then go to "Linker settings" and then click "Add" and enter "avcodec". Then click "Add" again and enter "avformat". Then click "add" and enter "swscale". This is how you should link to sfml too. So you should also have "sfml-graphics", "sfml-window" and "sfml-system" in there too (and maybe audio and network).

Then go to "Search Directories" and for the "Compiler" tab, add the include directories. For the "Linker" tab add the place where the dll's are.

Xorlium
Title: Playing .avi et c with SFML
Post by: Xorlium on November 29, 2010, 02:05:12 am
Oh, sorry, I forgot to mention, yeah, you only need ffmpeg shared-dev. It includes all you need.
Title: Playing .avi et c with SFML
Post by: mjaoo on November 29, 2010, 03:35:59 pm
Haha i know how the SFML-stuff works cause its pictures and stuff(in the tutorial for setup) haha.
Now it spamms "Use this header only with Microsoft Visual C++ compilers" after i followed ure reply :) - Haha.