Thoughts and tutorials on programming

Tuesday, August 23, 2011

ruby tempfile windows woe

test.rb:3:in `delete': Permission denied - C:/Users/packrd/AppData/Local/Temp/abc20110823-4296-kao0jx-0 (Errno::EACCES)
from test.rb:3

when doing File.delete tempfile_instance.path

tempfile_instance.delete instead

Monday, August 22, 2011

ffmpeg mingw msys build woe

libavfilter/asrc_abuffer.c: In function 'init':
libavfilter/asrc_abuffer.c:259:5: error: implicit declaration of function 'strtok_r'

meant "you need to install the pthreads lib" (I think)

Friday, August 19, 2011

ffmpeg woe

c:\dev\ruby\virtual-audio-output-sniffer>ffmpeg -f dshow -i audio="virtual-audio-capturer" captured_audio.mp3
FFmpeg version SVN-r23418, Copyright (c) 2000-2010 the FFmpeg developers
built on Jun 2 2010 04:12:01 with gcc 4.4.2
configuration: --target-os=mingw32 --enable-runtime-cpudetect --enable-avisynth --enable-gpl --enable-version3 --enable-bzlib --enable-libgsm --enable-libfaad --enable-pthreads --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libmp3lame --enable-libopenjpeg --enable-libxvid --enable-libschroedinger --enable-libx264 --extra-libs='-lx264 -lpthread' --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-librtmp --extra-libs='-lrtmp -lssl -lcrypto -lws2_32 -lgdi32 -lwinmm -lcrypt32 -lz' --arch=x86 --cross-prefix=i686-mingw32- --cc='ccache i686-mingw32-gcc' --enable-memalign-hack
libavutil 50.16. 0 / 50.16. 0
libavcodec 52.72. 1 / 52.72. 1
libavformat 52.67. 0 / 52.67. 0
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.20. 0 / 1.20. 0
libswscale 0.11. 0 / 0.11. 0
Unknown input format: 'dshow'

c:\dev\ruby\virtual-audio-output-sniffer>whichr ffmpeg
higher in the list is executed first
G:\Program Files (x86)\ImageMagick-6.7.1-Q16\ffmpeg.exe

c:\dev\ruby\virtual-audio-output-sniffer>whichr ffplay
higher in the list is executed first

meant "I was accidentally using a different version of ffmpeg--that bundled with imagemagick--instead of the one that does support installed in a different location"

mac os x enumerate windows like windows' EnumDesktopWindows

looks like in order to do it you need to either turn on "universal access" then use either applescript or the access API's in C to do it, or use some internal coregraphics private api's (in C). So for java users, its either ffi or JNA or the like, or call out to an applescript script.