From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_NextPart_001_01C99D94.A2A01EAF" Date: Thu, 5 Mar 2009 14:16:30 +0100 Message-ID: <3BBB12CF4EFF4040B38542759379E3CD0277E1@XMAIL.asuch.cas.cz> References: <3ae1c6f4deba0584a1512966294daacb@steponnopets.net> From: To: <9fans@9fans.net> Subject: [9fans] (no subject) Topicbox-Message-UUID: b3d4e492-ead4-11e9-9d60-3106f5b1d025 This is a multi-part message in MIME format. ------_=_NextPart_001_01C99D94.A2A01EAF Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable -----Original Message----- From: 9fans-bounces@9fans.net on behalf of mattmobile@proweb.co.uk Sent: Mon 2/23/2009 1:13 AM To: 9fans@9fans.net Subject: [9fans] actionfs =20 Hi, this one was an experiment /n/sources/contrib/maht/actionfs.c invoked with a regex like actionfs (file.mpg).([0-9]+).(ppm) if you then=20 cat /n/actionfs/file.mpg.100.ppm actionfs responds with the output from executing /bin/action-read $fd file.mpg.100.ppm file.mpg 100 ppm where $fd will be an fd to write to=20 i.e. trivially action-read would be something like ---- #!/bin/rc fd =3D $1 shift echo $* > /fd/$fd ----- The coresponding action-write also works ---- #!/bin/rc fd =3D $1 shift cat /fd/$fd > /dev/null # or whatever ----- I wrote it specifically to extract individual frames from video files = using ffmpeg on Linux and=20 bring them into Plan9 for processing but generalized the arguments in = case I thought of something=20 interesting later. My first round of experiment went like this cpu% cat /bin/action-read #!/bin/rc # expect fd fullname videoname frameno fname =3D `{echo -n $3 | tr ! '/'} { ssh storm single_frame $fname $4=20 } > /fd/$1 cpu% cat /n/storm/home/maht/bin/single_frame #!/usr/local/plan9/bin/rc # expect filename frameno timer =3D `{echo $2 | awk ' { printf "%d.%02d\n", $1/ 25, 4 * ($1 % = 25) }'} { ffmpeg -i $1 -t 00.001 -ss $timer /tmp/frame_$pid ^_%d.ppm cat /tmp/frame_$pid ^_1.ppm=20 rm -f frame_$pid ^_1.ppm rm -f frame_$pid ^_2.ppm # stupid ffmpeg outputs 2 frames (sometimes) } >[2] /dev/null I was then using imgfs to calculate the average rgb value to look for = black frames but (unsurprisingly) it was taking too long (4 secs per = frame) esp. as the Plan9 I was using is in Qemu, cue installing Plan 9 = on my terminal. The ffmpeg part on the Linux side (2Ghz Opteron) was taking 1 second on = its own so I have to come up with some sort of look ahead cache which is = contrary to the idea, I may as well just convert the whole file to ppms = at the start! I've not looked if it is I/O or CPU - perhaps a bit of = both. I've not got round to doing it on my fresh terminal yet. I've got a new = 3.2Ghz Dual Xeon server to migrate to and a Quad Core terminal to play = with so we'll see how that works out. I was hoping to get Xcpu in there but I couldn't see how to get the = Plan9 part working though I have the Linux bits up. I have a couple of decent OSX boxes available too (one PPC one Intel) = but I gave up getting it to compile :) too many projects ..... matt ------_=_NextPart_001_01C99D94.A2A01EAF Content-Type: application/ms-tnef; name="winmail.dat" Content-Transfer-Encoding: base64 eJ8+Ii8NAQaQCAAEAAAAAAABAAEAAQeQBgAIAAAA4gQAAAAAAADmAAEIgAcAGAAAAElQTS5NaWNy b3NvZnQgTWFpbC5Ob3RlADEIAQ2ABAACAAAAAgACAAEEgAEAAQAAAAAAAAEFgAMADgAAANkHAwAF AA4AEAAeAAQAKAEBIIADAA4AAADZBwMABQAOABAALgAEADgBAQmAAQAhAAAAQ0I1Q0QwRDQzNDhD M0M0NDk4ODMwOTNERjU3MkQzRDUAOQcBA5AGAPwNAAA5AAAAAwAmAAAAAAADADYAAAAAAEAAOQD7 fieZlJ3JAR4APQABAAAAAQAAAAAAAAACAUcAAQAAADMAAABjPXVzO2E9IDtwPUFyZWFsIFN1Y2hk b2w7bD1YTUFJTC0wOTAzMDUxMzE2NDZaLTIxMAAAHgBJAAEAAAARAAAAWzlmYW5zXSBhY3Rpb25m cwAAAABAAE4AAD9/lUuVyQEeAFoAAQAAABgAAAA5ZmFucy1ib3VuY2VzQDlmYW5zLm5ldAACAVsA AQAAAE0AAAAAAAAAg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