Monday, December 30, 2013

Sample usage of transcoding using vlc, then genisoimage and wodim to write a dvd

Today I needed to write a dvd with some old family videos in it. The videos were obtained from my Sony Handycam. They were .MPG files, but the problem was they were too large to fit in a dvd.

So, to reduce their size without changing the quality, I decided to transcode them using vlc. I had no idea how to do it. So I fired up vlc from a terminal and after exploring some menu items, I transcoded one of the files to .mp4. The size got reduced by more than half. Great! Now I had to find a corresponding command line form of the same action for automating it for transcoding all of the 36 files I had.

So, I looked at the terminal dump of whatever vlc had done so far, and then googled around a little, and came up with this solution (for my case):

for i in `seq -w 01 36`; do 
  cvlc ~/Videos/HomeVideos/2011.10.05/M2U000$i.MPG
       --sout '#transcode{
                  vcodec=h264,vb=0,scale=0,
                  acodec=mpga,ab=128,
                  channels=2,samplerate=44100
               }:std{access=file,mux=mp4,dst='./$i.mp4'}'
       vlc://quit;
done


(BTW, what I actually ran was the above code all in a single loong line. I just formatted the above code to look nice and be more understandable. I am not sure whether the code would work if formatted like above. Too lazy to try now.)

The vlc://quit was to make vlc quit after transcoding each file. Otherwise I had to press Ctrl-C after each file was transcoded.

Next I made an iso image out of the transcoded files with the genisoimage as follows:

genisoimage -o homevideos_2011.10.05.iso \
            -p "Santanu" -V "HomeVideos_2011.10.05" -publisher "Santanu" \
            ./converted/


Then I wrote the resulting iso file to a blank dvd using wodim as follows:

wodim -v -eject speed=4 dev=/dev/dvdrw driveropts=burnfree homevideos.iso 



Saturday, September 21, 2013

RIP 'q' Key :-(

Recently, my colleague's thinkpad's 'q' key died. I am now thinking of digging up old xmodmap manual to use an unused key for 'q'. In the meantime, I am using the following method to input the 'q' character in gnome-terminal, firefox, etc.:

Control+Shift+u, then the hex Unicode value for the 'q' character (71)

... time to find the xmodmap manual... wait, I think I made a post about this a few years ago

Sunday, September 8, 2013

Aircel related info for my future reference

A few days ago, I had accidentally activated some Aircel service related to SMS (the service is called WBSMS1, the 1 part at the end is probably because it has validity of one day). I don't know what that service was, nor do I care. Since then every day, the service got auto renewed (that makes me angry), costing me Re.1/-

Today, I finally got fed up with it and try to call customer care number 121. Somehow it seems that I cannot talk to an aircel person using this number. For that I would have to call 198. So I called the person at the other end let me know that I am supposed to give the USSD command *122*01# to deactivate the service.

Tried it and finally the service is deactivated.

I just wanted to note the process so that I may refer back to it later.

Monday, March 11, 2013

Non-Linux Tip

To know any VAS (Value Added Services) you have activated on your BSNL mobile, the USSD code to use is *456*00#
For Airtel, it is *121*5#