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

Author Topic: sfeMovie project [v1.0 RC1 available]  (Read 143452 times)

0 Members and 1 Guest are viewing this topic.

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: sfeMovie project [v1.0 RC1 available]
« Reply #135 on: May 24, 2012, 01:26:52 pm »
Ok, so you're trying to play an Ogg video with sfeMovie 1.0rc under Visual Studio 2010 in debug mode.
I'll have a look at it next weekend, but not before. I'm too busy right now. For now stay in release mode if you can.

Ceylo
Want to play movies in your SFML application? Check out sfeMovie!

shadowguns

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: sfeMovie project [v1.0 RC1 available]
« Reply #136 on: May 24, 2012, 02:06:53 pm »
ok Thanks a lot Ceylo :)
but .. opps !
the next weekend !? :( :(
i'll go for an exam with my project next Saturday :(
so .. i need to complete my whole project with the video before Saturday morning !
so.. if you could please look at that problem & done it on Friday ??
Thanks again :D

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: sfeMovie project [v1.0 RC1 available]
« Reply #137 on: May 24, 2012, 04:08:41 pm »
Yes I can have a look at it friday afternoon too, but remember that it doesn't mean I'll immediately find out what's wrong. Thus you have no guarantee. For your exam you have to do a demo in debug mode ? (I'm actually busy with exams too these days :P )
Want to play movies in your SFML application? Check out sfeMovie!

shadowguns

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: sfeMovie project [v1.0 RC1 available]
« Reply #138 on: May 24, 2012, 05:18:08 pm »
Thanks Ceylo :D
i know of course :P
but .. please work hardly on it as you can :)
it is important for me please :)
thanks again ^^

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: sfeMovie project [v1.0 RC1 available]
« Reply #139 on: May 25, 2012, 04:36:56 pm »
*currently looking at what's wrong with debug mode*

For now I successfully reproduced the crash in debug mode (and it's working fine in release mode).

Edit: a debug build of sfeMovie made it work for me. Tell me if it's ok : https://legacy.sfmluploads.org/file/137 (34KB). I used both this debug build and the debug version of SFML in debug mode.
« Last Edit: May 25, 2012, 04:50:58 pm by Ceylo »
Want to play movies in your SFML application? Check out sfeMovie!

shadowguns

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: sfeMovie project [v1.0 RC1 available]
« Reply #140 on: May 26, 2012, 04:13:12 pm »
Thanks a lot Ceylo :D
it is now WORKS Perfectly :) :)
Thanks Again :)
----------------------------------------------------------------
there is a new problem here :(
movie.close();

"sfe::Movie::close" (declared at line 241 of "C:\sfml2\include\SFML\Movie.h") is inaccessible

it can't see the close() method ! .. i don't know why ! :( :(
although .. Movie.h is accessible and exists in that folder !
can you help me in this please ??

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: sfeMovie project [v1.0 RC1 available]
« Reply #141 on: May 26, 2012, 04:15:43 pm »
Thanks a lot Ceylo :D
it is now WORKS Perfectly :) :)
Thanks Again :)
Good to know! :)

there is a new problem here :(
movie.close();

"sfe::Movie::close" (declared at line 241 of "C:\sfml2\include\SFML\Movie.h") is inaccessible

it can't see the close() method ! .. i don't know why ! :( :(
although .. Movie.h is accessible and exists in that folder !
can you help me in this please ??
sfe::Movie::close() is private. Why do you want to use it?
Want to play movies in your SFML application? Check out sfeMovie!

shadowguns

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: sfeMovie project [v1.0 RC1 available]
« Reply #142 on: May 26, 2012, 04:32:20 pm »
i want to use a cut scene in my game project !
so .. i want to play it when i run the project .. while the game is not running !
then i want to close that video after it done .. and then run the game !
how can i do that ??

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: sfeMovie project [v1.0 RC1 available]
« Reply #143 on: May 26, 2012, 04:38:10 pm »
If you want to let the movie play until it's finished, use sfe::Movie::getStatus() every frame and start your game once it returns sfe::Movie::Stopped. If you want to stop it before the end, just call sfe::Movie::stop().

And note that the movie will still be displayed (even if not playing) until you stop calling window.draw(movie) every frame. Thus you should not call this when you want to play the game.
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 RC1 available]
« Reply #144 on: June 01, 2012, 05:25:11 pm »
Hello everyone!

As you may know, current sfeMovie's status on Linux is undefined. The main reason is that some Linux users told me it's working fine, whereas others told me it's not. Thus I would like to know, once for all, what's wrong with sfeMovie on Linux.

That's why I'm now inviting Linux users to test the following sfeMovie package (Intel) : sfeMovie-linux-32b-1.0-rc1.tar.gz (5.1 MB). It uses SFML 2.0 RC.

As for the source code of the testing program, you can use the provided sample code : main.cpp.

You should also know that, for now, I don't know much about distributing packages for Linux, so if anything is lacking or there are more interesting ways to provide packages than the way I did, don't hesitate to tell it :) . The binary files I gave include the FLAC, Vorbis, Theora and VP8 decoders (and no other one !). Thus, I'm especially expecting users to test OGG/OGV/WebM movies.

I'm also asking to the testers, to tell me whether it works AND what is your OS, processor and graphics card. That way I can check whether it works for a particular family of hardware.

Thanks :)
Ceylo
No feedback about this ?
Want to play movies in your SFML application? Check out sfeMovie!

Rogof

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: sfeMovie project [v1.0 RC1 available]
« Reply #145 on: June 13, 2012, 05:53:13 am »
Hello Ceylo

I managed to compile the library and run the sample program (from the git sources) using clang 3.1.
However, I found this issues:

* CMake was trying to link a static version of ffmpeg, which (at least for me) resulted in unresolved symbols even with the -fPIC flag, linking against a shared version solved the problem.

* The audio did not play in sync (it started after the video) in the movie I used with the sample program. The same video plays fine with mplayer and ffplay.


There may be other issues, but this is what I have found.

For additional information, this is my software/hardware stack:

OS: Arch Linux x86_64 (using kernel 3.4.x)
Processor: AMD Athlon X2 Dual-Core QL-64
Graphic Card: ATI Mobility Radeon HD 3200

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: sfeMovie project [v1.0 RC1 available]
« Reply #146 on: June 13, 2012, 10:46:54 am »
Hello Rogof!

Thanks for your feedback :) .

Quote from: Rogof
* CMake was trying to link a static version of ffmpeg, which (at least for me) resulted in unresolved symbols even with the -fPIC flag, linking against a shared version solved the problem.

I indeed noticed this recently thanks to the feedback of a French user. It was not happening for me because I was using a 32 bits Debian VM, and this issue appears on Linux 64 bits only. I've been able to statically link FFmpeg by adding the -fPIC flag, but also by disabling the assembler optimizations, which is not satisfying. Thus I ended up linking dynamically too. I think that's the solution I'll keep for Linux.

Quote
* The audio did not play in sync (it started after the video) in the movie I used with the sample program. The same video plays fine with mplayer and ffplay.
It may be this issue: https://github.com/Yalir/sfeMovie/issues/3 (although I didn't give much details about it).
But just in case: could you provide your testing video or at least a part of it ? by how much (approximatively) was it desynchronized ?

Thanks again!
Ceylo
Want to play movies in your SFML application? Check out sfeMovie!

Rogof

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: sfeMovie project [v1.0 RC1 available]
« Reply #147 on: June 13, 2012, 10:32:06 pm »
Quote from: Ceylo
But just in case: could you provide your testing video or at least a part of it ? by how much (approximatively) was it desynchronized ?
The audio starts about 3 seconds after it should. About the movie, I don't know if I can provide it because it's not mine. The movie is a demo movie I downloaded from here:  (NSFW)http://www.game-style.jp/dl/201206/07/99hir_li.php, the download link is the button bellow "デモムービー(104MB)".

The movie itself has a mpeg1 video stream and a mp2 audio stream. I converted the movie to ogv issuing this command:
ffmpeg -i hiragumo_demo_typeA.mpeg -c:v libtheora -c:a libvorbis -q:v 8 some_movie.ogv

The software used was:
    ffmpeg v0.10.3
    libtheora v1.1.1
    libvorbis v1.3.3

When playing the ogv movie with the sample program, found the next issues:

When closing the window while the movie is playing, it displays:
pthread_cond_destroy() error

When toggling to full-screen (pressing f) while playing the movie, a segfault occurs

EDIT: I'm using the open source radeon driver which, when toggling to full-screen gives a bunch of:
radeon: The kernel rejected CS, see dmesg for more information.

with this backtrace:
#0  0x0000000000000000 in ?? ()
#1  0x00007ffff04545ca in ?? () from /usr/lib/xorg/modules/dri/r600_dri.so
#2  0x00007ffff041ad4d in ?? () from /usr/lib/xorg/modules/dri/r600_dri.so
#3  0x00007ffff041fec1 in ?? () from /usr/lib/xorg/modules/dri/r600_dri.so
#4  0x00007ffff042018c in ?? () from /usr/lib/xorg/modules/dri/r600_dri.so
#5  0x00007ffff0420bf9 in ?? () from /usr/lib/xorg/modules/dri/r600_dri.so
#6  0x00007ffff7f76478 in sf::Texture::~Texture() () from build-clang-release/lib/libsfml-graphics.so.2
#7  0x00007ffff7f41af3 in sfe::Movie_video::~Movie_video() () from build-clang-release/lib/libsfeMovie.so.1.0.0
#8  0x00007ffff7f3f1b3 in sfe::Movie::~Movie() () from build-clang-release/lib/libsfeMovie.so.1.0.0
#9  0x0000000000401db5 in main ()
 

And when I run dmesg there is a lot of:
[19815.432173] radeon 0000:01:05.0: texture bo too small ((800 600) (1 1) 0 26 0 -> 1920000 have 4096)
[19815.432184] radeon 0000:01:05.0: alignments 832 1 1 1
[19815.432190] [drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !
 

By the way, I've also successfully build the library with gcc 4.7, and got the same problems.

EDIT2: Sometimes the audio plays in sync with the video, don't know the reason though.
« Last Edit: June 14, 2012, 01:27:03 am by Rogof »

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: sfeMovie project [v1.0 RC1 available]
« Reply #148 on: June 17, 2012, 10:46:44 pm »
As for the radeon issue, isn't it the same issue as this ? https://bugs.freedesktop.org/show_bug.cgi?id=47039

As for the audio desynchronization, I still didn't test it. Till now I only fixed the Linux build so that sfeMovie is dynamically linked against FFmpeg. It's committed. But then I noticed I get a crash in sws_scale() on Debian 64 bits but not on Debian 32 bits (exact same build except it's 64 bits). The crash more exactly occurs in an assembler code. I could disable assembler optimizations to get it work but 64 bits Linux users would get a loss in performances. I'm still searching how I can fix this. Thus I couldn't even test fullscreen switching (it works fine for me with the 32 bits kernel).
Want to play movies in your SFML application? Check out sfeMovie!

Rogof

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: sfeMovie project [v1.0 RC1 available]
« Reply #149 on: June 18, 2012, 04:03:54 am »
Quote from: Ceylo
As for the radeon issue, isn't it the same issue as this ? https://bugs.freedesktop.org/show_bug.cgi?id=47039

No, the bug is this: https://bugs.freedesktop.org/show_bug.cgi?id=49817.

Quote from: Ceylo
... I noticed I get a crash in sws_scale() on Debian 64 ...

Actually, I also got a segfault using the same movie but encoded with a different quality.
I think is the same error but just in case, here is the backtrace:
#0  0x00007ffff38f6656 in yuv420_bgr32_MMX (c=0x11b5a80, src=0x7fffffffd520, srcStride=0x7fffffffd500, srcSliceY=0, srcSliceH=600,
    dst=0x7fffffffd540, dstStride=0x7fffffffd510) at libswscale/x86/yuv2rgb_template.c:417
#1  0x00007ffff38e2e20 in sws_scale (c=<optimized out>, srcSlice=<optimized out>, srcStride=0xe380e0, srcSliceY=0, srcSliceH=600,
    dst=<optimized out>, dstStride=0xe382c0) at libswscale/swscale_unscaled.c:1030
#2  0x00007ffff731d5bf in sfe::Movie_video::decodeFrontFrame(bool) () from ../product/lib/libsfeMovie.so.1.0.0
#3  0x00007ffff731d7ac in sfe::Movie_video::loadNextImage(bool) () from ../product/lib/libsfeMovie.so.1.0.0
#4  0x00007ffff731d875 in sfe::Movie_video::preLoad() () from ../product/lib/libsfeMovie.so.1.0.0
#5  0x00007ffff731adbc in sfe::Movie::openFromFile(std::string const&) () from ../product/lib/libsfeMovie.so.1.0.0
#6  0x0000000000401616 in main ()

Quote from: Ceylo
I could disable assembler optimizations to get it work but 64 bits Linux users would get a loss in performances.

If by "disable assembler optimizations" do you mean to build ffmpeg with the "--disable-asm" flag, then I also got a segfault with this backtrace:
#0  0x00007ffff3932b39 in yuv2rgb_c_32 (c=0xd9c630, src=<optimized out>, srcStride=0x7fffffffd500, srcSliceY=0, srcSliceH=600, dst=<optimized out>,
    dstStride=0x7fffffffd510) at libswscale/yuv2rgb.c:217
#1  0x00007ffff392d840 in sws_scale (c=<optimized out>, srcSlice=<optimized out>, srcStride=0xc08c20, srcSliceY=0, srcSliceH=600,
    dst=<optimized out>, dstStride=0xe373b0) at libswscale/swscale_unscaled.c:1030
#2  0x00007ffff731d5bf in sfe::Movie_video::decodeFrontFrame(bool) () from ../product/lib/libsfeMovie.so.1.0.0
#3  0x00007ffff731d7ac in sfe::Movie_video::loadNextImage(bool) () from ../product/lib/libsfeMovie.so.1.0.0
#4  0x00007ffff731d875 in sfe::Movie_video::preLoad() () from ../product/lib/libsfeMovie.so.1.0.0
#5  0x00007ffff731adbc in sfe::Movie::openFromFile(std::string const&) () from ../product/lib/libsfeMovie.so.1.0.0
#6  0x0000000000401616 in main ()

 

anything