473,721 Members | 2,196 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Video display, frame rate 640x480 @ 30fps achievable?

Hi,

I need to develop an application that displays video 640x480 16-bit per
pixel with 30 fps.

I would prefer to do that with Python (wxPython) but don't have any
experience whether it is possible to achieve that frame rate and still
have some resources for other processing left? My development PC would
be a Celeron 1 GHz. The final system could be a faster system.

I would appreciate if anybody could share some experience in that
field.

Thanks for any help.

Guenter

Sep 8 '05 #1
10 3979
Guenter wrote:
I need to develop an application that displays video 640x480 16-bit per
pixel with 30 fps.

I would prefer to do that with Python (wxPython) but don't have any
experience whether it is possible to achieve that frame rate and still
have some resources for other processing left? My development PC would
be a Celeron 1 GHz. The final system could be a faster system.


At the very least, you should be looking at Pygame instead, as wxPython
is not really intended for that kind of thing. Whether or not you can
manage the desired frame rate depends entirely on what you will be
displaying... a single pixel moving around, full-screen video, or
something in between? ;-)

See for example
http://mail.python.org/pipermail/pyt...ay/106546.html for
one first-hand report on frame rates possible with Pygame (whether it's
accurate or not I don't know).

-Peter
Sep 8 '05 #2
Peter Hansen wrote:
I need to develop an application that displays video 640x480 16-bit per
pixel with 30 fps.

I would prefer to do that with Python (wxPython) but don't have any
experience whether it is possible to achieve that frame rate and still
have some resources for other processing left? My development PC would
be a Celeron 1 GHz. The final system could be a faster system.


At the very least, you should be looking at Pygame instead, as wxPython
is not really intended for that kind of thing. Whether or not you can
manage the desired frame rate depends entirely on what you will be
displaying... a single pixel moving around, full-screen video, or
something in between? ;-)


no contemporary hardware should have any problem reaching that
framerate at that resolution, even if you stick to standard "blit" inter-
faces.

getting the data into the "blittable" object fast enough may be more
of a problem, though. I don't know how good wxPython is in that
respect; Tkinter's PhotoImage is probably not fast enough for video,
but a more lightweight object like PIL's ImageWin.Dib works just
fine (I just wrote a test script that reached ~200 FPS at 1400x900,
but my machine is indeed a bit faster than a 1 GHz Celeron).

</F>

Sep 8 '05 #3
Guenter wrote:
Hi,

I need to develop an application that displays video 640x480 16-bit per
pixel with 30 fps.

I would prefer to do that with Python (wxPython) but don't have any
experience whether it is possible to achieve that frame rate and still
have some resources for other processing left? My development PC would
be a Celeron 1 GHz. The final system could be a faster system.

I would appreciate if anybody could share some experience in that
field.


No first hand experience - but I guess pymedia is what you need. how to
combine that with wx? No idea.

Diez
Sep 8 '05 #4
Guenter wrote:
I need to develop an application that displays video 640x480 16-bit per
pixel with 30 fps .... it is possible to achieve that frame rate and still
have some resources for other processing left?


Yes.

Co-incidentally we've been looking at video playback this week as well.
We've been using Pygame with an Overlay surface, and it works fairly well.
Initially we're testing with simple IYUV raw video data, and it's a good
idea to use a modern video card supported by your OS, but other than that
we've not had problems. If you're interested in code, let us know :-)

If you end up using the framebuffer device in linux under xorg's X11 (not
exactly an ideal setup for video playback anyway!) there is a little oddity
that we found, due to SDL underneath, but we've been able to work
around that. The system I'm working on normally has that issue, and as
a result isn't accelerated and is a 1.6Ghz machine, but can do standard
defintion video (720x576) playback happily at >30fps. Normally though
most people can offload this to their graphics card so there shouldn't
be issues on your 1Ghz machine.

Clearly if you're interested in driving that you need to decode some data
source to IYUV, but that's a different issue.

People have embedded pygame in wxPython before (I don't know how
though, I've only seen screenshots of the integration) so although you said
wxPython and might've discounted pygame based on that, it might still be
suitable for you.

Regards,
Michael.

Sep 8 '05 #5
Fredrik Lundh schrieb:
getting the data into the "blittable" object fast enough may be more
of a problem, though. I don't know how good wxPython is in that
respect; Tkinter's PhotoImage is probably not fast enough for video,
but a more lightweight object like PIL's ImageWin.Dib works just
fine (I just wrote a test script that reached ~200 FPS at 1400x900,
but my machine is indeed a bit faster than a 1 GHz Celeron).

</F>


I would be interested in how many frames this reaches on my computer.
Did you create like two arbitrary images under PLI and then display
them one after another? Then stop the time and count how many times you
were able to switch between the two?

One feature I need to figure out when using PLI is that I need to move
a cursor over the image, controlled by a joystick. But I could add that
with the drawing feature when creating the image.

Now is there a feature that would allow me to map data from a memory
into an image? I saw there is a function called Image.frombuffe r(). If
I understand that right the buffer is a python data type. If I get that
data type to represent a specific memory where I can dma the data to I
should be able to display them pretty fast?
Guenter

Sep 8 '05 #6
Guenter wrote:
I would be interested in how many frames this reaches on my computer.
Did you create like two arbitrary images under PLI and then display
them one after another? Then stop the time and count how many times you
were able to switch between the two?

One feature I need to figure out when using PLI is that I need to move
a cursor over the image, controlled by a joystick. But I could add that
with the drawing feature when creating the image.


Maybe it would be a good idea to tell us something about the nature of
the image you'll be displaying (though the fact that it needs a
cross-hair or something is useful information, for a start). For
example, is it a photographic image? A map? A drawing? Is it
generated dynamically, or is it static? Do you pan over it, or zoom it,
or what?

-Peter
Sep 9 '05 #7
Peter Hansen schrieb:

Maybe it would be a good idea to tell us something about the nature of
the image you'll be displaying (though the fact that it needs a
cross-hair or something is useful information, for a start). For
example, is it a photographic image? A map? A drawing? Is it
generated dynamically, or is it static? Do you pan over it, or zoom it,
or what?

-Peter


It is a video image coming from a camera over a frame grabber board.
The video from the frame grabber is passed to another board that
performs some processing and when it comes back from that board it
needs to be displayed. The joystick allows to specify some regions of
interest in the image, but any zooming is done by the chip on that
second board. So the application needs only to take the image it gets
from that second board, displays it, handle the joystick input and does
some book keeping of where it is with the joystick position and zoom
factor.

It also needs to initiate the frame grabber and the second processing
board, but that should be simple by having some python extensions to
the respective software api provided with the boards. As the data
transfers between the boards are DMA based it should not put any
constrain on the application.

Guenter

Sep 9 '05 #8
Michael Sparks schrieb:
Yes.

Co-incidentally we've been looking at video playback this week as well.
We've been using Pygame with an Overlay surface, and it works fairly well.
I guess Pygame was more suitable overall for your application? I would
just be interested whether you have considered using PyMedia? I knew
about Pygame, but haven't done anything with it yet. So far when I
needed a GUI based application I have used wxPython, but I am not stuck
to that.
Initially we're testing with simple IYUV raw video data, and it's a good
idea to use a modern video card supported by your OS, but other than that
we've not had problems. If you're interested in code, let us know :-)

Thanks for the offer. If it is getting serious and I need some jump
start I might come back to you about the code.

[...]
Guenter

Sep 9 '05 #9
Guenter wrote:
It is a video image coming from a camera over a frame grabber board.
The video from the frame grabber is passed to another board that
performs some processing and when it comes back from that board it
needs to be displayed. The joystick allows to specify some regions of
interest in the image, but any zooming is done by the chip on that
second board. So the application needs only to take the image it gets
from that second board, displays it, handle the joystick input and does
some book keeping of where it is with the joystick position and zoom
factor.


Cool! It sounds to me as though Pygame (perhaps embedded in a wxPython
app) would be most appropriate. I know it has direct support for
joysticks, which I doubt the standard GUI frameworks generally have.
(Hmm... no, I'm wrong. At least wxPython does have Joystick support.
Check it out in the demo.)

-Peter
Sep 9 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
10335
by: Lonewolf | last post by:
Hi everyone, pls forgive me for my lack of knowledge and skills if my question sounds very stupid. I am trying to implement a video conferencing software and I am currently looking at a few set of technologies, among them WMP, RealMedia, H.323 and XviD (not sure if it is suitable for streaming even) . I would like to seek the advice of those experts on the following questions, 1) What is the best technologies to be used, in terms of...
0
1395
by: nan | last post by:
Please give me some tips or some source code by using which able to make the avi file for audio and video data to play in sync. Some details are given below: I noticed that many times the video recorded is 7 Frames per second and again it will change to 15 frames per second. While in this scenario the audio card's sampling frequency is 8000Hz therefore the number of samples per second is 8000. So , in this situation I am not...
1
3498
by: Isabella | last post by:
I have successfully insert .wmv files into MySQL. When I display the video in the browser using Read.aspx to get the .wmv: Response.ContentType = objDataReader.Item("swingContentType") Response.BinaryWrite(objDataReader.Item("swing")) if I directly call this Read.aspx, window media will open and play the .wmv. But I want to play the .wmv in browser, so I use another file to display ..wmv with <object>. Nothing happen:
2
2790
by: John | last post by:
Hi, Could anyone point me in the right direction for using video capture? I'd like to write a basic VB.NET app that shows the output from a composite camera and has a simple record now button. (I'd also like to be able to control things like frame rate etc.) At the moment my knowledge in this area is pretty basic so I'm just looking for some online resources where I can gem up on the subject. For example if I use a third party API,...
8
3672
by: chrisdude911 | last post by:
how do i add video into a javascript web page with my own custom buttons?
0
1320
by: phillip.wright | last post by:
I'm currently accessing images one frame at a time as bitmaps, locking the bits, then accessing the memory directly to manipulate the pixels before unlocking the bits. My current test is simply converting the images to grayscale. The frames are 640x480, and I am currently getting a frame rate of about 4.5 fps. Is this going to be the fastest way to do this, or could I somehow lock a section of memory once, then load the images directly...
2
7890
by: hzgt9b | last post by:
Using VS2003, VB.NET, BACKGROUND I have a window forms based application that will be distributed and executed directly from CD media. The app contains a TreeView control and a WebBroswer (AxSHDocVw.AxWebBrowse) control. The TreeView is populated with nodes that when clicked play an audio clip that is stored on the CD and navigate the browser control to a specified web URL (also stored on the CD). All the web URLs are html documents...
1
3438
by: jamesdylangoldstein | last post by:
So I tried to do my father a favor and convert his advertisements to .flv and place them on his website. With Flash being $600, I found an open-source .flv player and configured it. So today he called and stated it isn't working with IE. The script: <script type="text/javascript" src="http://www.fivestarsuzuki.com/ video/swfobject.js"></script> <script type="text/javascript"> <!--
1
2805
by: David Buckley | last post by:
Does anyone have any example code of converting any type of video to flash video at all using asp.net 2.0 c# web applications. God Bless
0
8840
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9367
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9131
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6669
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5981
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4484
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3189
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2576
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2130
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.