Hi,
I need to extract a frame from a wmv file and save it as a jpg. In fact
I need to extract a frame from each one of a collection of several
thousand wmv files, but that's beside the point.
I've actually written a script that does exactly this using the pyglet
module. But while it works fine on my local machine running Python 2.5,
my host is only on 2.4.3. They've installed pyglet for me, but it won't
run without ctype, and they don't suport it.
Can anyone suggest an alternative way to achieve this using a module
that will run on a standard 2.4.3 installation?
Thanks,
Martin 8 7066
Martin wrote:
I need to extract a frame from a wmv file and save it as a jpg. In fact
I need to extract a frame from each one of a collection of several
thousand wmv files, but that's beside the point.
I've actually written a script that does exactly this using the pyglet
module. But while it works fine on my local machine running Python 2.5,
my host is only on 2.4.3. They've installed pyglet for me, but it won't
run without ctype, and they don't suport it.
Can anyone suggest an alternative way to achieve this using a module
that will run on a standard 2.4.3 installation?
Pretty sure pymedia can do this kind of thing, possibly
with a bit of work. http://pymedia.org/tut/src/dump_video.py.html
I used it recentlyish to do the reverse: combine a series
of still shots into a time-lapse movie.
Alternatively, you might be able to commandline control
mencoder or ffmpeg itself to do this. Not sure, but there
must be *something* among those millions of command-line
options!
TJG
Tim Golden wrote:
Martin wrote:
>I need to extract a frame from a wmv file and save it as a jpg. In fact I need to extract a frame from each one of a collection of several thousand wmv files, but that's beside the point.
I've actually written a script that does exactly this using the pyglet module. But while it works fine on my local machine running Python 2.5, my host is only on 2.4.3. They've installed pyglet for me, but it won't run without ctype, and they don't suport it.
Can anyone suggest an alternative way to achieve this using a module that will run on a standard 2.4.3 installation?
Pretty sure pymedia can do this kind of thing, possibly
with a bit of work.
http://pymedia.org/tut/src/dump_video.py.html
I used it recentlyish to do the reverse: combine a series
of still shots into a time-lapse movie.
Alternatively, you might be able to commandline control
mencoder or ffmpeg itself to do this. Not sure, but there
must be *something* among those millions of command-line
options!
TJG
Hi Tim,
I've looked at Pymedia but I have to admit I couldn't work it out.
Commandline might be good, but I'm really hoping someone can point me in
the right direction, as this is not my area of expertise.
Thanks,
Martin
Martin wrote:
I've looked at Pymedia but I have to admit I couldn't work it out.
Commandline might be good, but I'm really hoping someone can point me in
the right direction, as this is not my area of expertise.
Nor mine :) Just so people can help you out, can you
be more precise in your requirement? Do you want just
the first frame (eg to act as an img placeholder for
an embedded video). Or do you want to extract one or
more arbitrary frames, eg for screen cap purposes?
This page: http://stream0.org/2008/02/howto-ext...from-a-vi.html
looks helpful from the ffmpeg pov, but I assume you're
as capable of using Google as I am. I had a very quick
go with the copy of pymedia I have installed here, but
it couldn't read a (fairly recent) .wmv file so that
might be a problem in any case.
UPDATE: Just tried:
ffmpeg -i bacardi.wmv -r 1 -f image2 images%05d.png
from that page and it produced useful stuff. Worth a try?
TJG
Tim Golden wrote:
Martin wrote:
>I've looked at Pymedia but I have to admit I couldn't work it out.
Commandline might be good, but I'm really hoping someone can point me in the right direction, as this is not my area of expertise.
Nor mine :) Just so people can help you out, can you
be more precise in your requirement? Do you want just
the first frame (eg to act as an img placeholder for
an embedded video). Or do you want to extract one or
more arbitrary frames, eg for screen cap purposes?
This page:
http://stream0.org/2008/02/howto-ext...from-a-vi.html
looks helpful from the ffmpeg pov, but I assume you're
as capable of using Google as I am. I had a very quick
go with the copy of pymedia I have installed here, but
it couldn't read a (fairly recent) .wmv file so that
might be a problem in any case.
UPDATE: Just tried:
ffmpeg -i bacardi.wmv -r 1 -f image2 images%05d.png
from that page and it produced useful stuff. Worth a try?
TJG
Thanks again Tim,
I'm just extracting the first frame to use as a thumbnail.
I will try ffmpeg. Thanks for pointer. I didn't really know where to
start looking.
Martin
In message <ma**************************************@python.o rg>, Tim Golden
wrote:
Alternatively, you might be able to commandline control
mencoder or ffmpeg itself to do this. Not sure, but there
must be *something* among those millions of command-line
options!
FFmpeg--yes!
Lawrence D'Oliveiro wrote:
In message <ma**************************************@python.o rg>, Tim Golden
wrote:
>Alternatively, you might be able to commandline control mencoder or ffmpeg itself to do this. Not sure, but there must be *something* among those millions of command-line options!
FFmpeg--yes!
Unfortunately it looks like I have the same problem as I do with pyglet
- it's not support by my host.
It looks like I might have to process the files locally and then upload
them. Painful.
Unless anyone else has any suggestions?
Martin
Martin wrote:
Lawrence D'Oliveiro wrote:
>In message <ma**************************************@python.o rg>, Tim Golden wrote:
>>Alternatively, you might be able to commandline control mencoder or ffmpeg itself to do this. Not sure, but there must be *something* among those millions of command-line options!
FFmpeg--yes!
Unfortunately it looks like I have the same problem as I do with pyglet
- it's not support by my host.
It looks like I might have to process the files locally and then upload
them. Painful.
Unless anyone else has any suggestions?
Well, since as far as I can see your host won't let you
install anything which isn't there already, you're down to
implementing a Python-only module to read a frame from a
..wmv. Which is, I would suggest, a not inconsiderable task.
Perhaps pre-filtering is the best solution after all.
TJG
Tim Golden wrote:
Martin wrote:
>Lawrence D'Oliveiro wrote:
>>In message <ma**************************************@python.o rg>, Tim Golden wrote:
Alternatively, you might be able to commandline control mencoder or ffmpeg itself to do this. Not sure, but there must be *something* among those millions of command-line options!
FFmpeg--yes!
Unfortunately it looks like I have the same problem as I do with pyglet - it's not support by my host.
It looks like I might have to process the files locally and then upload them. Painful.
Unless anyone else has any suggestions?
Well, since as far as I can see your host won't let you
install anything which isn't there already, you're down to
implementing a Python-only module to read a frame from a
.wmv. Which is, I would suggest, a not inconsiderable task.
Perhaps pre-filtering is the best solution after all.
TJG
Thanks Lawrence and Tim,
The irony is that I already have a Python only solution - it just
requires 2.5!
I've actually worked out a way to extract and compress just the
thumbnails from my local server and upload them without having to
re-upload the video files (which took days) so I'm happy.
Thanks for the suggestions,
Martin This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Don Crossman |
last post by:
Assume a MYSQL table, foo.
One column, bar datetime.
Two rows:
2004-01-01 08:00:00
2004-02-01 08:00:00
select * from foo where extract(day from bar)=1;
2 rows in set...
|
by: Kathryn |
last post by:
I hope you can help as this is driving me crazy!
I have an asp which has 3 frames on it as follows:
<FRAMESET rows="50%,*,10%">
<FRAME src="rundetailstop.asp" name="rundetailstop"...
|
by: Cactus |
last post by:
Hi,
I have a tree like structure build with javascrtip and loads of
iframes. How can find the complete 'frame-path' to the frame that
focused? I'm sure I can contruct something with hidden input...
|
by: Maik Wiege |
last post by:
Hi!
I want to show a blinking text over my derived CMDIChildWnd-class. The
blinking is done by one view which is hold by my frame. I set up a timer and
write text to the parent frame, which works...
|
by: Frame |
last post by:
I'm looking for tutorials or articles considering HTML Frames and how to
handle them with Javascript.
E.g. samples how Frames can exchange information, can a Frame instruct
other Frame to update...
| |
by: anonymous |
last post by:
Thanks your reply.
The article I read is from
www.hakin9.org/en/attachments/stackoverflow_en.pdf.
And you're right. I don't know it very clearly. And that's why I want
to understand it; for it's...
|
by: Earl T |
last post by:
I am using Media Player for playing movies (avi, mpeg, mov) in my
..net application.
I would like to show a preview image for each movie
opened by user.
Any simple way for us to get the...
|
by: mailing |
last post by:
Hello, I am hoping that someone can point me in the right direction.
I have 4 frames to my site. Two Rows, Two Columns.
|--------------------------------|-------------------------|
| ...
|
by: Rama Jayapal |
last post by:
I am pretty new to VB, so please forgive the simplistic question. This is
using VB .NET 2005
My form has three objects on it: a TextBox named URL, a Button named Extract
and a WebBrowser named...
|
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,...
|
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...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
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...
|
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...
|
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...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |