New KWLUG meeting locations list

This blog entry collects possible new homes for KWLUG meetings. If you have some options to add, use the contact link to submit them.

Considerations

  • Parking?
  • Is bookable month after month?
  • Accessibility by bus? Walking?
  • Cost? (Free of charge is ideal)
  • Accessibility for disabilities? Wheelchairs?
  • Has a sound system?
  • Has a projector?
  • Has Internet access? Wired? Wireless?
  • Can accommodate 20-25 people per meeting?

Meta Resources

We went through this exercise when the Heuther Hotel got mad at us. There was a relevant discussion thread on kwlug-disc.

There is a site called SpaceFinder Waterloo which lists a bunch of rental spaces. Most of them cost money, however.

Locations to Investigate

These locations have been suggested but nobody has offered to follow up on them yet. If you would like to help then please volunteer to look into one or more of them.

Shopify Plus

Thalmic Labs

(Tim Laurence is investigating this for us. The Charles St location is likely unavailable.)

Smile.io

Formerly SweetTooth

Vidyard

WLU Faculty of Social Work

  • Rentals page: https://legacy.wlu.ca/forms_detail.php?grp_id=30&frm_id=1072
  • The cost is $17/hour. From past experience we would need to be out at 9pm sharp.

Netsuite

(Eric Gerlach or Darcy Casselman might be contacts here.)

Igloo Offices

Treehouse Coworking Space

TriOS

(Jason Eckert might be a contact here. WWITPro uses this space.)

Locations Under Investigation

Somebody has started to look into these locations, and they have not been ruled out yet. Often there are details that are missing about them; please fill in details if you can.

Downtown Community Centre

Brian Bentley is the contact here, via the Bits and Bytes Computer Club.

  • Parking is available
  • Internet would either be City wifi or we would pay for Bits and Bytes internet
  • The room would hold 20-25 people
  • Bookings would be quarter to quarter, but we would likely be able to get the space consistently. (There are no promises, however.)
  • Central downtown Kitchener location (which is good and bad, given construction)
  • There is a projector available
  • The space is accessible

Option 1: become a part of Bits and Bytes

  • Bits and Bytes would become the owner/sponsor for KWLUG meetings
  • The Bits and Bytes board would have to approve any such arrangement
  • Attendees would be expected to purchase Kitchener Group cards ($18.30 for adults, $12 for seniors per year). There are some added benefits to these cards, but they would be mandatory for members. It would be up to meeting organizers to police this.
  • There could be discounts available on these cards for low-income members, but they would have to fill out paperwork.
  • There would be some cross-promotion of the group via the City of Kitchener
  • Technically people under 18 would not be allowed to participate (!)

Option 2: rent the space on our own

  • We would need liability insurance (approximately $3 per meeting)
  • We would need about $80/month to rent the space for 3 hours
  • Parking passes would be available to attendees
  • Nobody would have to buy Kitchener guest cards
  • If we got City of Kitchener Tier 2 funding we would probably solidify our chances of getting the space on a regular basis

44 Gaukel

  • This space holds about 20 people at most.
  • It is on the second floor but there is an elevator.
  • It costs money.
  • Paul looked into this.

Communitech

This would be at the Tannery building.

  • Maybe problems month after month
  • Free?
  • May need to switch end time to 8:30pm
  • Paul is the contact

Laurentian Room

This is at the Zehrs Laurentian, 750 Ottawa Street South.

The KW-RASC group uses this meeting space.

  • Maybe free? Nope. $75 per meeting.
  • Not that walkable, but good parking
  • Some wifi access available, but you need to authenticate with the captive portal.
  •  
  • Paul has made initial contact but needs to follow up

43 Queen Street South, Upstairs

This is a meeting room the floor above the Queen Street Commons.

  • Probably free
  • Probably available even if Paul cannot host
  • Must be out by 9pm sharp (probably a little earlier)
  • Not wheelchair accessible at all
  • Parking is horrible
  • No sound system
  • A projector is probably available
  • Wired or wireless internet should be available

First United Church

Here is a map. The address is 26 William Street West, at the corner of King and William in Waterloo.

The website is http://www.firstunitedchurch.ca.

  • Free of charge
  • Few constraints on time
  • It is a church
  • Noisy (lots of echo in the room)
  • No sound system unless we get the gym
  • Does have a projector
  • Lots of parking
  • It is a church
  • Has a kitchen
  • Good accessibility via public transit
  • Wheelchair accessible
  • Bill Switzer is the contact.

University of Waterloo

  • Maybe free of charge? (Lori, Jeff)
  • Parking is bad

Kitchener City Hall

  • Stuart is investigating

Atomic Coworking Space

This is at 119 King Street W

  • Chris Craig is investigating

Kitchener Public Library

Waterloo Public Library

Probably Ruled Out

256 King

  • Owned by The Working Centre
  • Probably not available after hours
  • Parking will be an issue

Tags

wittr.in screenshot

On the mailing list, Raymond Chen told us about his favourite weather app, which can be accessed by typing

curl wittr.in/waterloo

on the command line, in a sufficiently large terminal window. He sent a screenshot, but it was too big for the mailing list. Thus I am attaching it here.

File Attachments

Attachment Size
raymondchen-wttr.in_.png 78.11 KB

Notes for website users

Here are a few notes for those who wish to log into the website.

You do not need a website login to access most (all?) content. You want a login if:

  • You are organizing meetings and need to create meeting agendas, podcast/vidcast links, etc.
  • You are doing website administration.
  • You feel a pressing need to use KWLUG's website as a blog.

To get access to the website, talk to one of the meeting organizers or website admins at a meeting or via e-mail. Not everybody gets website access.

To log in, use the Drupal login link at https://kwlug.org/user .

To add content, use the "Shortcuts" link you see when you log in. There should be a shortcut to "Add content".

To log out, click on your username in the top bar, and click "Log out".

Be sure to use the correct "Page Category" setting when creating content. For some content types (agendas, podcasts) this is filled for you. For others you need to set the category explicitly (vidcasts, blog posts).

If you do not like the WYSIWYG editor you can change the text format from "Basic HTML" to "Restricted HTML".

KWLUG webhost migration: Tuesday, March 14

KWLUG is switching web hosts on Tuesday, March 14. This site will be unavailable for most of Tuesday afternoon. The mailing lists will also be unavailable during the migration.

We expect that the new, redesigned website will be up and running by Wednesday morning. The canonical status page is http://pnijjar.freeshell.org/2017/kwlug-migration-status/. Check that page if you are wondering why things are taking so long.

We may also try to publish updates to Twitter and the Fediverse, but we cannot guarantee this.

Once the migration is complete old RSS feeds should work, but there may be a bunch of duplicated entries in your feeds. Unfortunately iCal feeds will break.

Drupal 8 Website Transition Issues Page

There is a testing version of the new KWLUG website available at https://d8.kwlug.org . Please explore the new website and report issues using the Contact Us page.

What Should Work

  • Meetings, blog, podcasts, vidcasts and other content all have been transferred.
  • Meeting and presentation nodes have been merged.
  • All old links to nodes should work (via redirects in the case of presentations).
  • Attachments should work (but all attachments are visible, which is different).
  • Menus are set up and should work on mobile and desktop displays
  • Many podcasts/vidcasts are associated with their meeting nodes (please report incorrect or missing associations).
  • If you block Javascript from most sites (notably Cloudflare) but not kwlug.org, your menu will be expanded. (will not fix, probably).

What Does Not Work (Yet)

  • For logged in users, the admin toolbar does not work in Midori
  • Meeting locations from May 2007 to June 2009 need to be checked

What Has Been Fixed

Fixed in production

  • Laptop Rescue Missions show up as being held at 7pm, not 4pm (we will fix this in the final version)
  • The "Other Places to Find Us" block is missing (we will recreate it in the final version)
  • Links on the "mailing lists" page are broken (we will fix this when the mailing lists are migrated)

Fixed in rc1

  • Old RSS feeds on the current site need to be redirected to new ones
  • Maybe the site shows up blank in Firefox for Android? We need confirmation reports of this. (Confirmed that this works. Thanks Khalid and Chris.)
  • The site is not SSL by default?

Fixed in alpha 2

  • When Javascript is turned off the menu is fully expanded.
  • On Internet Explorer 11, the logo is stretched out. (Oh IE. Never change.)
  • Changed the colour of the bikeshed (site background) to make it darker blue

Feature Requests

  • KWLUG Planet of associated bloggers (waiting for more KWLUG members to sign up)
  • iCal feeds for meetings (waiting for Drupal 8 iCal support to improve).
  • Organizational pages accessible to meeting organizers only

Site Goals

  • Making the site mobile-friendly.
  • Reorganize the site to make it easier to find the information people care about.
  • Focus on meetings as the central organizing force, associating information like podcasts and vidcasts with their meeting pages.
  • Reduce the use of the website as a multi-user portal of content creation. People can still use KWLUG as a blogging platform if they want, but so few people used this functionality it is not helpful to keep it as central functionality.
  • For security reasons, only provide accounts to people actively creating content for the site.
  • Preserve as much historical information as feasible, because some of the old content is interesting to look at years later.
  • Keep all user accounts of those who have created content; get rid of all others (most of whom were spam).

Links for the WatCamp Calendar demonstration, 12 September 2016

I just know people will be asking for these links during the WatCamp Calendar presentation...

Main WatCamp site: http://watcamp.com/

The Calendar: http://watcamp.com/calendar

The HTML-only Calendar: https://calendar.google.com/calendar/htmlembed?src=nlkc39jt4p0nbc4pk9pj7p5fh0@group.calendar.google.com&ctz=America/New_York&wkst=1

(added Monday, 12 Sept 2016) WatCamp's GitHub page: https://github.com/spaetzel/ical2json

--Bob.

GNU social presentation notes

Hi all: I've completed my presentation notes; if you have any questions, confusions, clarifications or requests for additional stuff let me know by about 3:00pm on Monday.

See you all Monday night! Bring your laptops, phones, and other web-enabled devices so you can join in the demonstration.

--Bob.
bjonkman@sobac.com

File Attachments

Attachment Size
gnusocial Presentation Notes.odt 31.41 KB

Continuing Adventures with Ubuntu and Apache

Continuing Adventures with Ubuntu and Apache.
In a previous blog post "Installing LAMP on Ubuntu 11.04 aka The Natty Narwhal" I documented my start with Ubuntu and the Apache webserver suite.
see: http://kwlug.org/node/824

This blog post was updated a few times as the installation was updated.
Recently, I went through another update exercise and instead of updating the previous blog post, I elected to make another blog post.

I am sure that this is "old hat" to many on this list.
But this work is not "old hat" to me.
And I would suspect that I am not alone in this.

As I recall, the previous updates to Ubuntu and especially to Apache were not trouble free.
I had been running Ubuntu 12.04 LTS since the last update in 20140525 or so.
(My bad: The other blog post does not explicitly say when 12.04 LTS was up and running.)
For some time I had been seeing Ubuntu notices that 14.04 was available. And when I tried to execute the update I saw an error message informing me that the Apache webserver was interfering with the update process. Fearing having a broken system I deferred the update for a while.

A few days ago, I bit the bullet and decided to update both Ubuntu and Apache starting with Ubuntu.
To update Ubuntu and according to various bits of advice on stackoverflow, askubuntu, apachefriends and elsewhere I needed to disable the Apache webserver.
ref: sudo service apache2 stop
ref: sudo update-rc.d apache2 disable
After a few runs at the update exercise the update from Ubuntu 12.04 LTS to 14.04 LTS was successful. The reasons why a few runs at the update exercise and details of which now elude me.

It may be needless to say that the the update to 14.04 LTS was not smooth as it could be.
But compared to the exercise in updating Apache the Ubuntu update was a whole lot smoother.

Restarting the Apache webserver was successful.
ref: sudo update-rc.d apache2 enable
ref: sudo service apache2 start

Continuing with the Apache update is where I ran into some real troubles.
Recalling that I had troubles with Apache updates over the past few years I saved a copy of /etc/apache2 in /usr (i.e. outside of /etc).
Again referring to the usual reference websites (see above) I executed apt-get.
ref: sudo apt-get install apache2
And, as I feared, I wound up with a broken system.

Apache simply would not start and, at times, would return error messages like:
The following packages have unmet dependencies: [ edit ]
Unable to correct problems, you have held broken packages.
The error messages referred to problems with the installation of php5.
Using our old sage, The Google, I looked for advice.
Somewhere there was a suggestion to use aptitude instead of apt-get.
No luck.

After attempting some repairs I trashed the broken /etc/apache2 installation.
And attempted to attempted a fresh install, again using apt-get.
And, in another run at this, using aptitude.
Result: "you have held broken packages" and again with references to php5.

I attempted to restore /etc/apache2 from a git repo created and maintained by etckeeper.
(Ref: discussions re: etckeeper in the KWLUG email list. And thanks to all who contributed.)
Result: "you have held broken packages" and again with references to php5.
Evidently, the issues with php5 are outside of /etc/apache2

I was not having much success with these repairs and looked again to The Google.
And I came across an entry about ppa repositories and how these can interfere with apt-get and aptitude.
ref: http://askubuntu.com/questions/540423/libapache2-mod-php5-depends-php5-…
After running through the advice given near the end of this askubuntu post it looked like the issues with php5 were solved.
And after I restarting the Apache webserver (an important step) the Apache webserver was running without errors.

Testing with /var/www/test.php containing <?php phpinfo(); ?> and executing FF: //http:/localhost/test.php.
The Apache phpinfo page is displayed.

Success.
My Linux PC is now running Ubuntu 14.04 LTS.
And Apache 2.4.7 is running - with php5

Notes:
The apache2.conf file in the new install of /etc/apache2 does not have any of the local configurations that were in the configuration file prior to the update.
TODO: Restore the apache2.conf file as required from either the saved copy of the old /etc/apache2 or from the git repo created and maintained by etckeeper.
From a tip as seen on askubuntu re: fqdn below:
"It's a personal preference that keeps my configuration changes separated from the distribution package. So updates are less complicated."
Ref:
sudo update-rc.d apache2 < enable : disable >
sudo service apache2 < start | stop | restart >
Re: errors with servers-fully-qualified-domain-name
see: http://askubuntu.com/questions/256013/could-not-reliably-determine-the-…
service apache2 restart
Restarting web server apache2
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
Ubuntu 14.04:
echo "ServerName localhost" | sudo tee /etc/apache2/conf-available/fqdn.conf
sudo a2enconf fqdn
Re: etckeeper
From the KWLUG list:
http://joey.kitenet.net/code/etckeeper/
On 2010-02-26 13:08, Andrew Cant wrote (re: etckeeper)
> So I have not see any big benefits yet, but it requires little effort
> to maintain, and having the history of my changes makes me happy.

Chris Irwin presents btrfs

Chris Irwin presents btrfs
Apr 14, 2015 kwlug-2015-04-15-btrfs
Jul 7, 2015 kwlug-2015-07-06-btrfs-again
For more info, see: kwlug.org/node/956 and kwlug.org/node/969

The Raspberry Pi revitalized my inner geek

As a single guy (AKA geek) just out of school, I tried to keep up on all the cool and upcoming tech. Over the past 15 years, I got married, had a kid, had several different roles at work and pursued a few different hobbies which steered me away from a lot of the fun I used to have with technology. I kept up enough to be proficient at work and to be the go-to tech guy of friends and family but I didn't have the drive or time to experiment as much.

The Raspberry Pi has piqued my interest again in some experimentation. It's an affordable way to mess around with a cool piece of technology and teach others about programming, hardware and open source software. I noticed the next meeting will be discussing the Pi so I won't go into it too much - attend the meeting to find out more. I may see you there if I get off work early enough.

Video editing using ffmpeg and ImageMagick

Sometimes, you want to edit multiple videos in a similar way. For that, I've found that the best way is to create a script that you can run consistently on those videos and get a consistent ouptut. For example, recordings from a conference or a day by day video log of your family vacation.

I have created some scripts using ffmpeg and ImageMagick for my some of my videos, saving me hours in the process.

The main advantages I've found are:

  • Consistency: I don't have to remember what I did to a video. It is all in the script
  • Time savings: Execute the script with the right parameters and go for dinner, let the computer work.
  • Control: I can execute just a portion of the script, play around with the options and be limited only by my imagination.

In this posts I will show some of the commands I've found most useful, these are very basic commands that can be improved by people more creative than me.

For this example I will use a script I created to edit my Toastmasters videos. You can find the full script attached to this post along with an explanation of each one of the components of the script

To test the script, just extract the attached sample file and execute the following command

./VideoEdit.sh sample.prm

This script does the following:

  1. Creates a few seconds of introduction video with a still image and information about the video (Title, speaker, date, etc)
  2. Creates a few seconds of closing video with a still image and credits and disclaimers
  3. Extracts a portion of the input video for editing as individual PNG frames
  4. Fades out the introduction image into the first 3 seconds of video
  5. Overlays some slides at certain points in the video
  6. Reassembles the video from the modified frames. adds the audio and attaches the introduction and closing.

It receives as parameters a file that contains the actual editing parameters:

  • INPUTFILE : Path to the file we want to edit
  • LOGO : Path to a file that will serve as the cover for the introduction
  • LOGOLENGHT : Lenght in seconds in which the introduction should show
  • SPEAKER : Name of the speaker
  • TITLE : Title of the speach
  • DATE : Date of the speach
  • SCENESTART : Time where the section of video I want to extract starts (can be as ss or as hh:mm:ss.fff)
  • SCENEDURATION : Time where the section of video I want to extract ends (can be as ss or as hh:mm:ss.fff)
  • PROJECT : Short name for the project. It will be used to name temporary files and the output file

Here is an example of my parameters file:

INPUTFILE="/media/cdrom0/VIDEO_TS/VTS_01_1.VOB"
LOGO="../TM-titleLogo.png"
LOGOLENGHT="5"
SPEAKER="Raul Suarez"
TITLE="The dreaded empty page"
DATE="July 28, 2011"
SCENESTART="00:06:58"
SCENEDURATION="00:07:20"
OUTPUTFILE="TM2"

Extract Video:
Extracts a portion of video from the input file converting the video to frame files one PNG file per frame and splitting the audio to to an mp3 file

mkdir -p "${OUTPUTFILE}-frames"
ffmpeg -loglevel quiet -threads 4 \
-i ${INPUTFILE} -ss ${SCENESTART} -t ${SCENEDURATION} \
-f image2 -y "${OUTPUTFILE}-frames"/frame%d.png \
-acodec copy -sameq -y "${OUTPUTFILE}.mp3"


-loglevel : defines how verbose I want the console output
-threads : If allows using multiple cores in a multicore processor. Can speed up some tasks
-i : The name of the input file
-ss : Indicates when does the segment of video we want start
-t : Indicates the duration of the segment of video we want
-f : Format of the output. In this case the format is image as we are extracting to one frame per file
-y : Overwrites files without asking
"${OUTPUTFILE}-frames"/frame%d.png : This part of the command tells ffmpeg to extract each frame to a file named frame1.png, frame2.png, etc
-acodec copy : extract the audio without re-encoding
-sameq : do not loose quality (may not be necessary here but I left it just in case)
"${OUTPUTFILE}.mp3" : is the name of the audio file we are saving

I could have done this with three commands, which is more readable, but takes more time

# Extract the video
ffmpeg -i ${INPUTFILE} -ss ${SCENESTART} -t ${SCENEDURATION} \
-acodec copy -vcodec copy -sameq -y "${OUTPUTFILE}-1.mpg"

# Split the audio to preserve it
ffmpeg -i "${OUTPUTFILE}-1.mpg" -acodec copy -sameq -y "${OUTPUTFILE}.mp3"

# Convert the video to frame files one PNG file per frame
mkdir -p frames
ffmpeg -i "${OUTPUTFILE}-1.mpg" -f image2 -y frames/frame%d.png

Create Introduction
Uses the ImageMagick convert command to create the introduction image by merging the logo file with the titles for the video

convert ${LOGO} -gravity Center -font DejaVu-Sans-Book \
-pointsize 20 -fill gray -draw "text 1,21 'Talk of the Town Toastmasters'" \
-fill white -draw "text 0,20 'Talk of the Town Toastmasters'" \
-pointsize 50 -fill gray -draw "text 2,72 '${SPEAKER}'" \
-fill white -draw "text 0,70 '${SPEAKER}'" \
-pointsize 30 -fill gray -draw "text 1,131 '${TITLE}'" \
-fill white -draw "text 0,130 '${TITLE}'" \
-pointsize 20 -fill gray -draw "text 1,171 '${DATE}'" \
-fill white -draw "text 0,170 '${DATE}'" \
"${OUTPUTFILE}-intro.png"

ImageMagick can, in a single instruction add multiple lines of text. It has different ways of doing this. For this example I used the "draw" command. To see other methods you can go to http://www.imagemagick.org/Usage/text/

This command gets the ${LOGO} file and overlays the text on top of it.

As you can see in this example, I have two "draw" commands for each line, I do this to create a "gray shadow" effect on the text.

The resulting image will be saved as "${OUTPUTFILE}-intro.png"

Create video from an image adding a silent sound track

ffmpeg -loglevel quiet -threads 4 \
-loop_input -i "${OUTPUTFILE}-intro.png" -qscale 1 -r 29.97 -t ${LOGOLENGHT} \
-ar 48000 -t ${LOGOLENGHT} -f s16le -acodec pcm_s16le -i /dev/zero -ab 64K -f mp2 -acodec mp2 \
-map 0.0 -map 1.0 -sameq -f mpegts -y "${OUTPUTFILE}-intro.mpg"

The first section of the command defines the video portion of the file

-loop_input will loop over the following file to create the output
-r : The output video will be 29.97 frames per second. This is the framerate for NTSC

The second portion defines the audio portion of the file: The silence. It is important to add a sound track or we will have problems concatenating at the end.

-ar : audio sampling frequency of the audio
-f : format, Note how when the format and codec are before -i, they refer to the input format, if they are after, they refer to the ouptut format.
-acodec : Audio codec
-i /dev/zero : This is where we take the "silence". Of course, if you want a real audio file you can use it here.
-ab : Audio bitrate

Finally we assemble the input video and audio into the ouput file

-map : These map parameters say: take the first channel of the first input (video) and the first channel of the second input (audio)
(I've explained the rest of the parameters in previous commands)

This is equivalent to the following three commands

# create proper lenght of silence
ffmpeg -ar 48000 -t ${LOGOLENGHT} -f s16le -acodec pcm_s16le -i /dev/zero -ab 64K -f mp2 -acodec ac3 -y silence.mp2

# Create still logo video
ffmpeg -loop_input -i "${OUTPUTFILE}-Logo.png" -qscale 1 -r 29.97 -t ${LOGOLENGHT} -y -f mpegts "${OUTPUTFILE}-logo1.mpg"

# Assemble still logo and silence
ffmpeg -loglevel error -i "${OUTPUTFILE}-logo1.mpg" -i "silence.mp2" \
-vcodec copy -acodec copy -map 0.0 -map 1.0 -sameq -threads 4 \
-y -f mpegts "${OUTPUTFILE}-intro.mpg"

The exit video is created in a similar way

FadeOut introduction
You may be wondering why we extracted all the frames to PNG files. The main reason is that it allows us to manipulate them however we want using ImageMagick. We can rotate them, mix, change colors, add overlays. Your imagination is the limit.

In this case I am disolving the intro image progressivelly into the corresponding input video frames.

mkdir -p "${OUTPUTFILE}-frames2"
for i in {1..90}; do
percent=$(echo "scale=3; ${i}*100/90" | bc )
convert -compose dissolve -gravity center -define compose:args=${percent} \
-composite "${OUTPUTFILE}-intro.png" "${OUTPUTFILE}-frames"/frame${i}.png "${OUTPUTFILE}-frames2"/frame${i}.png
done


for i in {1..90} : The loop will operate in the first 90 frames (3 seconds at 29.97 frames per second ~ 90 )
percent=$(echo "scale=3; ${i}*100/90" | bc ) : calculates the percentage we want to use to disolve. From 0 to 100% in 90 steps
The convert command disolves the "intro" image into each of the frames applying the corresponding disolve percentage.
Each of the resulting frames is written to another temporary folder.

Overlay an image
If you want to overlay an image on a section of video, you need to calculate the starting and ending frames so you can loop through those images doing the overlay:

I created a function to do the overlay, so I can overlay different images at different points in the video:

overlayImage () {
# Overlays an image on top of each frame in a range.
FILE="${1}"
GRAVITY=$2
START_FRAME=$(echo "scale=0; ${3}*29.97/1" | bc )
END_FRAME=$(echo "scale=0; ${4}*29.97/1" | bc )

for (( i=${START_FRAME} ; i<=${END_FRAME} ; i++ )) ; do
convert -compose dissolve -gravity ${GRAVITY} -define compose:args=90 \
-composite "${OUTPUTFILE}-frames"/frame${i}.png "${FILE}" "${OUTPUTFILE}-frames2"/frame${i}.png
done
}

The overlayImage function receives as parameters

  • The image we want to overlay
  • The relative positioning (gravity)
  • The start time on the section of video in seconds
  • The end time of the section of video in seconds

The loop disolves the overlay image into each of the frames for the section of video we want

Reassemble the video

# Copy the modified frames on top of the original frames
cp "${OUTPUTFILE}-frames2"/frame*.png "${OUTPUTFILE}-frames"

# Reassembles the frames and the audio into an output video
ffmpeg -loglevel quiet -threads 4 \
-r 29.97 -f image2 -i "${OUTPUTFILE}-frames"/frame%d.png \
-i "${OUTPUTFILE}.mp3" -acodec copy \
-map 0.0 -map 1.0 -sameq -f mpegts -y "${OUTPUTFILE}.mpg"

# Concatenates the introduction, video and closing
ffmpeg -loglevel quiet -threads 4 \
-i concat:"${OUTPUTFILE}-intro.mpg"\|"${OUTPUTFILE}.mpg"\|"${OUTPUTFILE}-exit.mpg" \
-r 29.97 -sameq -y "${OUTPUTFILE}.mp4"

And that's it. As you can see, with small modifications to these commands you can edit your video however you want.

If you search the internet you will find plenty of examples for ffmpeg for example
http://www.catswhocode.com/blog/19-ffmpeg-commands-for-all-needs

While the ImageMagick documentation is the best source for more examples.
http://www.imagemagick.org/Usage/

While you can do it using a GUI video editor such as Kino, Cinelerra or final cut. I found that the flexibility and repeatability of scripting it simplified my life.

I hope it simplifies yours too.

If you have any comments you can email me at

rarsa --at-- yahoo.com

File Attachments

Attachment Size
sample.tar_.gz 4.83 MB

Linux literacy course

(Apologies to those who have seen me plug this for the 15th time)

I am involved with running a course on "Linux and Free Software Literacy". The course starts at 7pm on Tuesday, October 18. It will be held in downtown Kitchener.

If you are interested in participating, there is still room in the course. Visit the KW FreeSkool site for more information.

Installing LAMP on Ubuntu 11.04 aka The Natty Narwhal

As new user with Linux using Ubuntu 11.04 I was in the "now what?" moment.
Then I recalled Khalid's presentation on LAMP.
Exploring with the Google I found the following tutorials.

http://tuxtweaks.com/2010/04/installing-lamp-on-ubuntu-10-04-lucid-lynx/
http://tuxtweaks.com/2010/01/how-to-uninstall-lamp-in-ubuntu-9-10-karmi…
http://tuxtweaks.com/2009/07/how-to-configure-apache-linux/

There were tuts going back a few revs but I thought 10.04 tut was close enough to 11.04.
And! Success! I now have a Linux webserver running LAMP.

20130217 updated: some of the info in the txtweaks tuts is dated but still useful
see: https://help.ubuntu.com/community/ApacheMySQLPHP
and https://help.ubuntu.com/12.10/serverguide/httpd.html

20140414 updated: having to do an apache / apache2 rebuild / reinstall seems to be an annual exercise;
on this go around, I found that the default conf files map to /var/www/html;
and that I had to drop in an index.html file into that directory to get
FF /localhost to bring up anything other than an empty "Index of /" page.

20140520 updated: encountered a couple of other gotchas in recent spins of apache2;
previously, conf files did not need a suffix; now these files must end in .conf;
httpd.conf is deprecated; use apache2.conf or custom .conf files instead;

20140525 the tuts above show how to modify apache2 to set up 'sites' under /var/www or elsewhere; configure apache2 as req'd to allow users to these sites; the tuts also describe how to modify the system file /etc/hosts to map 127.0.0.1 to these 'sites' with lines like:
127.0.0.1 mysite1
on the same PC, MyLinuxPC, a users on a browser could simply type in the name of the site 'mysite1' in the address bar to access the 'site';
this did not work across the LAN; on the Windows PC I had to modify the windows equivalent of the hosts file" c:\windows\system32\drivers\hosts with the addition of a lines similar to the following:
192.168.0.101 MyLinuxPC
192.168.0.101 mysite1

continuing in fits and starts;

Ubuntu 12.04 LTS Apache 2.4.9 (build: 2014-04-01)

20141019 updated: I do not have much to add here. I am still fiddling w/LAMP under Ubuntu 12.04 on MyLinuxPC. So far all is well w/LAMP on MyLinuxPC;
I am, however, working on web development, working w/XAMPP under Win 8.1 on a production PC and XAMPP on a home WInXP PC.
And I would like to note that the knowledge gained through the work on LAMP on MyLinuxPC is transferrable to XAMPP under Win**.

20141020 updated: for future reference: because the as-installed index.html went missing during an update I thought I would add the code for the file here:
[!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"]
[html]
[head]
[title]It works![/title]
[/head]
[body]
[h1]It works![/h1]
[/body]
[/html]

20150726 updated: fixed the entry above so that the html code for "It works" is displayed.
20150726 see Continuing Adventures with Ubuntu and Apache http://kwlug.org/node/989

JohnJ

Using an Android Phone as an Asterisk extension

Think about using your Android phone, connected through 3G or through WiFi as a telephone extension.

What do you need?

  • An Asterisk server (can be set up very easily)
  • A DID (VoIP phone line which usually costs very little)
  • An Android phone (or multiple phones)

Why?
Of course, Android is a phone, but using the cellular network costs money. If you configure your smart phone to register to Asterisk, the calls to your home/office are free and the calls to other numbers cost the same as if you were calling from the home/office.

Diagram
Here is my home network topology:
Network DiagramSteps
On your home network:

  1. If your network does not have an static IP, either get one or register with DynDNS.com and follow the instructions.
  2. If your Asterisk server faces the Internet, ensure that ports 10000-20000 are open in your firewall.
    If your Asterisk server is behind another firewall, ensure that those ports are forwarded to the Asterisk box and add the following to the [general] section in sip.conf
    externip=<my domain name>
    localnet=<IP base for my network>/255.255.255.0

    e.g.
    externip=mynetwork.homeip.net
    localnet=192.168.1.0/255.255.255.0

  3. Setup an extension in sip.conf (you can use whatever extension you prefer):
    [103]
    type=friend
    secret=complexPassword ;NOTE it is important to set up a complex password
    qualify=no ; Will not drop the connection
    nat=yes ; This phone may be outside the network
    host=dynamic ; This device registers with us
    canreinvite=no ; Asterisk by default tries to redirect
    context=default ; Or whatever context you want to define in Asterisk
    mailbox=103@default ; only if you are configuring voicemail.
  4. Add a dial plan for the new extension in extensions.conf
    For example:
    exten => 103,1,Dial(SIP/103)
  5. Restart your Asterisk Server
    $sudo /etc/init.d/asterisk restart

On the Android Phone:

  1. Download and install a SIP softphone application.
    The one that has worked for me is CSIPSimple. I tried 3CX but it had a lot of echo.
  2. Create a new account using the basic settings:
    Account name: Whatever you want, I use "home"
    Server: The IP address of your Asterisk server
    User name: 103 (or the corresponding extension)
    Password: the extension password defined in sip.conf

And that's it! your phone should be able to register and dial other extensions regardless of being inside or outside your network. If you have already registered your Asterisk with a DID provider, then you can start making calls.

File Attachments

Attachment Size
RarsaAndroidNetwork.png 37.91 KB

Integrating Asterisk and Ekiga.net behind a firewall

Asterisk is an open source telephone switch (PBX). Although it can be used in complex environments, it can also be deployed for simple home use.

I was planning on Describing the set up and configuration for my Asterisk server, but I found that there are many good tutorials that already cover the general steps. For example, this one from our fellow KWLUGer and Linux trainer extraordinaire rpjday
http://www.crashcourse.ca/wiki/index.php/Asterisk_on_Kamikaze

Normaly you use Asterisk with a telephony provider such as Unlimitel, Voip.ms, MyDivert.com and many others; from which you can get a real telephone number.

Ekiga.net is a free VoIP provider. It does not give you a phone number, but an account name. Very similar to MSN Messenger or Yahoo Messenger or Skype, the main difference is that you can associate that account with your Asterisk phone system.

Why?
I know that we enjoy being in front of our computers all day, but, when we are away from the computer, it is quite convenient to have the phone ring and receive an ekiga call even when the computer is turned off.

Ekiga is also the name of a free Softphone application provided by Ekiga.net and available in the repositories of most Linux distributions. There is also a Windows version for those friends and family which you haven't converted. During the set-up it will allow them to create a new ekiga account.

So assuming that you have an Asterisk server installed and you are able to call from extension to extension inside your network, I'll proceed to explain the simple steps to integrate with Ekiga.net

First, Here is my target physical architecture for this simple configuration:

While the Ekiga Wiki has good information regarding the integration, It assumes an Internet facing server. If your Asterisk server faces the internet, just follow the instructions. If like me, your server is behind a firewall, you'll need some extra steps.

Ekiga as an Asterisk client explains how to use Ekiga as a SoftPhone (phone extension) registered to your Asterisk Server. I http://wiki.ekiga.org/index.php/Ekiga_as_an_Asterisk_client
There is no problems with these instructions. Just follow them

Connecting Asterisk to ekiga.net explains how to configure Asterisk to send and receive calls through the Ekiga network
http://wiki.ekiga.org/index.php/Connecting_Asterisk_to_ekiga.net
Given that my server is behind a firewall as you can see in the diagram, and that I do not have a static IP; after following those instructions I had to do the corresponding adjustments to sip.conf

No Static IP, server Behind a firewal
To overcome this problem I registered for a free DNS name at DynDNS.com, this way even when my IP address changes I still have the same domain name. Most routers these days have an option to configure a DynDNS account. If that's not your case, you can still run a daemon on the server that will synchronize your IP address and domain name at regular intervals.

Once I had my DynDNS I added the following lines to the [general] section of sip.conf as explained at voip-info.org
externip=<my dynDNS domain name>
localnet=<IP base for my network>/255.255.255.0

e.g.
externip=mynetwork.homeip.net
localnet=192.168.1.0/255.255.255.0

and added the following line to the [ekiga] section of sip.conf
nat=yes

I restarted Asterisk
$ sudo /etc/init.d/asterisk restert

Firewall port forwarding
The final step is to forward UDP ports 5000 - 5100 on your firewall to go to your Asterisk server.

And that is it, you will be able to send and receive calls to and from other Ekiga users, just don't forget to use the corresponding prefix. (e.g. 9 in our example).

Reference:
www.asterisk.org
www.ekiga.org
www.ekiga.net
www.dyndns.com

File Attachments

Attachment Size
RarsaEkigaNetwork.png 48.65 KB

Initial KWLUG meeting announcement

Here is a post that Daniel Allen found announcing our first KWLUG meeting in October 2001.

Date: Thu, 27 Sep 2001 00:11:15 -0400
From: permute
To: pnij...@uwaterloo.ca
Subject: KWLUG announcement

Hello All
My name is Bill Rieck and I would like to invite you to the first meeting of
the Kitchener-Waterloo Linux Users Group (KWLUG) on Oct. 13, 12-1 PM.
The biggest obstacle to the beginning of a LUG is having a meeting place
booked and some concrete times and dates. I have booked The Working Centre
(free), 43 Queen St. S., Kitchener, ON, for Saturday, Oct. 13, 12-1 PM and
can continue to have them there once a month until we agree on an
alternative. Judging from many other LUG meet times out there, they all meet
on a weekday once a month at 7 or 7:30 PM. The meet time may have to shift
to a weekday eventually, but for now it will be a Saturday, come on out so
you can have your input on this.
We need lots of ideas on how to make a kwlug work, all levels of experience
are welcome, and help of any kind is needed. It's up to you to come out and
help give direction to our group.
It is a great community meeting space that can accomodate up to 40 people.
We have a VCR, coffee, many computers for internet and Linux use, and a
volunteer-run (no charge) computer repair facility.
Mapquest link:
http://www.mapquest.com/cgi-bin/ia_find?link=btwn/twn-map_results&map...
se=1&uid=uay0r8c2gbd0x5sd:tluyyw9wa&aphoto=0&SNVData=3mad3-h.fy%28wb5qfr_%29
r755ft%3bah7-%3d%5b2g%29yy%5dOGSMW%2bGV%2b%15%24%2bYOMYVDLM%14%40%2bIW%40%2b
Y%12%3a%28_%3dLV_qar5hw%28.56rghz%28l%241w-u.wf7%3bxcx5sf7.grfe%7cs%24jdvnd%
7c%5b9r_05%5d%14%11JDL%2bEJ%2bF%26%2bIJ%17L%19MWDC%3a%2bBL%3a%2bLV&pcat
A mail list has been set up that may prove useful. You can subscribe by
sending a text e-mail to majord...@thinkers.org with 'subscribe kwlug', no
quotes, in the body.