Sharing Screen and Camera from Android to Linux

With all the video calls, twitch streaming and product demo work I’ve been doing recently, I’ve been building up a library of tricks for using my android devices within the video content I produce from my laptop, so I thought I’d share. I’ve worked remotely for many years but I think there’s more of us not going back to the office any time soon, so strong video communication skills are important! Continue reading

PHP Learning Path from O’Reilly

I’m very excited to announce that some of my content is featured in the PHP Learning Path from O’Reilly. The Learning Paths are a good way to buy a bundle of content from different people on related topics, and the introductory pricing is always a good deal! Their newest offering is the PHP Learning Path, which has a video course on PHP and MySQL, my intermediate PHP Video course (they wouldn’t let me call it “all the things Lorna thinks PHP developers need to know” unfortunately!) and also my video course Git for Web Developers which has a bunch of PHP in it as well as my best git tips and tricks.

I think it’s a pretty well-rounded collection and it’s only $99 for a couple of weeks, so get the PHP Learning Path here and let me know what you think?

New PHP Videos on OReilly.com

I am delighted to announce that I have new video titles available! I’m delighted for two reasons: selfishly, because these things take a lot of prep and I am pleased they are done; but also because I think it is very good news that a key industry player such as O’Reilly recognises PHP’s place in the world and works hard to publish new content in this area.

There are two videos available: PHP Web Services and Intermediate PHP (subtitle: a bunch of things Lorna thinks will make developers’ lives and applications better!), you can click through (disclaimer: affiliate links!) to get more information and a detailed chapter outline for each course. I hope that either or both of them will be useful to you. Continue reading

My ffmpeg Cookbook

I have been doing more screencasting lately, so I thought I’d share some recipes here, for my own future use and in case anyone else wants to use them. I capture my videos using Kazam on Ubuntu, usually by resizing my second monitor to 800×600 and then capturing that. Kinda eye-bleeding to record but looks good in playback and also works well either in tiny web view or on a big screen. I also screencapture my android device and for that I use Screen Recorder.

Continue reading

Video: Git Remotes and Tracking Branches

Here’s a little demo video that I put together to explain pushing/pulling with multiple remotes and how tracking branches make this easier. It’s one of the chapters from my “Git Adventures” talk, but it didn’t make it in to the talk in Amsterdam last week since we chose a different adventure that time – sharing it here in case it’s helpful to anyone else, and so I can find it later!

I also blogged about the tracking branches in a bit more detail if you’re interested.

Simple Video Editing on Ubuntu

In this series of posts about my screencasting toolchain, I’ve already written about using wmctrl to resize windows accurately and about using Kazam to capture snippets of video from various applications. This post describes my adventures in trying to glue the video snippets together.

Graphical Video Editing

For most people, it probably makes sense to use a graphical video editor, such as KDEnlive, OpenShot or Pitivi. I tried the latter two and found them sufficiently crashy that I was unable to get a video out of them that I could play back. This might be a result of my total lack of knowledge of, and respect for, containers, codecs, and … really whatever else I needed to know and didn’t. I presume the crashiness was me doing something wrong as I know that others do use these tools successfully.

I’m also a commandline sort of person. I have difficulty in using a pointing device for any length of time, and I found that I was able to capture the videos tightly enough that I just needed to glue them together rather than actually edit.

Ffmpeg

Ffmpeg is a commandline linux tool that is the biggest swiss army knife of video tools you have ever seen. There’s just one problem: on ubuntu, the program called ffmpeg is actually an alias for avconv, which is a fork of ffmpeg that is missing some key elements, such as the ability to concatenate videos. The upshot of which is that I downloaded and compiled my own copy of ffmpeg for this project. Once I had that, things got easier :)

I used this guide to get my ffmpeg tool and all the dependencies set up: https://trac.ffmpeg.org/wiki/UbuntuCompilationGuide

Ffprobe

Ffprobe is a tool that looks at a video file and gives information about it. One thing that I found about combining videos is that matching resolutions and encodings are really important – sometimes you can create what looks like a valid output file, only to have it unable to play in some players. To use it:

ffprobe video.mp4

I found this very useful, so I thought I’d add a note about it here. I tested my videos in VLC, it seems a bit less tolerant than the standard gnome player, so it was a good way to check if the videos would play. There’s also a simpler version of VLC that shows fewer controls: cvlc (I found it handy).

Combining Videos with Ffmpeg

Once I had the genuine version of ffmpeg compiled, I used that to combine my videos. First of all, I created an input file which contained a list of videos. Here’s an example of my

input.txt

file:

file 'wireshark1.mp4'
file 'wireshark2.mp4'
file 'wireshark3.mp4'
file 'wireshark4.mp4'
file 'wireshark5.mp4'
file 'wireshark6.mp4'
file 'wireshark7.mp4'

(can you guess what this was a video of?)

Then I used the following command to use this input file and create a resulting video of these videos played one after another:

./ffmpeg -f concat -i input.txt -c copy wireshark-demo.mp4

This can look successful and still produce a bit of a strange video if all your video files aren’t precisely the same resolution and format, but I was able to get results pretty quickly once I knew I had to get those things right in recording. The time spent planning the videos paid back several times over, as it was easy to just recapture one piece of the sequence if the need arose.

Ffmpeg is a beast, powerful but superbly complex, and it was tough going to find the commands I needed even without the “wrong” fork of the project being the default with ubuntu! Hopefully this post will remind me next time what to do, and if it helps you too, then awesome :) Feel free to leave additional tips and tricks in the comments.

Video Course on Learnable: OOP PHP

I’m delighted to announce that my new video course on Object-Oriented PHP is now available on Learnable! It’s very much an introduction, aiming to cover WHY objects are so cool as well as how to declare and use one. The course is a mix of video (filmed in my kitchen, welcome to my home everyone!), screencast, a couple of exercises for you to try, and also plenty of sample code to download. If you are just looking to get started with OOP, or know someone who is, then hopefully this will help you out.

On a related note, I’m also doing a Sitepoint “Talk with the Experts” session on 11th April (early morning UK time, as a special treat for everyone in Europe and further east, that doesn’t happen often!). There are more details here: http://www.sitepoint.com/forums/showthread.php?1012242-Talk-Object-oriented-PHP-with-the-Experts and I hope you can join me then.