Archive for the ‘productivity’ Category
17
Jun
First, you need to follow installing these packages on your ubuntu machine. Mine was installed on Hardy, haven’t tested the command yet now that I have upgraded to Lucid.
ffmpeg -i "Output_Video_File.flv" -vcodec libx264 -b 512k -flags +loop+mv4 -cmp 256 -partitions +parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 -me_method hex -subq 7 -trellis 1 -refs 5 -bf 0 -flags2 +mixed_refs -coder 0 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -qmin 10 -qmax 51 -qdiff 4 "Output_Video_File.mp4"
This also works on .avi and .mpg as the source video.
Update: Howto link for Lucid
18
Jan
I noticed this when I uploaded an entire project files from dev server to production server. Using Web Developer plugin for Firefox, I had a clue to compare the Content-Type from the response header and the one I have in <meta> tags in my HTML.
1 2 3 4 5 6 7 8 9 10 11 12 | Date: Wed, 25 Nov 2009 01:32:28 GMT Server: Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.7 with Suhosin-Patch X-Powered-By: PHP/5.2.4-2ubuntu5.7 Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Content-Length: 6572 Keep-Alive: timeout=15, max=99 Connection: Keep-Alive Content-Type: text/html; charset=utf-8 200 OK |
And it was really it! Though they both have text/html, they had different character set values. Server responses with ISO-8859-1, but the <meta> instructs the browser to use utf-8, as it is declared in the document.
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
And so the second load of page occurs, its sort of trying to correct page encoding on the client-side. In the script I was working, I needed to pass some session values to the next page and clear it on page load, but when it reloads the second time, the session value had been emptied.
Hope it helps.
17
Dec
I’ve been looking on how to start a torrent session on another machine lately (on *nix flavor), and I thought there’s probably a command-line for it, and I was right. Since I can SSH thru in my Ubuntu machine at home, this sounds like a fit option.
The need arises when I’m in the office, working of course, and a movie title suddenly pops in my head and I get eager watching it. So I’d search for torrent for that movie with good remarks, at least watchable quality. Download it then SCP that to my machine at home and start session torrent on CLI. Takes at least a minute of my time to fire it up, but most importantly, it’s finished downloading when I get home. And watch on dinner I guess.
So, if you’re using Ubuntu, transmission is commonly installed there. But we need the transmission-cli package installed, which includes transmission-daemon and transmission-remote for starting CLI torrent session. First fire up the daemon, then use remote to add torrent file, like this one below
marvin@localhost:~/Desktop$ transmission-daemon marvin@localhost:~/Desktop$ transmission-remote -a Avatar-2009-TELESYNC-XviD-ORC.torrent
If it says The program 'transmission-daemon' is currently not installed, just type the suggested install command. It should be like this
marvin@localhost:~$ sudo apt-get install transmission-cli
Now, if you want to find out download stats just add the -l or --list like the one below, will list all torrents and status.
marvin@localhost:~/Desktop$ transmission-remote -l
Use transmission-remote --help for other options. You can set upload and download limits too.
Here are useful links:



Ok, this is actually the first post I did about 




