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

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

0 Members and 1 Guest are viewing this topic.

feliwir

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • Email
Re: sfeMovie Project [v1.0 released] [looking for developers]
« Reply #135 on: January 22, 2015, 01:05:41 pm »
Haha sorry I was on the wrong branch :D

JohnGreek

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: sfeMovie Project [v1.0 released] [looking for developers]
« Reply #136 on: February 02, 2015, 07:53:13 pm »
uhh i'm happy that this library is going so well but i still can't use it :(
I really need help; I just downloaded the MinGW release bin package(free decoders).

This is my .pro file(i work on Qt Creator):




The error i get all the time is: "Cannot obtain a handle to the inferior: The parameter is incorrect."
A cmd window(the output terminal) and no render window. When i don't use a cmd window for the output it says "The program has unexpectedly finished."
I also tried debugging but i get failed to start and a memory address with nothing else on output, function or variable..
Am i not linking to the correct libraries?
« Last Edit: February 02, 2015, 08:14:06 pm by JohnGreek »

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: sfeMovie Project [v1.0 released] [looking for developers]
« Reply #137 on: February 02, 2015, 09:15:18 pm »
Hello JohnGreek

A dll is of no use for the linker. So most of the "LIBS += … " lines you've here won't be used. You need to link against libname.dll.a files, or just use the -lname option like in line 33.

And according to a quick search, your error message is related to QtCreator: https://www.google.fr/search?rls=en&q=Cannot+obtain+a+handle+to+the+inferior:+The+parameter+is+incorrect&ie=UTF-8&oe=UTF-8
« Last Edit: February 02, 2015, 09:18:29 pm by Ceylo »
Want to play movies in your SFML application? Check out sfeMovie!

JohnGreek

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: sfeMovie Project [v1.0 released] [looking for developers]
« Reply #138 on: February 02, 2015, 11:55:40 pm »
Thank you for your reply.

So you mean i must find all the libs you refer on "Getting started" on this form?
Regarding the error on QtCreator i have already tried several solutions and still can't run it.
It happens when i add this: movie = new sfe::Movie(); on my code, when i remove it it works just fine :D

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: sfeMovie Project [v1.0 released] [looking for developers]
« Reply #139 on: February 05, 2015, 07:59:21 pm »
If you're talking of the long list of libraries for running applications relying on sfeMovie, the answer is no. :P These libraries are used for runtime only. The only libraries you need at link time are sfeMovie and SFML.

As for the fact that it works when you remove only this line, I still don't know: the error you state is not enough to know what's happening :p
You could eventually launch your program outside of QtCreator to check what error message you get (if it's a dll/compiler issue you'll be notified for sure).

I'll try on my side too.
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] [looking for developers]
« Reply #140 on: February 05, 2015, 10:18:50 pm »
So I tried and got it working ::)

My .pro file is as follows:
TEMPLATE = app
CONFIG += console
CONFIG -= app_bundle
CONFIG -= qt

SOURCES += main.cpp

include(deployment.pri)
qtcAddDeployment()

# SFML libs
LIBS += -L$$PWD/../../../Downloads/SFML-2.1-MinGW/lib/ -lsfml-graphics -lsfml-window -lsfml-system
INCLUDEPATH += $$PWD/../../../Downloads/SFML-2.1-MinGW/include
DEPENDPATH += $$PWD/../../../Downloads/SFML-2.1-MinGW/

# sfeMovie libs
LIBS += -L$$PWD/../../../Downloads/sfeMovie-Release-2.0.0-win32/lib/ -llibsfeMovie
INCLUDEPATH += $$PWD/../../../Downloads/sfeMovie-Release-2.0.0-win32/include
DEPENDPATH += $$PWD/../../../Downloads/sfeMovie-Release-2.0.0-win32/include

# sfeMovie requires C++11
QMAKE_CXXFLAGS += -std=c++11
 

Note that I did the setup for the Release mode only, but it's similar for debug. From what I remember, the SFML MinGW download is the one recommended for CodeBlocks. The sfeMovie library is the latest binary release availabe for download. I also had to add the C++11 flag because sfeMovie requires it (anyway without this you get a compilation error). And finally I copied all the dll from the bin directory of SFML and sfeMovie next to the executable.

So I didn't even got specific MinGW distribution issue... in QtCreator I have tried to build the program both with my own MinGW installation and with the MinGW provided by Qt's installer, and both worked fine.
Want to play movies in your SFML application? Check out sfeMovie!

JohnGreek

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: sfeMovie Project [v1.0 released] [looking for developers]
« Reply #141 on: February 07, 2015, 07:34:32 pm »
Hmm i see..
I will try this .pro configuration and post back the result.

Thanks for your time Ceylo :D

JohnGreek

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: sfeMovie Project [v1.0 released] [looking for developers]
« Reply #142 on: February 09, 2015, 01:19:56 am »
Hey, i got good news and bad news..

I managed to get it work(almost), i was doing everything correctly during link but the dlls where not on the project root folder so it was runtime error all the time.. quite stupid i guess. Well since i am working full on Qt it's own dlls are loaded automatically from the bin folder when executed from QtCreator i thought it's the same with everything else as well.. oh well i overcame that.
Now i decided to play with the full decoder pack on an .mp4 video, so i load it, it returns true as seen on the ss but i get this error:




I get this on the draw step of the video, setVolume(), fit() and update() are all executed correctly.
I tried with .mp4 and .avi. Is it a codec issue?
I feel i'm so close.. duh..

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: sfeMovie Project [v1.0 released] [looking for developers]
« Reply #143 on: February 09, 2015, 07:52:18 am »
Can you do the setup to use the debug libraries and run in debug mode ?
At first it made me think of a bug I recently got in a dev branch, but you're using a release so that's probably not it... maybe you found a new bug :-°
Want to play movies in your SFML application? Check out sfeMovie!

JohnGreek

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: sfeMovie Project [v1.0 released] [looking for developers]
« Reply #144 on: February 21, 2015, 11:32:42 am »
Hey,
i have some issues with debug, am i missing something?
I get a hell lot of undefined references about sfml but why?

# sfeMovie libs
LIBS += -LC:/Qt/Qt5.2.1/Tools/mingw48_32/lib -lsfeMovie-d.dll
INCLUDEPATH += C:/Qt/Qt5.2.1/Tools/mingw48_32/include
DEPENDPATH += C:/Qt/Qt5.2.1/Tools/mingw48_32/include

LIBS += -LC:/Qt/Qt5.2.1/Tools/mingw48_32/lib/ -lsfml-graphics-d -lsfml-window-d -lsfml-system-d
INCLUDEPATH += C:/Qt/Qt5.2.1/Tools/mingw48_32/include
DEPENDPATH += C:/Qt/Qt5.2.1/Tools/mingw48_32/

# sfeMovie requires C++11
QMAKE_CXXFLAGS += -std=c++11


This is the g++ compile output, you can see in the last line the libs linked and i see them all in the correct order as well...
g++ -c -pipe -fno-keep-inline-dllexport -std=c++11 -g -std=c++0x -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -DQT_GUI_LIB -DQT_CORE_LIB -I. -I"..\..\..\..\Qt\Qt5.2.1\Tools\mingw48_32\include" -I"..\..\..\..\Qt\Qt5.2.1\Tools\mingw48_32\include" -I"..\..\..\..\Qt\Qt5.2.1\5.2.1\mingw48_32\include" -I"..\..\..\..\Qt\Qt5.2.1\5.2.1\mingw48_32\include\QtGui" -I"..\..\..\..\Qt\Qt5.2.1\5.2.1\mingw48_32\include\QtCore" -I"debug" -I"..\..\..\..\Qt\Qt5.2.1\5.2.1\mingw48_32\mkspecs\win32-g++" -o debug\entity.o entity.cpp
g++ -c -pipe -fno-keep-inline-dllexport -std=c++11 -g -std=c++0x -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -DQT_GUI_LIB -DQT_CORE_LIB -I. -I"..\..\..\..\Qt\Qt5.2.1\Tools\mingw48_32\include" -I"..\..\..\..\Qt\Qt5.2.1\Tools\mingw48_32\include" -I"..\..\..\..\Qt\Qt5.2.1\5.2.1\mingw48_32\include" -I"..\..\..\..\Qt\Qt5.2.1\5.2.1\mingw48_32\include\QtGui" -I"..\..\..\..\Qt\Qt5.2.1\5.2.1\mingw48_32\include\QtCore" -I"debug" -I"..\..\..\..\Qt\Qt5.2.1\5.2.1\mingw48_32\mkspecs\win32-g++" -o debug\player.o player.cpp
g++ -c -pipe -fno-keep-inline-dllexport -std=c++11 -g -std=c++0x -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -DQT_GUI_LIB -DQT_CORE_LIB -I. -I"..\..\..\..\Qt\Qt5.2.1\Tools\mingw48_32\include" -I"..\..\..\..\Qt\Qt5.2.1\Tools\mingw48_32\include" -I"..\..\..\..\Qt\Qt5.2.1\5.2.1\mingw48_32\include" -I"..\..\..\..\Qt\Qt5.2.1\5.2.1\mingw48_32\include\QtGui" -I"..\..\..\..\Qt\Qt5.2.1\5.2.1\mingw48_32\include\QtCore" -I"debug" -I"..\..\..\..\Qt\Qt5.2.1\5.2.1\mingw48_32\mkspecs\win32-g++" -o debug\weapon_bullet.o weapon_bullet.cpp
g++ -Wl,-subsystem,console -mthreads -o debug\SpaceGame.exe debug/main.o debug/game_engine.o debug/game_state.o debug/state_mainmenu.o debug/state_stage_normal.o debug/entity.o debug/player.o debug/weapon_bullet.o  -lglu32 -lopengl32 -lgdi32 -luser32 -LC:/Qt/Qt5.2.1/Tools/mingw48_32/lib -lsfeMovie-d.dll -lsfml-audio-d -lsfml-graphics-d -lsfml-main-d -lsfml-network-d -lsfml-window-d -lsfml-system-d -LC:\Qt\Qt5.2.1\5.2.1\mingw48_32\lib -lQt5Guid -lQt5Cored
« Last Edit: February 21, 2015, 11:44:02 am by JohnGreek »

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: sfeMovie Project [v1.0 released] [looking for developers]
« Reply #145 on: February 21, 2015, 11:39:39 pm »
Hello JohnGreek,

You'll have to be more precise about the errors you got.
On my side I tried with the following .pro file and I'm able to compile, link and run fine:
Code: [Select]
TEMPLATE = app
CONFIG += console
CONFIG -= app_bundle
CONFIG -= qt

SOURCES += main.cpp

include(deployment.pri)
qtcAddDeployment()

# SFML libs
Release:LIBS += -L$$PWD/../../../Downloads/SFML-2.1-MinGW/lib/ -lsfml-graphics -lsfml-window -lsfml-system
Debug:LIBS += -L$$PWD/../../../Downloads/SFML-2.1-MinGW/lib/ -lsfml-graphics-d -lsfml-window-d -lsfml-system-d
INCLUDEPATH += $$PWD/../../../Downloads/SFML-2.1-MinGW/include
DEPENDPATH += $$PWD/../../../Downloads/SFML-2.1-MinGW/

# sfeMovie libs
Release:LIBS += -L$$PWD/../../../Downloads/sfeMovie-Release-2.0.0-win32/lib/ -llibsfeMovie
Debug:LIBS += -L$$PWD/../../../Downloads/sfeMovie-Debug-2.0.0-win32/lib/ -llibsfeMovie-d
INCLUDEPATH += $$PWD/../../../Downloads/sfeMovie-Release-2.0.0-win32/include
DEPENDPATH += $$PWD/../../../Downloads/sfeMovie-Release-2.0.0-win32/include

# sfeMovie requires C++11
QMAKE_CXXFLAGS += -std=c++11
The debug binaries I've used are the ones available on the website.
Want to play movies in your SFML application? Check out sfeMovie!

JohnGreek

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: sfeMovie Project [v1.0 released] [looking for developers]
« Reply #146 on: March 02, 2015, 12:36:55 am »
Heya Ceylo, got some results..

I tried with the full decoders pack.

When i run Release from QtCreator i get crash "StackHash_0a9e" but only when i call update or draw on the video
When i run Release from the executable i get crash on "libstdc++-6.dll" and this:


On Debug inside QtCreator it runs ok(no sound though, have to figure out how)
On Debug from executable i get the same crash like release on the end("libstdc++-6.dll"), rest debug is ok as i see:



My SFML is fresh build from source btw.
I read some things about "Runtime Errors", but my libstdc++.dll is the shipped with Qt,
could there be an issue with it?

Got excited when i saw the video playing on my game's window and sad at the same time
for not managing to make it work properly :/
« Last Edit: March 02, 2015, 01:13:25 am by JohnGreek »

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: sfeMovie Project [v1.0 released] [looking for developers]
« Reply #147 on: March 02, 2015, 01:03:20 pm »
Ok it looks line something really is goig wron with the media you're trying to play :D
Can you try with other file formats? And can you provide the media that is causing issues (if possible a small sample lf the video that is enough to reproduce the bug, otherwise.. it's ok but will take longer to download / upload).

Note that in the logs you get there is "No more audio packets" so there is clearly something wrong with the audio stream reading code or the input media file.
Want to play movies in your SFML application? Check out sfeMovie!

JohnGreek

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: sfeMovie Project [v1.0 released] [looking for developers]
« Reply #148 on: March 02, 2015, 07:24:36 pm »
Thanks for your help :)
i tried with another .wmv file but i got the same error.
Next i tried with an .mp4 and it works! but i don't have audio although i get this(Loaded acc audio stream):


I don't think it's the media's fault since it can play on vlc and windows media player fine.
I can still send you the videos to give them a try.

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: sfeMovie Project [v1.0 released] [looking for developers]
« Reply #149 on: March 02, 2015, 08:30:20 pm »
Yup I'll try to reproduce the issue once I've got the sample. The fact that VLC can play it fine is a good point, so I've probably done some stupid mistake ;D
Want to play movies in your SFML application? Check out sfeMovie!

 

anything