Other Tech Stuff

Other Tech Stuff

Problems relating to using the Linux OS and applications that come with it..

Convert apache style certificates – crt and key files to IIS compatable pfx certificates with private key using openssl


Re-streaming sopcast with linux to ipad / iphone using ffserver ffmpeg and segmenter.


iPhone what is calaccessd?!


iPhone iOS5 poor battery life


Source based routing on Checkpoint SPLAT


CheckPoint R65 ndb_open: database ‘magic number’ corrupted(/opt/CPsuite-R65/fw1/database/fwauth.NDB) error


Google urchin analytics session error unable to call default routine.


iPhone slow to wake / slide to unlock – three network


How to increase your iPhone battery life – a few tips.


Hyperterminal / command line modem calls


Checkpoint fw monitor to debug and trace traffic.


Checkpoint FW HA debugging.


Business Objects Xi3 error – The Central Management Server has failed to start. Press ‘Retry’ to attempt to start it again or ‘Cancel’ to skip any actions dependendent on the Central Management Server. (STU000213)


Checkpoint anti-spoofing problems.


Checkpoint R60 VPN Debugging and killing IPSec / IKE Tunnels


Google sitemaps appearing in russian!


Business Objects Xi3 Services not starting.


Killing VPN Tunnels in Checkpoint (IKE etc.)


Finding duplicate files in Windows


iplayer on Nokia E66


Capturing and decoding POST data using tcpdump / wireshark


Adding virtual interfaces and routes to Macbook Air


Intro


Convert apache style certificates – crt and key files to IIS compatable pfx certificates with private key using openssl

This has always been a bit of an irritating command for me – I find it then forget it and it takes ages to remember the right syntax to do it the next time I need it.

So here it is using openssl

 

openssl pkcs12 -export -in mycert.crt -inkey mycert.key -out mycert.pfx -certfile ca.crt

 

Bosh

Re-streaming sopcast with linux to ipad / iphone using ffserver ffmpeg and segmenter.

I wanted to find a way to watch sopcast streams on my ipad, however there currently is no native ipad app for this.

Available for linux is the sopcast command line player – sp-sc-auth which works just fine, so all I needed to go was get this to my ipad. Fairly straight forward I thought as sopcast listens on a chosen port for you to connect a media application to – I tried it on my ipad with xyzplayer which worked fine for a standard def video stream, but with HD streams the picture would be in slow motion.

I tried a number of other players, but they all had the same problem. So I figured if I could re-stream the stream as h264 I could get quicktime to play it on my ipad, and that would sort the issue.

However – easier said than done!

I was able to get ffserver and ffmpeg to take the stream from sopcast and re-stream but again slow motion issues.

So I definitely needed to re-stream into a quicktime compatable stream.

So I started looking at the use of the open source conversion of apples segmenter. Looked great but had a nightmare trying to get live_segmenter.c to compile on my fedora system.

However after some digging it seemed the majority of my issues were with my version of ffmpeg.

Using these instructions I managed to get it to compile correctly:

wget http://epirat.de/wp-content/uploads/ffmpeg-export-snapshot-2009-12-02.tar.bz2
tar -xvjf ffmpeg-export-snapshot-2009-12-02.tar.bz2
cd ffmpeg-export-2009-12-01/
./configure --enable-gpl --enable-nonfree  --enable-libfaac\
 --enable-libmp3lame --prefix=/tmp/old_ffmpeg
make
make install
cd
git clone git://github.com/ePirat/HTTP-Live-Video-Stream-Segmenter-and-Distributor.git
gcc -v -Wall -g live_segmenter.c -o live_segmenter \
    -lavformat -lavcodec -lavutil -lvorbis -ltheora\
    -lbz2 -lm -lz -lfaac -lmp3lame \
    -I/tmp/old_ffmpeg/include \
    -L/tmp/old_ffmpeg/lib
rm -rf /tmp/old_ffmpeg
rm -rf ffmpeg-export-2009-12-01
rm ffmpeg-export-snapshot-2009-12-02.tar.bz2

I would love to credit the author but im unable to find a way too! So if you read this thanks, and drop me a mail for credit 🙂

 

After getting this to compile, I followed the instructions http://www.ioncannon.net/programming/452/iphone-http-streaming-with-ffmpeg-and-an-open-source-segmenter/

 

Well couldnt get the script to work so stripped it out to manually run ffmpeg and pipe it into live_httpstreamer – however turns out my m3u8 index wasnt being created and my files were not able to be encoded as I didnt have x264 installed correctly.

So took this https://sites.google.com/site/linuxencoding/install-script to get the x264 support installed.

Manually created my own m3u8 index just to test that it would actually work.

Ended up with it all working, although the audio is going out of sync, but i’ll look at that at some point..

My final command, assuming I have created the m3u8 file with just 2 hours worth of segments, is…

/home/user/Linux.Encoding.install/bin/ffmpeg -i http://127.0.0.1:7070 -f mpegts -acodec libmp3lame -ar 32000 -ab 48k -async 1 -s 600×480 -vcodec libx264 -b 1200k -flags +loop+mv4 -cmp 256 -partitions +parti4x4+partp8x8+partb8x8 -subq 7 -trellis 1 -refs 5 -coder 0 -me_range 16 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt 1200k -maxrate 1200k -bufsize 110k -rc_eq ‘blurCplx^(1-qComp)’ -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 30 -aspect 4:3 -r 30 -g 90 -async 2 – | /home/user/segmenter/live_segmenter 10 /var/www/html/video/ stream ipad

Any questions please feel free to post comments, I have pulled this together quickly so might well have missed something…

 

iPhone what is calaccessd?!

On the new iOS5 while debugging my poor battery life I came across a process on my iPhone called calaccessd which was hogging lots of CPU time and I felt it was responsible for my poor battery life – although no hard evidence yet.

Much googling turned up nothing however playing around I found that the daemon died immediately when I turned calendar off of notification centre and back to alerts rather than banner alert. I am hopeful that this will help the massive battery drain I have been experiencing and I will report back on this post.

Whilst it is nice to have my calendar stuff in the notification centre with the imminent release of intelliscreenX I can live without it for the moment if it gives me better battery life.

Cheers