Sunday, 29 March 2015

How to quick split an .mp3 file using Linux

Sometimes you just need to split an .mp3 file and it is convenient to know how to do this under Linux. When you simply need to split (cut) an .mp3 file there is no need for advance editing and/or transcoding tools. 

Using my Kali distribution, I installed the mp3splt application.

$ apt-get install mp3splt

After that, everything was easy enough. Just run the following command. As you can see I wanted to split the file and get the chunk from the beginning (00.00.00) until the 3 minutes and 43 seconds (03.43) into the song. The original file was the live.mp3 and the new file to output is the live_new.mp3 but all that is straight forward to the trained eye. 

$ mp3splt live.mp3 00.00.00 03.43 -o live_new.mp3

Beat in mind that mp3splt is powerful tool and can do many things for you if you want to play around with mp3 files. Find out more at its on-line man page here.

If you want to play your .mp3 file from the command line one of the tools you can is mplayer. You can find a list of short-cuts this tool supports here.

How to quick split an .mp4 file using Linux

I recently wanted to split an .mp4 file in order to use it in one of my presentations. I used to have all the necessary software installed for editing and transcoding video files, but not any more. I was looking for an off-line, quick and reliable solution using only what I had in my disposal. 

Using my Kali distribution, I installed the ffmpeg package. 

apt-get install ffmpeg

After that, everything was easy. Lets assume the name of the video is CyberSecurity.mp4 and its length is 04 minutes and 37 seconds. Also, lets assume that you want the chunk of the video needs to start from the beginning until the 03 minutes and 18 seconds mark.

In order to split this video from the beginning (00:00:00) until the 03 minutes and 18 seconds mark (00:03:18), you will need to run the following command. 

ffmpeg -acodec copy -vcodec copy -ss 0 -t 00:03:18 -i CyberSecurity.mp4 CyberSecurity_new.mp4

Or, you can use the exact "start time" by specifying it: 

ffmpeg -acodec copy -vcodec copy -ss 00:01:00 -t 00:03:18 -i CyberSecurity.mp4 CyberSecurity_new.mp4

In case you need a script to automate the splitting of a video file in equal chunks, you may find this link very useful.

I hope this post was helpful to you as it was for me.

Sunday, 15 March 2015

Raspberry Pi 2 Model B and Kali Linux - quick setup

The new Raspberry Pi 2 Model B is approximately 6 times faster that its predecessor. It comes with:
  • QUAD Core Broadcom BCM2836 CPU
  • 1 GB RAM
  •  40 pin extended GPIO
  • Micro SD slot
  • 4x USB ports
  • HDMI
  • 4 pole Stereo output and Composite video port
  • CSI camera port & DSI display port
  • Micro USB power source
In order to install Kali Linux on the new Raspberry Pi you will need to download the new image for Raspberry Pi 2 (0.48G) version 1.1.0  from (filename: kali-1.1.0-rpi2.img.xz). 

Thursday, 12 March 2015

EU Data Protection Regulation

The globalisation of data and the enormous technological developments of the last decade raises a number of new challenges when it comes to data protection and privacy. Current privacy legislation has not yet caught up with the technology boom when it comes to personal data, and fails to consider aspects such as cloud storage and the wide spread use of social networks. This is set to change with the launch of the proposed EU Data Protection Regulation.