Recently I had to deal with an error during using Eclipse on my Ubuntu 13.10. When I clicked in Eclipse on any menu item there was nothing showed up. As far as I know this error is related with Unity graphical shell created for GNOME. One of the fix which I found is to run Eclipse with some extra additional parameters. I also created some shell script which will help to enjoy again a menu features in Eclipse.
#!/bin/bash # # Run Eclipse due to menu bug # eclipsepath="/home/user/Desktop/eclipse/eclipse" Exec=env UBUNTU_MENUPROXY=0 $eclipsepath
Of course in this script you must edit eclipsepath variable value to path which really guides to eclipse. You can run script in terminal using ./eclipse.sh, but before doing that you must give executable permission to script using this command chmod +x eclipse.sh.
Reference : [1] askubuntu.com Eclipse menus are cut off or dont show [2] stackoverflow.com Eclipse menus dont show up after upgrading to ubuntu 13.10 [3] Pastebin.com Source Code
In this post you can find a small piece of code which should allows you to make picture in picture using ffmpeg. More information about this effect you can find in reference section of this post.
ffmpeg -i \tmp\stream1.mp4 -r 29.97 -vf "movie=\tmp\stream2.mp4, scale=212:120 [vid2]; [in][vid2] overlay=main_w-overlay_w-10:10 [out]" \tmp\output.mp4 &
I used ampersand at the end of this command because I would like to create a new process of merging those two input videos files in background. I also uploaded below some example how it should looks like in final. I pointed using red circle the video which was added using stream2.mp4 source. Do not hesitate to modify this command above. I'm sure that you will adapt it for your own purposes.
![]() |
Picture in Picture using FFmpeg |
Reference : [1] Picture-in-picture Wikipedia
A few days ago I had a problem to adding new contact using Java of course to Jitsi SIP client. So, I would like to share with you with this small piece of code :
UtilActivator.getContactListService().createMetaContact(ProtocolProviderService, MetaContactGroup, UserID);
I figured out that adding contact can be executed only when your SIP account is Online (connected to server for instance FreeSWITCH). Thank you very much for your attention ;)
Reference: [1] Jitsi.org [2] jitsi-dev - Create new contact
I would like to present you some showcase of using PHP SDK to integrate with Facebook which was developed by Naitik Shah one of the Facebook employee. Appropriate reference to this very powerful SDK you can find in reference below.
So, I have created some small showcase which aims to show how to retrieve Facebook profile (not person, but some organisation or business) and print entries which was published on it's wall. Every entry is described by Name, Image (if was uploaded), Creation time, Title and Description as on screenshot below.
![]() |
FB Profile list of entries |
As you can see you can also set post range for FB Profile which posts are listed. Default FB Profile is set as 'Google'.
The project has been removed from github.
There is a also one additionally page which allows user to add and remove FB profiles. Once you are going to add new FB profile you should provide FB Profile name which should strictly defined it and FB Url name. You can get more information how to obtain this Url name through hovering the mouse over the words "(Show hint)". All FB profiles are stored in SQLite database. More information about it's structure you can find in fb_db.sql file.
![]() |
FB Profile Manager |
Reference: [1] PHP SDK for Facebook [2] CSS Globe - Easiest Tooltip and Image Preview Using jQuery
Let's assume that you use FFmpeg distribution in your application. One of your function is for instance saving some HLS stream (HTTP Live Streaming) into file. I suppose you are using python subprocess module to create process in Linux OS to obtain this stream to your hard disk.
In normal way if you would like to stop saving this content using FFmpeg on your storage, you will just press 'q' button while you are in terminal. Due to this FFmpeg will be able to finish saving content and do not damage the file at the end.
There is some kind of problem if you would like to kill this FFmpeg process in smooth way without damaging the file while you do not have access to the terminal.
You can use below solution written in Python to kill this FFmpeg process from your application. Only input which you need to ensure is PID (Process IDentifier) which describes your process. You can use below shell code in Linux :
ps -ef | grep ffmpeg | awk '{print $2}'
Once you know PID of your FFmpeg process just use this Python code :
import psutil import os import signal pids = psutil.get_pid_list() for pid in pids: if (pid == <your_PID>): os.kill(pid,signal.SIGINT)One thing is worthy of attention. You suppose to use mainly signal.SIGINT while you invoke os.kill function, because of it simulates in FFmpeg case the user interrupt of this process (typically initiated by pressing Control-C) which allow to FFmpeg to end his work properly.
Reference : [1] Python.org Subprocess Docs [2] Thelightfromtheblackhole.blogspot.com Sending sighup signal to some external [3] Unix signal - SIGINT
Have you ever thought how receive the bitrate of your video/audio file using ffmpeg in command line ? Before I will show you a solution of this problem I would like to paste below some example output of video file which can be obtained using ffmpeg :
ffmpeg version git-2013-10-30-94a80e3 Copyright (c) 2000-2013 the FFmpeg developers built on Oct 30 2013 15:46:23 with gcc 4.8 (Ubuntu/Linaro 4.8.1-10ubuntu8) configuration: --prefix=/home/user/ffmpeg_build --extra-cflags=-I/home/user/ffmpeg_build/include --extra-ldflags=-L/home/luszcwoj/ffmpeg_build/lib --bindir=/home/luszcwoj/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-x11grab libavutil 52. 48.100 / 52. 48.100 libavcodec 55. 39.100 / 55. 39.100 libavformat 55. 19.104 / 55. 19.104 libavdevice 55. 5.100 / 55. 5.100 libavfilter 3. 90.100 / 3. 90.100 libswscale 2. 5.101 / 2. 5.101 libswresample 0. 17.104 / 0. 17.104 libpostproc 52. 3.100 / 52. 3.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'aquarium.mp4': Metadata: major_brand : isom minor_version : 0 compatible_brands: isom3gp4 creation_time : 2013-09-08 23:38:41 Duration: 00:00:03.44, start: 0.000000, bitrate: 3933 kb/s Stream #0:0(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuvj420p(pc), 640x480 [SAR 1:1 DAR 4:3], 2250 kb/s, 29.70 fps, 29.67 tbr, 90k tbn, 30 tbc (default) Metadata: creation_time : 2013-09-08 23:38:41 handler_name : VideoHandle Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 123 kb/s (default) Metadata: creation_time : 2013-09-08 23:38:41 handler_name : SoundHandle
If you would like to get the bitrate just use this command :
ffmpeg -i aquarium.mp4 2>&1 | grep bitrate: | awk '{print $6}'
Reference : [1] FFmpeg Home Page