Aug 18 2011

ieee 754 – dec float to hex

example : 1280 double in hex = 40 94 00 00 00 00 00 00 as hex

1. log2(1280) = log(1280)/log(2) = 10
2. 1023 + 10 = HEX 0x409 (this is the exponent)
3. now the mantisse: 1280 / (2^10) < -1024 = 1.25 4. 1.25 * 2^52 (^23 for float) = 5.629.499.534.213.120 = BIN 1 0100 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 5. remove the 1st 1 (that for mantisse start) so we would have 100 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 = HEX 0x4 0000 0000 0000 6. 2. -> 0x409 < < 36 | 5.-> 0x4 0000 0000 0000 = hex = 40 94 00 00 00 00 00 00

calc: http://babbage.cs.qc.edu/IEEE-754/Decimal.html
example: http://www.wer-weiss-was.de/theme121/article3802216.html


Aug 7 2011

ffmpeg – VOB to flv + movs

ls /cygdrive/k/VIDEO_TS/VTS_01_*.VOB| while read line; do in=`echo $line|cut -d”/” -f5 `; ffmpeg -i $line -vcodec libx264 -pass 1 -vpre fastfirstpass -ar 44100 -ab 128k -b 2M -deinterlace -y /cygdrive/e/_BERIVAN_OKTAY_DUGUN/DVD3/$in.flv;done

then, once you have the video as h264, no reencoding is required for movs:
use ffmpeg -i NAME -vcodec copy -acodec copy NAME.mov