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

Author Topic: sfeMovie (video & audio playback library with many codecs)  (Read 148273 times)

0 Members and 2 Guests are viewing this topic.

SirArthas

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Re: sfeMovie Project [v1.0 released]
« Reply #30 on: December 30, 2012, 04:29:30 pm »
Hi Ceylo !
I'm new to the SFML and trying to run this sfeMovie project to my Visual Studio project.The problem i get is with the creation of the FFmpeg.I followed the provided instructions but every thing crashes on the last step in the minGW.
I'm running the file build.sh but for some reason i get the strange message that ffmped-sourse directory is missing.
Where should i put it or what i can do to generate the ffmpeg libs
« Last Edit: December 30, 2012, 04:56:02 pm by SirArthas »

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: sfeMovie Project [v1.0 released]
« Reply #31 on: December 30, 2012, 09:42:00 pm »
Thanks Ceylo, I'll give it a try now :)
Were you able to use it?

Whilst I think about it, what is the reason that sfeMovie can't be static linked?
Because I preferred the user not to bother with LGPL and to avoid linking issues. Plus FFmpeg cannot be statically linked with Visual Studio libraries. So in any case you'd have to deal with FFmpeg dlls.

But yes, this is on the todo list, so that you can get issues if you wish so :) .
Want to play movies in your SFML application? Check out sfeMovie!

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: sfeMovie Project [v1.0 released]
« Reply #32 on: December 30, 2012, 09:42:33 pm »
Hi Ceylo !
I'm new to the SFML and trying to run this sfeMovie project to my Visual Studio project.The problem i get is with the creation of the FFmpeg.I followed the provided instructions but every thing crashes on the last step in the minGW.
I'm running the file build.sh but for some reason i get the strange message that ffmped-sourse directory is missing.
Where should i put it or what i can do to generate the ffmpeg libs
What did you do and what is the error you get?
Want to play movies in your SFML application? Check out sfeMovie!

iride

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
    • Email
Re: sfeMovie Project [v1.0 released]
« Reply #33 on: December 31, 2012, 05:14:13 am »
Hi Ceylo !
I'm new to the SFML and trying to run this sfeMovie project to my Visual Studio project.The problem i get is with the creation of the FFmpeg.I followed the provided instructions but every thing crashes on the last step in the minGW.
I'm running the file build.sh but for some reason i get the strange message that ffmped-sourse directory is missing.
Where should i put it or what i can do to generate the ffmpeg libs
What did you do and what is the error you get?

Hi, I'm also getting the same error
I did the exact same thing as instructed on the website.

I launched mingw shell and typed ./build.sh windows in the sfeMovie directory
Then it gave me couple options and selected visual studio 2010
Then it gives that error

By the way I'm using VS 2012, will VS 2010 version work fine for VS 2012?

SirArthas

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Re: sfeMovie Project [v1.0 released]
« Reply #34 on: December 31, 2012, 12:09:30 pm »
This is the error that i get when i try creating ffmpeg for visual studio 2010

[attachment deleted by admin]

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: sfeMovie Project [v1.0 released]
« Reply #35 on: December 31, 2012, 03:43:35 pm »
Hi, I'm also getting the same error
I did the exact same thing as instructed on the website.

I launched mingw shell and typed ./build.sh windows in the sfeMovie directory
Then it gave me couple options and selected visual studio 2010
Then it gives that error
According to the screenshot, you didn't go into the sfeMovie directory (with "cd" command) before running build.sh. To make sure you are in the sfeMovie directory, just type "./build.sh windows", not "some/path/build.sh windows" and if it works, it means you're in the right directory.

By the way I'm using VS 2012, will VS 2010 version work fine for VS 2012?
If backward compatibility support is still the same as with VS2008 and VS2010, it won't. Thus I have to add the rule so that sfeMovie can be built with VS2012 (I'm installing it right now).
Want to play movies in your SFML application? Check out sfeMovie!

iride

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
    • Email
Re: sfeMovie Project [v1.0 released]
« Reply #36 on: December 31, 2012, 04:40:04 pm »
Thank you, everything is working fine now.

SirArthas

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Re: sfeMovie Project [v1.0 released]
« Reply #37 on: December 31, 2012, 05:35:00 pm »
will try that and nice welcoming of New Year

Haikarainen

  • Guest
Re: sfeMovie Project [v1.0 released]
« Reply #38 on: February 25, 2013, 02:48:08 pm »
Hey!

I'm having some issues running build.sh, regardless of my codec options compilation just seems to stop/get stuck right after it starts. I a warning about pkg-config not being found, so library detection may fail, then it starts compiling, I see a few warnings from ./libavutil/parseutils.h about mixing int* and LONG*.. Then thats it, the window is responding and all but nothing more happens...

I started compiling around 7-8 AM GMT+1, and 14:30  it was still in the same place just ticking...

Please help me out with this :) Great work on sfeMovie btw!

EDIT: Forgot the important details. This is running MinGW+MSYS, I'm in the right directory and everything. I could try running Cygwin to at least see if it is more verbose or something. I'm on Windows 8
« Last Edit: February 25, 2013, 02:52:13 pm by Haikarainen »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
AW: sfeMovie Project [v1.0 released]
« Reply #39 on: February 25, 2013, 03:44:30 pm »
It's just a shell script, try adding some debug output of your own into, so can norrow down the comnand at which it fails. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Haikarainen

  • Guest
Re: AW: sfeMovie Project [v1.0 released]
« Reply #40 on: February 25, 2013, 04:05:08 pm »
It's just a shell script, try adding some debug output of your own into, so can norrow down the comnand at which it fails. ;)

Sure, it's a shelllscript, although a pretty huge one  ;D

Anyhow, since it gets stuck when building, it was rather easy to pinpoint the exact line, which is:
make --jobs=$jobsCount

Which ultimately leads me to the ffmpeg makefile, something I'm not too experienced with (makefiles) and the ffmpeg one is rather complicated.

Anyhow I'll follow up on that warning about pkgconfig, try and install that and see if that fixes the problem.



EDIT:

Well I no longer get the pkg-config warning, it still gets stuck though. I uploaded a picture of it (since I cant copy paste from this terminal)




PS; I had to know how sfmluploads worked internally to get that link ;P the link that should open the image on page https://legacy.sfmluploads.org/pic/309 doesnt.




EDIT2:

I added some debuginfo as you suggested, the exact command it executes is:
make --jobs=4

I then redirected the command output to build.log, same output goes there:

Code: [Select]
CC libavdevice/alldevices.o
CC libavdevice/avdevice.o
CC libavdevice/lavfi.o
CC libavdevice/vfwcap.o
libavdevice/vfwcap.c: In function 'vfw_read_header':
libavdevice/vfwcap.c:325:9: warning: passing argument 1 of 'av_parse_video_size' from incompatible pointer type [enabled by default]
In file included from libavdevice/vfwcap.c:25:0:
./libavutil/parseutils.h:66:5: note: expected 'int *' but argument is of type 'LONG *'
libavdevice/vfwcap.c:325:9: warning: passing argument 2 of 'av_parse_video_size' from incompatible pointer type [enabled by default]
In file included from libavdevice/vfwcap.c:25:0:
./libavutil/parseutils.h:66:5: note: expected 'int *' but argument is of type 'LONG *'

I also added some messages after that line, which doesnt show, making the make --jobs=4 the command that infact gets stuck..

I will try do recreate what it does manually..

EDIT4 or whatever:

I think I've found the reason why it doesnt work, make --jobs=4 compiles on 4 different threads at once,  in my case it only does 1 job-iteration (4 objects) and then seems to sleep or something. I removed the --jobs parameter for both build_ffmpeg and build_sfemovie, it now seems to compile. Will reply with results on how it goes.


Final Edit:

Successfully compiles! Seems to work as well, although why is it bundled with SFML sources? It creates problems since it creates 2 different versions of sfml on my system. Should be an easy fix but still.
« Last Edit: February 25, 2013, 05:42:45 pm by Haikarainen »

Haikarainen

  • Guest
Re: sfeMovie Project [v1.0 released]
« Reply #41 on: February 25, 2013, 06:31:12 pm »
Well I got it to compile well, managed to make it use my own compiled SFML as well, although I get a crash on exit when using your sfe::Movie:

stacktrace
Code: [Select]
#0 5FDF0854 atioglxx!DrvGetProcAddress() (C:\Windows\SysWOW64\atioglxx.dll:??)
#1 5F54DD19 atioglxx!DrvGetProcAddress() (C:\Windows\SysWOW64\atioglxx.dll:??)
#2 5F86C8DA atioglxx!DrvGetProcAddress() (C:\Windows\SysWOW64\atioglxx.dll:??)
#3 691C43A0 sf::priv::WglContext::~WglContext() () (C:\Work\Kodbas\bin\Debug\sfml-window-2.dll:??)
#4 FFFFFFFE ?? () (??:??)
#5 772EFB62 ?? () (??:??)
#6 772F2893 ?? () (??:??)
#7 773009C8 ?? () (??:??)
#8 773008AD ?? () (??:??)
#9 749A39F7 KERNEL32!GetCurrentApplicationUserModelId() (C:\Windows\SysWOW64\kernel32.dll:??)
#10 ?? ?? () (??:??)

Seems to reproduce kinda the same result that the old default-font-bug did. Although my guess is this has something to do with the mixture of textures and threads/mutexes!

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: sfeMovie Project [v1.0 released]
« Reply #42 on: February 27, 2013, 11:28:46 pm »
I started compiling around 7-8 AM GMT+1, and 14:30  it was still in the same place just ticking...
Hmm.. what's weird is it should either fail or succeed, but not wait forever.

You said it was stuck on the make call, but.. is it stuck or really slow?
As your said make --jobs=4 allows make to compiles 4 files at the same time, which will compile FFmpeg faster if your processor has 2 or 4 cores. On the other hand it'll also require 4 times the initial amount of memory, and depending on your hardware configuration it may be too much => swap to disk required => very slow compilation. But being completely stuck for 7 hours doesn't sound realistic, something else must be wrong.

As for your one-job-at-a-time fix, I don't know why it makes things work but that's good to know.

Quote
Successfully compiles! Seems to work as well, although why is it bundled with SFML sources? It creates problems since it creates 2 different versions of sfml on my system. Should be an easy fix but still.
That's true for the 1.0 release, however the latest version available on the Git reposity does no more include the SFML sources and will use your own SFML version.

Quote
Well I got it to compile well, managed to make it use my own compiled SFML as well, although I get a crash on exit when using your sfe::Movie
Do you get the same crash in release mode? the sfeMovie library is currently built only in release mode.
« Last Edit: February 27, 2013, 11:33:14 pm by Ceylo »
Want to play movies in your SFML application? Check out sfeMovie!

Haikarainen

  • Guest
Re: sfeMovie Project [v1.0 released]
« Reply #43 on: March 03, 2013, 04:09:46 pm »
Hmm.. what's weird is it should either fail or succeed, but not wait forever.

You said it was stuck on the make call, but.. is it stuck or really slow?
As your said make --jobs=4 allows make to compiles 4 files at the same time, which will compile FFmpeg faster if your processor has 2 or 4 cores. On the other hand it'll also require 4 times the initial amount of memory, and depending on your hardware configuration it may be too much => swap to disk required => very slow compilation. But being completely stuck for 7 hours doesn't sound realistic, something else must be wrong.

As for your one-job-at-a-time fix, I don't know why it makes things work but that's good to know.

That's true for the 1.0 release, however the latest version available on the Git reposity does no more include the SFML sources and will use your own SFML version.

Do you get the same crash in release mode? the sfeMovie library is currently built only in release mode.

I bet why the jobs is getting stuck is probably because of some threading-bug in MinGW-GCC (think 2 or more threads waiting for the same lock but it never happens or something). The crash happens in both release and debug, although it goes to Clock() constructor, which is probably because of GCC 4.7. . I have installed 4.6 now.. I will see if the compilation problems is  still there with 4.6 and latest git :)

Scratch that part about clock, I mixed stuff up

EDIT: Still crashes on 4.6. Also I had a BUNCH of issues compiling both ffmpeg & sfemovie under mingw-gcc & msys, even more because of git. You might want to look into that.
« Last Edit: March 03, 2013, 05:33:38 pm by Haikarainen »

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: sfeMovie Project [v1.0 released]
« Reply #44 on: March 07, 2013, 07:30:34 pm »
even more because of git
What do you mean?


Otherwise here are some news: I've finally been able to launch shell scripts specified in the CMake file, even when building sfeMovie from Visual Studio (ie. I made Visual Studio able to run shell scripts), even if it still requires MinGW to be installed. Thanks to this I should be able to include the FFmpeg build in the CMake build process:
- this will prevent anyone from forgetting to build FFmpeg
- dealing with command line won't be required anymore
- configuration (including debug/release and codec choice) will be done in the CMake GUI
- it'll also ease work for different OS configuration a lot because I'll no more have to care of these manually in the shell script
- I hope to get rid of every current configuration/installation issue so that I can focus again on further sfeMovie development

Thus rather good news I guess :)
Want to play movies in your SFML application? Check out sfeMovie!

 

anything