Saturday, 7 March 2015

How to rotate a video file?


You may have done this

$ ffmpeg -vfilter "rotate=90" -i input.mp4 output.mp4

but you would have

unrecognized option 'vfilters'.
Error splitting the argument list: Option not found

So you should run:

$ ffmpeg -i input.mp4 -vf "transpose=1" output.mp4

then input.mp4 will be rotated at 90 degrees to output.mp4.

TweetDeck > HootSuite

If you manage multiple accounts, the web app is better than the desktop one owing to its process burden.
I thought HootSuite was the best service for Twitter which can manage multiple accounts (on the web).

Here are HootSuite and TweetDeck as web apps for Twitter.
  • HootSuite for free subscription is limited to 4 accounts managed.
  • TweetDeck is however free to use totally.

Why not use TweetDeck?
It seems to have to have more improvement but if it improves continuously then it's the best for your personal use.

Wednesday, 18 February 2015

Mac Shortcuts to input Alphabets with Accents or Symbols

MacOS-Accents-CheetSheet

Mac OS Cheat Sheet: How to Input Accents and Symobols

Here is how to input accents and symbols with keys on Mac.
You can try to type on the form on the right of each row.

Mac Key Legend

symbol name
Command key
Control Key
Option Key
Shift Key
Caps Key
fn Function Key

Accents (Diacritic)

name example keyboard keys here to practice
cédille ç any ⌥ + c
capital cédille Ç any ⌥ + ⇧ + c
acute (accent aigu) é á any ⌥ + e, an alphabet
grave (accent grave) è à Japanese, etc. ⌥ + _, an alphabet
English ⌥ + `, an alphabet
circumflex ê î any ⌥ + i, an alphabet
Umlaut ä ü any ⌥ + u, an alphabet
tilde ñ any ⌥ + n, an alphabet

Symbols

name symbol keyboard keys here to practice
Yen ¥ Japanese ¥
Yen ¥ English ⌥ + y
back slash \ Japanese ⌥ + ¥
leader any ⌥ + ;
guillemet start « Japanese ⌥ + ]
English ⌥ + \
guillemet close » Japanese ⌥ + ⇧ + ]
English ⌥ + \
bullet any ⌥ + 8
degree ° any ⌥ + ⇧ + 8
Eszett ß any ⌥ + s
euro any ⌥ + ⇧ + 2
apple any ⌥ + ⇧ + k
delta any ⌥ + j
function ƒ any ⌥ + f
phi ø any ⌥ + o
capital phi Ø any ⌥ + o

Friday, 6 February 2015

Cheat Sheet as Presentor on MacOS

MacOSCheetSheet

Mac OS Cheat Sheet as Presenter

This is for presentation.

Mac Key Legend

symbol name
Command key
Control Key
Option Key
Shift Key
Caps Key
fn Function Key

Mac OS

Display

keys action
fn ⌘ F1 Mirror (Duplicate) the current desktop to the projector.
⌘ ⌥ D Hide/show the Dock.

Chrome

Display

keys action
⌃ ⌘ F Switches to the full screen.
⇧ ⌘ F Switches to the presentation mode.

Tabs

keys action
⌘ ⌥ → Switches to the next tab.
⌘ ⌥ ← Switches to the previous tab.

Bookmark

keys action
⌥ ⌘ B Open Bookmark Manager.

Sunday, 14 December 2014

Theremin on Processing

Theremin on Processing in progress?


Introduction

While thinking of what I can do with Processing, I stuck on, "Can I play Theremin with the camera built in the Mac?"

I'm afraid if someone has done already and there is :0
I found however it's too small to control and doesn't work well for music (can't make pitch staircase) so I decided to create my own one.

I thought up several implementations for that, but I had meager time and wanted to make with as much vanilla Processing as possible.

Thus my app will be kind of a mashup.


Development Details

From sound libraries
  • minim (sound library for Processing)
  • sound (in vanilla Processing)
I have chosen "sound" due to no need of more functionality.

From video libraries
  • video (in vallina Processing)
  • OpenCV
  • BoofCV (CV library on Java)
I have chosen "BoofCV" because video has no tracking feature and OpenCV couldn't be smoothly installed into my Mac...


Well, this is the screen:



Artifacts

Here is the repository.
GitHub - Theremin on Processing

You can download the application from here:
GitHub - Theremin on Processing - release page

The resolution of the camera is now fit to FaceTime HD (1280x720) in my Mac. Sorry for now if your camera doesn't match...

The usage is written on the project page above.

I did check if I can play a melody :)

Conclusion

During the creation what I felt is this has problems in its accuracy for real performance. Infrared camera devices (e.g. Kinect, Leap Motion) are better for control but here I did without special devices.

This article and artifacts are work in progress after Boulez.

Playing Videos

To prove this Theremin on Processing can play music, I asked my friend, Neko Piano to play with it :)

Here are playing videos.

Checking its control and trying to sing a scale:

Singing "When You Wish Upon a Star":

Neko Piano played a Theremin-like instrument for the first time... so with some wrong pitches.
It's proven however this is a musical instrument! :)
For that matter I couldn't find any videos to play music with Theremin-like digital instrument, you're blindly concerning in technologies, are't you? :)

Sunday, 12 October 2014

How to Crop Tabs in Chrome

Did you want to crop tabs in your window in Chrome?
For example you did open lots of tabs but they are not related to other tabs then you may want to separate them.

One solution is to use the extension Tab Scissors:

This enables you cut tabs in one window off into two windows.


But my super recommendation is just to drag tabs in the window.
  1. Select several tabs to crop.
    1. Click the one tab.
    2. Click the other tab in the other side with shift key.
  2. Drag those selected tabs
  3. You get another window with selected tabs.

Like


Enjoy it :)

Wednesday, 16 July 2014

git svn with svn branches

How can you use git svn and branches on Subversion server?

It’s not quite easy yet and if you never use it it’s fear for you.
You can practice it in your local and you need to follow these procedures.

Practice for git svn with branches on local

You want to practice it on your local, don’t you?

Create local svn repository and clone it.

Environments

  • Windows
  • TortoiseSVN
  • Git Extensions

You could follow these steps with other OSes.

First of all you may try to clone a svn repository you created in your local.

$ git svn clone /c/Repos/GitPractices/centralsvn . --stdlayout

but you will fail with it.

Initialized empty Git repository in C:/Repos/GitPractices/localgitsvn-a/.git/
E: 'trunk' is not a complete URL  and a separate URL is not specified

In order to evade it, you need to do the following steps

  1. create svn repository

  2. run svnserve

For Windows you need to run commands in bash, e.g. MINGW32 in Git Extensions.

Don’t use this command:

✘ $ svnserve -d -R --root ./

which runs as read only.

Use

$ svnserve -d --root ./

or

$ svnserve -d -r ./

And leave that console open.

  1. svn clone
$ git svn clone --prefix svn/ -s svn://localhost/ ./

or

$ git svn clone -s svn://localhost/ ./

then you will be able to clone it to your local.

And when you try to dcommit, you will fail with an auth error:

$ git svn branch branchb -m "Created Branch B"
Copying svn://localhost/trunk at r2 to svn://localhost/branches/branchb...
Authorization failed: Authorization failed at C:\Program Files (x86)\Git/libexec
/git-core\git-svn line 1183

$ git svn dcommit
Committing to svn://localhost/trunk ...

ERROR from SVN:
Authorization failed: Authorization failed
W: d24d77abd34ffddfed52dd4f741be8373f8cd839 and refs/remotes/svn/trunk differ, u
sing rebase:
:040000 000000 2e3c39bdb69f2b4e2f339ff28ec1878897693d05 000000000000000000000000
0000000000000000 D      testa
Current branch master is up to date.
ERROR: Not all changes have been committed into SVN, however the committed
ones (if any) seem to be successfully integrated into the working tree.
Please see the above messages for details.

anno-access = write

Because svnserve runs still as read only for an anonymous user.
In order to evade this, you need to add “anon-access = write” into the conf/svnserve.conf file in the SVN repository, e.g.
C:\Repos\GitPractices\centralsvn\conf\svnserve.conf

[general]
anno-access = write

Create SVN branch

Prerequisite: you have SVN repository already like explained above.

Unless you create a SVN branch then you will just dcommit to trunk.
Use git svn branch.

$ git svn branch -m "created Branch B" branchb
Copying svn://localhost/trunk at r4 to svn://localhost/branches/branchb...
Found possible branch point: svn://localhost/trunk => svn://localhost/branches/b
ranchb, 4
Found branch parent: (refs/remotes/svn/branchb) 8a0afc7055ddf7b438b22c1bd4aca5a0
c45c0e9a
Following parent with do_switch
Successfully followed parent
r5 = 6dace9fa756cf8ea2320d968707ebce50c0bc35d (refs/remotes/svn/branchb)

In case that you’ve created a local Git branch already,
you have to also create SVN branch firstly to dcommit.

Check a svn branch out

Let’s say you have a branch, branchsvn in SVN.

git svn fetch
git checkout -b branchsvn

Then you have branchsvn in your local and switch to it.

FYI

git checkout -b <branch name>

equals

git branch <branch name>
git checkout <branch name>

Conclusions

  1. Prepare SVN server to practice
    1. Use svnserve
$ svnserve -d -r ./
  1. Make branches synchronized between local Git repository and SVN repository.
    1. Create SVN branch
      Let’s say you want to have branchb synched with SVN repository.
      Create a SVN repository even if you created the git repository in your local.
      You can skip this if SVN repository already has a branch.
$ git svn branch branchb -m "This is a commit message for new branchb."
1. Check the SVN branch out
git svn fetch
git checkout -b branchb

If you have already a git branch in your local to commit to SVN,
run checkout without -b and rebase SVN remote branch.

git svn fetch
git rebase remotes/branchb
git svn dcommit

So you can dcommit as usual.

A shortcut to create synced branches if you don’t have any branch yet.

$ git checkout -b branchb remotes/branchb

How to synchronize between Git branches and SVN ones.

SVN branch exists. SVN branch doesn’t exist.
Git branch exists. A B
Git branch doesn’t exist. C B or C

Assuming you want to synchronize the branch branchb between Git and SVN,
find your alphabet in the table above and follow the corresponding commands below.

  • A (Git + SVN branches exist)

rebase branchb on SVN

$ git svn fetch
$ git rebase remotes/branchb
  • B (Git branch exists or nothing)

svn branch/rebase branchb

$ git svn branch branchb -m "Created Branch B"
$ git rebase remotes/branchb
  • C (SVN branch exists or nothing)

checkout -b

$ git checkout -b branchb remotes/branchb