ffmpeg : avi to image sequence
April 17th, 2008convert 10 frames, starting at 45 seconds, no sound, 3-digit padding
-
ffmpeg -i movie.avi -ss 45 -vframes 10 -an -f image2 %3d.png
convert 10 frames, starting at 45 seconds, no sound, 3-digit padding
if errors about DMA / unable to map /dev/dsp:
edit this file:
/proc/asound/card0/pcm0p
add lines for programs that should be allowed to have DMA:
quake3 0 0 direct
pdm 0 0 direct
http://www-i6.informatik.rwth-aachen.de/~dreuw/videotools.html
JPEG to AVI: mencoder -ovc lavc -mf fps=25:type=jpg ‘mf://*.jpg’ -vf harddup -ofps 25 -noskip -o outputfile.avi
this configuration works by defining each head on the card as its own device. the ServerLayout is where they get combined. The Virtual option in the Display subsection gives us a bigger desktop which we need to cut off the OpenGL Performer logo.
Section “ServerLayout”
Identifier “Default Layout”
Screen 0 “Screen0″
Screen 1 “Screen1″ RightOf “Screen0″
InputDevice “Generic Keyboard”
InputDevice “Configured Mouse”
InputDevice “stylus” “SendCoreEvents”
InputDevice “cursor” “SendCoreEvents”
InputDevice “eraser” “SendCoreEvents”
EndSection
Section “ServerFlags”
Option “Xinerama” “1″
EndSection
Section “Monitor”
Identifier “Monitor1″
VendorName “Unknown”
ModelName “WDE LCM-19v7″
HorizSync 30.0 - 82.0
VertRefresh 56.0 - 76.0
EndSection
Section “Monitor”
Identifier “Monitor0″
VendorName “Unknown”
ModelName “HSD HW191A”
HorizSync 30.0 - 80.0
VertRefresh 49.0 - 75.0
EndSection
Section “Device”
Identifier “Videocard0″
Driver “nvidia”
VendorName “NVIDIA Corporation”
BoardName “Quadro FX 1400″
BusID “PCI:1:0:0″
Screen 0
EndSection
Section “Device”
Identifier “Videocard1″
Driver “nvidia”
VendorName “NVIDIA Corporation”
BoardName “Quadro FX 1400″
BusID “PCI:1:0:0″
Screen 1
EndSection
Section “Screen”
Identifier “Screen0″
Device “Videocard0″
Monitor “Monitor0″
DefaultDepth 24
SubSection “Display”
Depth 24
Modes “1280×1024″ “1024×768″
Virtual 1280 1280
EndSubSection
EndSection
Section “Screen”
Identifier “Screen1″
Device “Videocard1″
Monitor “Monitor1″
DefaultDepth 24
SubSection “Display”
Depth 24
Modes “1280×1024″ “1024×768″
Virtual 1280 1280
EndSubSection
EndSection
Section “Extensions”
Option “Composite” “0″
EndSection
a couple of patches needed.
using ffmpeg from svn
in cvcap_ffmpeg.cpp
#define INT64_C #define __STDC_CONSTANT_MACROS #include#include “_highgui.h” extern “C” { #include #include #ifndef WIN32 #include #endif } //#define INT64_C (long long)
syndication test post
One of Ygdrasil’s major shortcomings has always been that you cannot encapsulate code using something like functions, classes, instances, VRML’s PROTO nodes, or other kinds of abstractions. A common Yg construction might involve an object node, a sound node, and a trigger node. like this:
wandTrigger trigger1 (when(start,sound1.play,object1.size(1.5)),when(stop,object1.size(1)))
{
sound sound1(file(glass.aiff))
object object1 (file(glass.pfb),position(0 5 3))
}
if you have, say, 20 or 30 objects that you want to create like this, that means 20 wandTriggers, 20 objects, 20 sound files, all with the appropriate routing between them. makes the scene file a little cluttered. what we’d like to do is make a function, or template, or prototype for this combination of nodes and the way they behave, so we could say things like :
soundObject (1,glass,0,5,3)
which would give it a number, the name for the .pfb and the .aiff to use, and position.
one way to do this would of course be to write a quick little perl or python script to generate the text, and then paste it into your scene or use a #include. or, you can use the magic of the C Preprocessor to define Macro Functions right in the scene file.
#define makething(N,NAME,X,Y)
pointAtTrigger(when(button1,anim_##N.start(1)))
{
mayaAnimation anim_##N (file(NAME##_1.anim))
{
object object_##N (file(NAME.pfb),position(X Y 0))
}
}
makething(1,alve_bureau,-15,10)
makething(2,alve_cornerstation,-10,10)
etc.