Wednesday, January 28, 2015

Record your iPhone with Android

Here's a short tutorial on how to record the display of your iPhone (or any iOS devices) using your Android device.


It works best with an Android tablet as you can easily display the content and also the webcam.  Yes, rooting is needed...

How to record your iOS/Android display

There are many ways to record the screen of your desktop or device to create amazing screencasts.  On a computer, it's easy as there are many solutions available.  For mobile devices, it maybe a bit more complex...

It all depends on what you have.  Most of the time, you'll need to record the mobile display with the help of a PC/Mac.  Creating screencasts can be expensive but there are many solutions that are free or will cost you just a few dollars.

To create a screencast, you'll need a good microphone, a fast computer and a few trials to get it right. If you want to improve the quality of your videos by adding overlays, titles and transitions, a good movie editor is mandatory.  Once you're set, all you need to do is to upload your video files on the web such as Youtube (www.youtube.com).

Now, let's start with the good stuff...

For the iOS devices (iPhone, iPod and iPad), you can capture the display easily if you have a Mac.  Just launch QuickTime, and from the File menu, record a new movie.  By default, the webcam will be selected.

Connect your iOS 8 device via the USB cable to your Mac OS X (Yosemite) and in the available sources, you should see your device listed.  

If you are running Windows, you'll need to use AirServer that acts as an AirPlay receiver.  This app also supports Mac OS X.  Launch AirServer then from your iOS device, mirror your display to your

Sunday, January 25, 2015

How to root Asus Memo FHD 10

If you have the Asus Memo FHD 10 tablet with the latest firmware 5.0.21.x, you may be looking on how to root your device.

I've recorded a short tutorial how to do it without a computer.


The video was recorded from the tablet itself using SCR Pro.

Be sure to look at the description of the video for the download link...


Wednesday, January 21, 2015

Plague, a new network

While reading my news, I've stumbled on a new app called Plague. No, this is not the game about viruses but a new social network where you can share posts like Twitter or Google+.


What's so great about it? Each post will be shared automatically to 4 other users near your area. If those users do like your post, they can share it to 4 others also...



The basic idea of Plague is creating viral post. The interface is simple and nice. You can see stats about your own posts, where they were seen and how far they have spread. From what I could understand, each post can survive 7 days.




You can get it on the Apple Store:
https://appsto.re/ca/sj4P3.i

Or on the Google Play Store:
https://play.google.com/store/apps/details?id=io.plague

Be viral, get Plague!

Patrick Balleux

Monday, January 19, 2015

Always the same chords...

If you're a musician, you probably already know that many songs often use the same chords.  This will lead to some tune sounding a lot like others.

Mathematically, it is expected.  With only 7 basic chords (C,D,E,F,G,A,B) to create a song, you will eventually reach all the possibilities even if you have variations, a different tempo and different words.

Almost all pop songs have a 4/4 tempo.  This will translate into 4 chords at most for each lyric sentence.  Of course you can have more or less but for a basic pop song, the number of chords for each sentence will vary between 1 and 4 chords.

Look around on the web for guitar chords and you'll be surprise how simple it is.  For each lyric sentence, with 4 chords, you get a possibility of 2401 variations.  But you can't just put random chords together to create a nice melody.  Realistically, you may end up will only a hundred variation if you feel adventurous.


Last weekend, I was learning "All About That Bass" from Meghan Trainor on my guitar.  Not really my kind of song but it's catchy and my daughters are crazy about it.  I usually play classic rock and blues.  Seeing me trying one of their favourite songs was a family event.  :)

As I was learning the tune, I was having a hard time singing as I was always confusing with "What's Up" by 4 Non Blondes.  Both songs do use the same basic chords (A, Bm, D/G).  When you listen to both of them, you can clearly hear that they sound alike, "What's Up" being a bit slower.

We finally decided to create a mashup of both songs, just for fun.


Next time you hear the new hit on the pop chart and have a feeling of "Deja Vu", you now know why!

Patrick

Saturday, January 17, 2015

Handling audio and video

As you know, I have been working on WebcamStudio and ScreenStudio in the last few years.  The main issue I faced while developing those projects was ensuring that audio and video would be synchronized.


You have to keep in mind that you are always limited by the power of the CPU.  A faster machine means that you will be able to capture larger displays and encode into a more compressed format.  Capturing a webcam at 320x240 is actually quite easy to do.  Capturing your whole desktop is another thing.  The video format is also putting a lot of stress on the CPU as you need to encode the video source (and audio) in realtime.

Assuming that the capture is done at 30 fps, you will have less than 33 milliseconds to capture one frame, apply any video effect on the image and encode it into the video stream.  I'm telling you, 33 milliseconds is really not a long time to do all this work.  For each frame, WebcamStudio has to:
  • Capture a single frame from all videos sources (Screen, webcam, image, etc...)
  • Apply effects on each frame
  • Merge all capture frames into a single frame by compositing each image one over the other in the proper order
  • Push the final output frame image to the encoder buffer
  • Encode the image frames from the buffer into the video file.
  • Synchronize captured audio with the video stream in the video file.
The same goes on with audio in WebcamStudio.  Frankly, a lot is happening in a 33 milliseconds timespan.



ScreenStudio has a simpler approach.  It relies on FFMPEG or AVCONV to execute the desktop capture into a video stream.  Where WebcamStudio is doing all the job, ScreenStudio is relying on FFMPEG/AVCONV to do that job.

The biggest issue when capturing audio and video is synchronizing them.  Look around the web, the issue of unsynchronized audio and video is everywhere.  Why is it so hard to do?

At the low level, when you capture a single image frame from a video source or a single audio frame from an audio source, a timestamp is set to the frame.  This timestamp (PTS: Presentation TimeStamp) is used to tell the encoder when to use this frame in the final video stream. The software executing the capture will rely on the driver used to set the proper timestamp on each frame.  Sadly, each driver (video or audio) will provide two kinds of value:
  • Zero based:  The first captured frame is 0, the second is 1, and so on...
  • Time based: Each captured frame is using the current clock time.
When using multiple capture sources (audio and video), it becomes harder to synchronize them is they are using different timestamp values.  So you might think that we just need to use a conversion to set every input stream to the same type of PTS...  Wrong!  Technically is would work in an ideal world but its not.

For example, when capturing images from a webcam, you are totally dependant on the webcam driver.  The first image provided by the driver can have the right timestamp if it's based on the clock time but by converting this timestamp to a Zero Based, you are loosing the exact time of that frame.  There is no way to know if the first image was captured by the webcam as of now, a few milliseconds ago or a whole second ago.  This is due to the fact that the driver is buffering a few frames before making them available to the capturing software.


Have you noticed that when displaying your webcam with any software (Cheese, PhotoBooth, etc...), there is a slight delay before seeing the first image?  In some case, you can even see a really small delay between what you are doing and what is actually displayed on your computer screen.  Just showing the webcam on the computer screen does not required a lot of processing power.  Capture the image and paint it on the screen.  Easy, right?



Just do this simple test:  Display your webcam on your screen, and count to 5 with your voice and fingers at the same time.  You will see a small delay between what you hear from your voice and what is displayed on your computer screen.  The difference for this live capture is always around 100 milliseconds.  It's not really big and it's almost unnoticeable but it can be a real pain when developing a software that will capture your computer screen, you webcam, the microphone in realtime.

To achieve a perfect synchronization when doing a realtime audio and video capture, many technics can be used.  And frankly, sometimes, it's almost impossible to do...

Hope you enjoyed!

Patrick





Tuesday, January 6, 2015

ScreenStudio is working on OS X!

For the last year, I've been working on a small project called ScreenStudio.  It lets you record your desktop to create your own screencast on a Ubuntu/Linux computer quite easily.

More than that, ScreenStudio is also able to stream your desktop directly to Ustream/Youtube/Twitch.tv/Hitbox over RTMP to share your gameplay with the world.

A new milestone has been reached this week as I found out that it was possible to port ScreenStudio over OS X for our Apple friends.  Yes, you read it right!  ScreenStudio does support OS X!  As of writing this post, a BETA version is available for you to try it out.


Expect a few bugs and a few issues.  But overall, it should work.  This video was entirely recorded on an old Macbook 2009 with ScreenStudio.  Just make sure that Java 8 is installed and follow the video instructions.

Have recording!

Patrick