Video Playback Not working On Lower End Machine
BlitzMax Forums/BlitzMax Programming/Video Playback Not working On Lower End Machine
| ||
The theora movie api is not working on a lower end machine. Please give your inputs on the same. This is a critical requirement for our project. Regards, For gameshastra |
| ||
Whats your video size and what do you mean by lower end? 320x240 should run on 600-800 Mhz machines. 640x480 and especially 1024 and higher will need much more performant systems as the decompression is CPU side (most videos you are watching today normally are actually GPU decoded not CPU anymore, otherwise a 1280x720 would need 3ghz at least for realtime) |
| ||
I tested a few movie(320x240 to 640 x 480) on my notebook which is Celeron 1GHz, 256MB ram, and ATI mobility with no problem. Please provide the movie info and your system spec, I'm glad to test the example you provided. |
| ||
I am not able to get the specs of the test machine.Can you specify what is the minimum configuration required for the movie playback for 800x600 resolution?. |
| ||
At 24 frames per second? 1.6 Ghz +- |
| ||
The machine requirement is on the higher side.Is this because of a slower algorhithm?.Shouldn't it be possible to play on older machines?. Is it possible to use a different compression to get better speed?. What strategies can I try out to get better speed?. Regards |
| ||
It works fine on my S3 laptop with Intel III 1133mhz. I do have a question though. What made you choose a language with no native support for a project where video was critical? Once Theora was released why didn't you test it before committing to using Bmax for the project? |
| ||
As to your first question I assume that unless Blitzmax is fast it wouldn't be in the market. For the video I tried out other strategies first thing tried out was mpeg module in blitzmax but since this is under GPL license it was given up. Next I tried connecting to the ffmpeg library through Blitzmax with limited success. When theora was released , since it was with LGPL licence I decided to use it .I felt that even if the movie format is public domain it needn't be slower. Video is used in a small portion of the project but neverthless needs to perform well. Please give your suggestions on how to improve speed.is it possible for theora to have uncompressed video so that video is decoded faster? |
| ||
It isn't slower But theora is no stone age nooby format like mpeg1 It offers good quality and good compression on the file size, this has the side effect that it needs a better cpu or hardware support to do so (which a system with a weak cpu won't have as well) the only way to reduce the cpu use is to reduce the size or offer 2 versions of the video, one for real systems and one for stoneage. |
| ||
What problem are you getting? Provide the smallest example of code and the media file causing the problem for people to try here. If it is determined the issue is with a specific machine spec then make the minimum spec higher. If it is determined the issue is with a particular graphics card or CPU or whatever then add that to the unsupported list. If too many machines will be affected for your target audience then check an alternative solution. e.g. B3D either as a language or as a process to play the video if possible and it is windows only. |
| ||
Is it not possible to remove compression in the video for better performance Regards |
| ||
Hi I've not tested it on any lower end spec machines. The lowest spec machine I have is listed below. To maybe solve the problem, have 2 versions of the movie. One at 320*240 and one at 320*120 (scale by 1,2). this should play at 2 speed. Or have one at 160*120, and scale at 2,2. this should play 4 times as quick. I'm off on holiday soon and will be back next week, so I can start looking at maybe a solution then. There is no way to turn the compression off as that negates the idea as file size will be huge. Many thanks for everyone else who has helped so promptly. |
| ||
Use 800x600 video and/or screen on a low-end PC need a lot of optimization and Theora do require at least MMX/SSE for functional playing. You provided none example, project type, nor any extra info so no people can help out. I actually did a project for a school with very old PCs and I applied a educational Smacker license to use. http://www.radgametools.com/smkmain.htm If your target is lower end machine and have expect the profit can cover the license fee, it's worth trying. |
| ||
Yoko has a very good point. Without additional information it is virtually impossible to troubleshoot. Please send all relevant code (player only), movie and specs to my email address. |
| ||
Even on a 1.5 GHZ machine with 512 MB RAM the video appears slower, with slight jerks in the play back I have seen that pantson.MPEG has been speeded up, is it possible to expect something similar for theora or is it possible to support different levels of compression?. Regards |
| ||
The compression levels are set in whatever program you use to encode the video. I guess the easiest way to find out is to try encoding the original video several different ways, and check how fast the resulting player routine does its job... (If you play your videofile in a window, you can open the taskmanager in the background, and view the percentage CPU use at the same time. Check to see if the % is lower on a video with little compression than on one with high compression. If the % is lower on your computer, then you just lowered the bar on the requirements as well. (You may need to add a 'delay 1' or something to your main loop so the blitz program won't simply take up 100% either way) |
| ||
I have found a difference in the smoothness of video with my code using theora as compared to the sample code provided by you for the theora module. I will be highly obliged if you could find the problem in my code. My code which creates a wrapper for theora is as below. Your help is solicited. [Code] '----------------------------------------------------------------------------- ' File: TheoraMovie.bmx ' Author: Ramesh D ' Description: TheoraMovie class for playing movies in Theora Format ' Usage: To create a TheoraMovie object the Create function of TheoraMovie is called with the parameters as follows: video file path, audio file path, x position,y position, width, height '----------------------------------------------------------------------------- Import pantson.theora SuperStrict Type TheoraMovie Field _vid:Ttheora 'Field _aud:TSound Field _frameimg:TImage Field _xpos:Int Field _ypos:Int Field _width:Int Field _height:Int Field _state:Int Field _soundchannel:TChannel Const SkipVideo:Int = 1 Const EndVideo:Int = 2 Const StartVideo:Int = 3 Function Create:TheoraMovie(vidname:String,audname:String,xpos:Int,ypos:Int,width:Int,height:Int) Local mov:TheoraMovie = New TheoraMovie mov._vid=OpenTheora(vidname) 'mov._aud = LoadSound(audname) mov._xpos=xpos mov._ypos=ypos mov._width=width mov._height=height mov._state=StartVideo Return mov End Function Method ProcessInput(id:Int,x:Int,y:Int,data:Int) Select(id) Case EVENT_KEYDOWN If data=KEY_ESCAPE _state=SkipVideo Close() End If End Select End Method Method Start() _frameimg=CreateImage(TheoraWidth(_vid),TheoraHeight(_vid)) StartTheora(_vid) '_soundchannel=PlaySound(_aud) _vid.autoloop=False End Method Method Update(elapsedTime:Int) End Method Method Draw:Int() If (DrawTheoraImage(_vid,_frameimg) = True) DrawImage _frameimg,_xpos,_ypos End If Return _vid.eot End Method Method Close() 'StopChannel(_soundchannel) CloseTheora(_vid) End Method Method EndOfMovie:Int() Return _vid.eot End Method Method Pause() 'PauseChannel(_soundchannel) PauseTheora(_vid) End Method End Type '------------------------------------------------------------------------------------------------------------------------------------- 'Main loop Local m:TheoraMovie Graphics 800,600,0 ' load in movie m = TheoraMovie.Create("C:\\EAS_M.ogg","C:\\EAS_S.ogg",0,0,800,600) m.Start() ' loop until EndOfTheora While Not m.EndOfMovie() And Not KeyDown(key_escape) m.Draw() Flip Wend ' close m.Close() End [/Code] Thanking You Regards |
| ||
will have a closer look.. but can't see anything from quickly looking at your code. Is it possible to send my the movie file (max 10mb) to rich@... ? |
| ||
all replys will be in.... http://www.blitzbasic.co.nz/Community/posts.php?topic=74218 |