[Motmot] .fmf conversion information
Andrew Straw
astraw at caltech.edu
Mon Apr 20 18:19:58 UTC 2009
John Schneider wrote:
> Hi Andrew
>
> Thanks for the wire diagrams!
> Although we hate to be the ones who keep asking for more, we have
> another request (that has hopefully already been solved):
No worries! No problem asking -- I do hope for this software to gain a
general level of usefulness, and there is nothing like having a user
base request features to attain that...
do you have
> a program (GUI or command line) to split .fmf files?
Yes, use the playfmf program and go to "File->export smaller movie".
Then adjust the start and stop frame accordingly.
Or is there a way
> to register .fmf with ffmpeg?
I'm not sure exactly what you mean here, but you can use the fmfcat
program to pipe the movie to ffmpeg. Type "fmfcat" without arguments for
a brief help/usage statement. (I can see that adding start/stop frame
arguments might be very useful here.... Let me know if that would really
help you, as this would take only 5 minutes to implement.) The trouble
with fmfcat is that sometimes there's some kind of weird pipe issue I
haven't figured out, so I have to retry by hand until it works or first
pipe to a file. Piping to a file would be done like this:
fmfcat my_cool_movie.fmf > my_cool_movie.tmp
cat my_cool_movie.tmp | ffmpeg -vcodec msmpeg4vs -i - my_cool_movie.avi
rm my_cool_movie.tmp
The downside is that my_cool_movie.tmp can be huge. Thus I have
attempted to automate retrying on error with a bash script like the
following. If you save this script "save_as_avi.sh" and then make the
script executable with "chmod a+x save_as_avi.sh", you can then run this
with "./save_as_avi.sh my_cool_movie.fmf" which will then save the movie
fromfmf.avi encoded with the msmpeg4v2 codec. (I think you have to
install ffmpeg from the mediabuntu repository to get this codec. I think
the mjpeg codec should be available with the plain vanilla Ubuntu
version of ffmpeg.)
#!/bin/bash
FAIL=1
while [ $FAIL -ne 0 ]
do
sleep 1
echo "trying"
fmfcat $1 | ffmpeg -vcodec msmpeg4v2 -i - -y fromfmf.avi
FAIL=$?
echo "FAIL=$FAIL"
done
echo "done"
--
Andrew D. Straw, Ph.D.
California Institute of Technology
http://www.its.caltech.edu/~astraw/
More information about the Motmot
mailing list