discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

About animation, just for the record, just for Windows users.

J
jpmendes
Sat, Mar 26, 2016 3:58 PM

This is for the Windows guys.
Sometime ago Torsten supplied  the script bellow. I had Cygwin installed and
tried to run the script without success due to errors, even after changing
type files in Notepad to Unix/OS type. Then I quit for some time. Yesterday
I installed msys2 and ran the script without any problem. Then I returned to
Cygwin and after some Googling I discovered that I had to run the "dos2unix"
utility which I did, and after that  the script start working. Conclusion
there are some differences between "msys2" and "cygwin" in what concerns
"dos/windows" type files.

---snip---snap---snip---snap---snip---snap---snip---snap---snip---snap----

#!/bin/bash

STEPS=200
PATTERN=%04d.png

for a in $(seq 0 $STEPS)
do
FILE=$(printf "$PATTERN" $a)
echo "$FILE"
openscad \
--imgsize=1920,1080 \
--camera=0,0,0,60,0,40,300 \
"-D$t=$a/$STEPS" \
-o "$FILE" animation.scad \

/dev/null 2>&1

done

ffmpeg -i "$PATTERN" -c:v libx264 -r 30 -pix_fmt yuv420p animation.mp4

---snip---snap---snip---snap---snip---snap---snip---snap---snip---snap----

jpmendes

--
View this message in context: http://forum.openscad.org/About-animation-just-for-the-record-just-for-Windows-users-tp16733.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

This is for the Windows guys. Sometime ago Torsten supplied the script bellow. I had Cygwin installed and tried to run the script without success due to errors, even after changing type files in Notepad to Unix/OS type. Then I quit for some time. Yesterday I installed msys2 and ran the script without any problem. Then I returned to Cygwin and after some Googling I discovered that I had to run the "dos2unix" utility which I did, and after that the script start working. Conclusion there are some differences between "msys2" and "cygwin" in what concerns "dos/windows" type files. ---snip---snap---snip---snap---snip---snap---snip---snap---snip---snap---- #!/bin/bash STEPS=200 PATTERN=%04d.png for a in $(seq 0 $STEPS) do FILE=$(printf "$PATTERN" $a) echo "$FILE" openscad \ --imgsize=1920,1080 \ --camera=0,0,0,60,0,40,300 \ "-D\$t=$a/$STEPS" \ -o "$FILE" animation.scad \ >/dev/null 2>&1 done ffmpeg -i "$PATTERN" -c:v libx264 -r 30 -pix_fmt yuv420p animation.mp4 ---snip---snap---snip---snap---snip---snap---snip---snap---snip---snap---- jpmendes -- View this message in context: http://forum.openscad.org/About-animation-just-for-the-record-just-for-Windows-users-tp16733.html Sent from the OpenSCAD mailing list archive at Nabble.com.
MK
Marius Kintel
Sat, Mar 26, 2016 7:03 PM

On Mar 26, 2016, at 11:58 AM, jpmendes jpmendes54@gmail.com wrote:

Cygwin and after some Googling I discovered that I had to run the "dos2unix"
utility which I did, and after that  the script start working. Conclusion
there are some differences between "msys2" and "cygwin" in what concerns
"dos/windows" type files.

Usually, you need to clone the source code in the same environment that you run scripts, as git will typically convert source code to the line ending of your choice on clone.

-Marius

> On Mar 26, 2016, at 11:58 AM, jpmendes <jpmendes54@gmail.com> wrote: > Cygwin and after some Googling I discovered that I had to run the "dos2unix" > utility which I did, and after that the script start working. Conclusion > there are some differences between "msys2" and "cygwin" in what concerns > "dos/windows" type files. > Usually, you need to clone the source code in the same environment that you run scripts, as git will typically convert source code to the line ending of your choice on clone. -Marius