Posts

Showing posts from January, 2018

How to run GUI applications with Docker on MacBook

For one of my recent projects where I am required to use Docker on Macbook, I had a hard time figuring out how to run GUI applications with Docker installed on Macbook. 1. Pull your docker image. 2. Install socat on macbook Steps to install socat is "brew install socat" Get Homebrew if you dont use it. 3. Run the following command in a terminal socat TCP-LISTEN:6000,reuseaddr,fork UNIX-CLIENT:\"$DISPLAY\" 4. Install XQuartz brew cask install xquartz open -a XQuartz 4. Find out the IP address you are connected to ipconfig getifaddr en0 5. Run your docker container using the following command docker run -it --rm -e DISPLAY=<ip address from previous command>:0 -v /tmp/.X11-unix:/tmp/.X11-unix <Your favoriet docker image> Another command for non Macbook systems like linux servers docker run -it --net=host --env="DISPLAY" --volume="$HOME/.Xauthority:/root/.Xauthority:rw"  <image name>...

Efficient ways to use Amazon AWS services.

Use a better compression program. sudo apt install pgiz tar -c --use-compress-program=pigz -f {TAR File name} [PATH to tar] Edit - I will keep this post updated as I begin to use more of the Amazon AWS services and discover faster ways to perform certain actions. 

How to get video or audio duration of a file using ffmpeg?

Today we will learn How to get the duration of a file using ffmpeg 1. Format Container Duration - [This works for both Video and Audio Files - better to report numbers using this command] ffprobe -v error -show_entries format=duration \ -of default=noprint_wrappers=1:nokey=1 input.mp4     2. Video Stream Duration - [This works only for Videos]   ffprobe -v error -select_streams v:0 -show_entries stream=duration \ -of default=noprint_wrappers=1:nokey=1 input.mp4     Content author - https://superuser.com/questions/650291/how-to-get-video-duration-in-seconds

iTunes hidden secret - Song Lovers

For all the song lovers out there using iTunes - there is a secret feature I want to share... Go to Internet Radio - Under Library section of Music. Top 40/Pop - Stream - 1. Top 40 Hits All Day. 2. GotRadio ^ Top 40   Who needs Subscription to Music service when ITunes is giving such an amazing song collection all day. To checkout more Music collection - Look at my playlists - 1. YouTube Version Hindi Songs - Best Collection English Songs - Best Collection 2. Spotify Same list - English Songs - Best Hindi Songs - Best