Archive for ‘Uncategorized’ Category
Uncategorized »

Media RSS (MRSS) generator script

datePosted on 10:35, March 17th, 2016 by Many Ayromlou

I came across a DOS batch file that generates the necessary xml manifest for Video files on BrightSign’s Developer Resources and Utilities page. Since I’m serving my video content to our BrightSign infrastructure from a LAMP stack I ended up rewriting their bat file as a shell script. This enables me to host the shell script in a local directory (/usr/local/bin) and run it from cron every 5 minutes against a folder full of mp4 files and have the MRSS manifest written to this folder as well. Then all that needs to be done is to point the BrightSign MRSS widget at the URL for the xml file ( The crontab entry looks like:

*/5 * * * *   /usr/local/bin/ /var/vhosts/jrnsignage/ >/var/vhosts/jrnsignage/VideoMRSS.xml

The script itself is pretty simple. I’ve tried to keep it almost as a exact copy of the dos batch file:

# This script requires 1 argument. Argument 1 is the path to the folder containing the mp4 media files.
# Change this to the BaseURL of the site you'll be serving the XML file from. Omit the last forward slash.
# You can change this to any number of minutes
guidnum=$(( RANDOM % 1000 ))
year=$(date +%Y)
month=$(date +%m)
day=$(date +%a)
hour=$(date +%H)
min=$(date +%M)
sec=$(date +%S)
header1="<?xml version=\"1.0\" encoding=\"utf-8\" ?>"
header2="<rss version=\"2.0\" xmlns:media=\"\">"
header4="  <title>Batch Custom Video MRSS template for BrightSign Players</title>"
header5="  <link>$baseurl/VideoMRSS.xml</link>"
header6="  <generator>Video MRSS Generation Batch File</generator>"
header7="  <ttl>$refreshmin</ttl>"
echo $header1
echo $header2
echo $header3
echo $header4
echo $header5
echo $header6
echo $header7
find $1 -type f -name "*.mp4" -print |while read FULLFILENAME
   FILESIZE=$(stat -c%s "$FULLFILENAME")
   echo "<item>"
   echo "   <title></title>"
   echo "   <pubDate>$year-$month-$day"T"$hour:$min:$sec.000z</pubDate>"
   echo "   <link>$baseurl/$FILENAME</link>"
   echo "   <description>$FILENAME</description>"
   echo "   <guid isPermalink=\"false\">$FNAME$guidnum</guid>"
   echo "   <media:content url=\"$baseurl/$FILENAME\" filesize=\"$FILESIZE\" type=\"video/mp4\" medium=\"video\"/>"
   echo "</item>"

echo $footer1
echo $footer2

sweet captcha site has been hacked – rhpop javascript

datePosted on 18:20, June 23rd, 2015 by Many Ayromlou

Fresh after recovery, I figured I write a small piece before I go home. If you’re seeing ad pop-ups or pop-unders from sites that load up something like rhpop-xxxxxx.js then you might have the sweetcaptcha plugin installed on your wordpress site. Let’s hope you’re the one who installed it — not the hacker :-), you might want to de-activate it and remove it from your system. Their site has been compromised and the wordpress plugin has also been pulled off the list. More general info here:

Happy hunting…..

Not sure why this is such a mystery, but it took the better part of the day to troubleshoot. The main issue with forum posts is that people have the right idea/intention, but the forum software mistreats the actual command line/short code. Spacing really really (did I say really) matters. I’m assuming that you’re using the default player definition that comes with the plugin. If you need to change it then make the appropriate change to this code as well. The code to get both RTMP and HLS working depends on defining both of those sources. In my case the source is my Wowza Server and I have two URI’s:

1) For HLS I use http://wowza.server.ip.address:1935/live/many/playlist.m3u8

2) For RTMP I use rtmp://wowza.server.ip.address:1935/live/many

Obviously as you can see my Wowza application is “live” and the stream instance name is “many”. So for this to work transparently in HTML (HLS) and Flash (RTMP) environments you need the following code inserted into a post or page in wordpress (make sure you do it in Text view, NOT Visual view):

[player sources="{ file: 'http://wowza.server.ip.address:1935/live/many/playlist.m3u8'},{ file: 'rtmp://wowza.server.ip.address:1935/live/many'}"]

NOTE: The above code intentionally starts with [player….Please replace it with jwplayer instead. I can’t seem to put the code in properly without the plugin — installed on this site — interpreting the code as shortcode.

Also, I can not be more clear…..SPACES DO MATTER HERE…..SO PAY ATTENTION!!!

Le Mystère du printemps

datePosted on 16:06, June 30th, 2013 by Many Ayromlou

Le Mystère du printemps, a set on Flickr.

TSG Sports Bike Shoot

datePosted on 17:05, May 5th, 2013 by Many Ayromlou

I know this is almost a year old, but I just noticed that it was not posted.

Model Shoot with Toronto Camera Club

datePosted on 16:58, May 5th, 2013 by Many Ayromlou

Recently shot with a bunch of people from Toronto Camera Club at their location. It was a great shoot, great models and MUA’s and a bunch of fun photographers. Just finished the sets and uploaded them to flickr. Here is a quick slideshow:

NASA – Neil Armstrong: 1930-2012

datePosted on 16:59, August 25th, 2012 by Many Ayromlou

NASA – Neil Armstrong: 1930-2012:

Neil Armstrong, the first man to walk on the moon during the 1969 Apollo 11 mission, has died. He was 82.


R.I.P. Jack Tramiel

datePosted on 17:27, April 9th, 2012 by Many Ayromlou

Probably one of the least known people in modern computing, Jack Tramiel, the man who brought us Commodore (and later on Atari Corp.) has passed away at age 83.

R.I.P. Dennis Ritchie

datePosted on 10:49, October 13th, 2011 by Many Ayromlou

Wow…..what can I say….First Jobs, now Ritchie…..I don’t like October anymore :-(

R.I.P. Steve Jobs

datePosted on 20:00, October 5th, 2011 by Many Ayromlou