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

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

0 Members and 1 Guest are viewing this topic.

JohnGreek

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: sfeMovie Project [v1.0 released] [looking for developers]
« Reply #150 on: March 02, 2015, 08:50:57 pm »
No worries, this is the file: http://expirebox.com/download/7ab1c66cebc4827ce58276b499958c21.html
:D

It's cropped and plays both video and audio on vlc.
On debug when run from inside QtCreator it plays only the video with no sound and the above debug output.
Release from inside QtCreator and by running the .exe of both release & debug i get the runtime error.

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: sfeMovie Project [v1.0 released] [looking for developers]
« Reply #151 on: March 02, 2015, 10:26:59 pm »
Just tried both on OS X and Windows, with Visual Studio and QtCreator, got no issue :(
Could you zip the full (and ideally minimal) project with ALL the dependencies you're using (both .dll and .dll.a files, etc)? That way I'd be able to check and run with your configuration.
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 #152 on: March 04, 2015, 08:31:48 pm »
Here you go: http://expirebox.com/download/be53ad3e0afca2551a4c2d3187a9c97f.html

I guess something must be wrong with my configuration.
Now my debug executable is not crashing but i get no video or sound but no errors,  loaded h264 video stream and acc stream, nothing else. Release still crashes with stack_hash both inside QtCreator and executable.
I included only sfml and sfeMovie libs and dlls, do you need something more?

Thanks!

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: sfeMovie Project [v1.0 released] [looking for developers]
« Reply #153 on: March 05, 2015, 08:45:40 am »
Also can you give me the full content of your PATH? So that I can check which dlls may be loaded thanks to it.
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 #154 on: March 05, 2015, 08:42:59 pm »
My OS PATH is:
(click to show/hide)


But QtCreator has it's own Run Enviroment when executing applications, i have selected Build Enviroment for this project and that PATH is a bit different than my OS PATH:

(click to show/hide)

Knucklehead

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: sfeMovie Project [v1.0 released] [looking for developers]
« Reply #155 on: March 13, 2015, 05:12:26 pm »
Hello Im using sfe::Movie to do cutscenes in my project. I am trying to use the sf::Movie::getCurrentImage() to get the current frame image then I am binding that image and drawing it using openGL. the problem is its only returning the first image. I am calling the function sfe::Movie::update(); before I get the image, according to the documentation this should work. thank you for your time.

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: sfeMovie Project [v1.0 released] [looking for developers]
« Reply #156 on: March 13, 2015, 05:24:30 pm »
@ Knucklehead,
Did you call Movie::play()? Are you calling update() + getCurrentImage() + assigning the new texture in your sprite (or whatever you do with the texture) before each draw in your loop?

If yes and if it still doesn't work, can you provide a minimal sample code to reproduce the problem?

@ JohnGreek
I didn't forget you, was just busy moving house the past week :)
Want to play movies in your SFML application? Check out sfeMovie!

Knucklehead

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: sfeMovie Project [v1.0 released] [looking for developers]
« Reply #157 on: March 13, 2015, 05:27:36 pm »
movie.update();
                currentTexture = movie.getCurrentImage();

///////////////////////////////////////////////////////////////////////////////////

                pipeline->useVertexShader(pipeline->_VertPassThrough);
                pipeline->useFragmentShader(pipeline->_FragmentShader);

                glEnable(GL_TEXTURE_2D);
                glActiveTexture(GL_TEXTURE0);

                sf::Texture::bind(&currentTexture);
                pipeline->sendToShader("tex", 0);

                glBindVertexArray(vertexArray);

                glDrawArrays(GL_TRIANGLES, 0, vertexSize);

                glBindTexture(GL_TEXTURE_2D, NULL);
                glBindVertexArray(0);
                currentTime = 0.0f;


oh and I did movie.play(); the audio works perfectly. BTW thank you so much for responding so quickly, really appreciate it.

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: sfeMovie Project [v1.0 released] [looking for developers]
« Reply #158 on: March 13, 2015, 05:31:43 pm »
Ok, just saw your private message at the same time :P

I can't really say what's wrong here because I'm no OpenGL expert. What I can tell though is that in the provided sfeMovie demo source, replacing:
movie.update();
window.draw(movie);
with
movie.update();
sf::Sprite sp;
sp.setTexture(movie.getCurrentImage());
window.draw(sp);
does work for me.

If the same does for you then it's most probably related to OpenGL where I can't help :-\
Want to play movies in your SFML application? Check out sfeMovie!

Knucklehead

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: sfeMovie Project [v1.0 released] [looking for developers]
« Reply #159 on: March 13, 2015, 05:43:20 pm »
Specifically its just the getCurrentImage() isnt returning the current image its only returning the first image. So what other function do I have to call for the getCurrentImage() to return the currentframe. My openGL stuff is working perfectly its just the getCurrentImage is only returning the first image in the video. I am calling movie.update() before the current image so im confused why its not returning the current image. Do i have to call the draw function for the getCurrentImage() to move to the next frame?

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: sfeMovie Project [v1.0 released] [looking for developers]
« Reply #160 on: March 13, 2015, 05:51:10 pm »
As soon as you call play(), update() will replace the internal image if necessary over time. You cannot get all the images from the movie without waiting for it to be the right time if that's what you mean. The RenderWindow::draw() call is not necessary.

If this is not your issue, then please provide a complete AND minimal sample code to reproduce the problem.
Want to play movies in your SFML application? Check out sfeMovie!

Knucklehead

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: sfeMovie Project [v1.0 released] [looking for developers]
« Reply #161 on: March 13, 2015, 05:55:45 pm »
sf::Movie movie;

movie.openFromFile("insert file");
movie.play();
while(true)
{
movie.update();
sf::Texture tex =  movie.getCurrentImage();

///do something that uses the tex to debug I use a gpu debugger

}

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: sfeMovie Project [v1.0 released] [looking for developers]
« Reply #162 on: March 13, 2015, 05:57:06 pm »
A minimal AND complete code please.
Want to play movies in your SFML application? Check out sfeMovie!

Knucklehead

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: sfeMovie Project [v1.0 released] [looking for developers]
« Reply #163 on: March 13, 2015, 06:03:33 pm »
hm thats difficult without a working openGL framework. I dunno how to supply this, I could give you my openGL framework although it is a huge project.

Knucklehead

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: sfeMovie Project [v1.0 released] [looking for developers]
« Reply #164 on: March 13, 2015, 06:09:25 pm »
sf::Movie movie;

movie.openFromFile("insert file");
movie.play();
while(true)
{
movie.update();
sf::Texture tex =  movie.getCurrentImage();
sf::Image image = tex.copyToImage();
image.saveToFile("use a directory on your desktop");

}

the above code should work for debugging it. The only image saving to my desktop is the first image. So this above code will help reproduce the problem. The save to file should be a png. thank you again!
« Last Edit: March 13, 2015, 06:17:42 pm by Knucklehead »