I use Microsoft Windows Media Encoder 9 Series which is free as in beer (I didn't need to download the free SDK).
In "Program Files\Windows Media Components\Encoder" it installs in particular a script called WMCmd.vbs.
You can run this script with cscript.exe which should already be in "Windows\system32" :
cscript.exe WMCmd.vbs -adevice X -vdevice Y -output C:\test.wmv -duration Z
where,
X= the number of the audio device (I used 1 in my case for my webcam)
Y= the number of the video device (I also used 1 for my webcam here)
Z= the duration in seconds (you can always kill the process on the go if the video is shorter)
For command-line options type "cscript.exe wmcmd.vbs" in the shell.
If I want the video to be shorter than the given duration and want to control this from a Python script I use the DOS taskkill command.
More informations also here.
samedi 16 décembre 2006
[Win] Command line : recording a live video from a webcam or another video device
Publié par
Francois Schnell
à
12:22
1 commentaires
Libellés : command-line, multimedia, windows
jeudi 7 décembre 2006
[Win] Video/Audio conversion with MMconvert
I'm searching for a tool to convert videos on Windows (in particular wmv) in a more open format. I also need a command line control (for later Python scripting).
A quick search on SourceForge brings me a first tool : MMconvert
In its installation folder there are MMconvert.exe (for command line) and MMConvertGUI (with a GUI ...)
The GUI version:
- choose the video container in "Video Operations" (I have avi, wmv,mkv)
- "add" one or more video to convert
- select the video and audio codecs to use, "ok" -> "execute"
Command line version:
Let say I want to convert my wmv into a matroska (mkv).
First I check for the audio and video codecs that I have on my computer (and that I can use with this container):
MMconvert.exe /f:mkv /lv
MMconvert.exe /f:mkv /av
This commands gives a list of codecs I can use for the matroska container (just remember the associated number, X and Y in the following).
To convert the video:
MMconvert.exe if=test.wmv of=test.mkv /f:mkv /v:X /a:Y
Memo:
if= input file
of=output file
f=format (for the container: avi,wmv,mkv...)
v=video
a=audio
To know more about the aguments : mmconvert.exe /?
It looks like a great tool but I haven't found yet if I can hide the little "Status windows" in command-line mod. I don't see either if I can play with the bitrate
Publié par
Francois Schnell
à
22:31
0
commentaires
Libellés : command-line, multimedia, windows
