Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Playing .avi et c with SFML  (Read 5848 times)

0 Members and 1 Guest are viewing this topic.

mjaoo

  • Newbie
  • *
  • Posts: 9
    • View Profile
Playing .avi et c with SFML
« 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.

Xorlium

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
Playing .avi et c with SFML
« Reply #1 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.

K-Bal

  • Full Member
  • ***
  • Posts: 104
    • View Profile
    • pencilcase.bandcamp.com
    • Email
Playing .avi et c with SFML
« Reply #2 on: November 28, 2010, 02:14:31 pm »
I thoroughly enjoyed the windows bashing. Deving on win is a pain.
Listen to my band: pencilcase.bandcamp.com

mjaoo

  • Newbie
  • *
  • Posts: 9
    • View Profile
Playing .avi et c with SFML
« Reply #3 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.

Xorlium

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
Playing .avi et c with SFML
« Reply #4 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

Xorlium

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
Playing .avi et c with SFML
« Reply #5 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.

mjaoo

  • Newbie
  • *
  • Posts: 9
    • View Profile
Playing .avi et c with SFML
« Reply #6 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.

 

anything