<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Felipe Barriga Richards &#187; Linux</title>
	<atom:link href="http://blog.felipebarriga.cl/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.felipebarriga.cl</link>
	<description>Blog personal de Felipe Barriga Richards</description>
	<lastBuildDate>Thu, 29 Dec 2011 17:15:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Using 32LW5700 TV with Linux (1080p)</title>
		<link>http://blog.felipebarriga.cl/linux/using-32lw5700-tv-with-linux-1080p/</link>
		<comments>http://blog.felipebarriga.cl/linux/using-32lw5700-tv-with-linux-1080p/#comments</comments>
		<pubDate>Sun, 03 Jul 2011 18:31:51 +0000</pubDate>
		<dc:creator>fbarriga</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[1080p]]></category>
		<category><![CDATA[32LW5700]]></category>
		<category><![CDATA[TV]]></category>

		<guid isPermaLink="false">http://blog.felipebarriga.cl/?p=725</guid>
		<description><![CDATA[After receiving my new LG 3D TV (32LW5700) I try to connect it to my &#8216;old&#8217; notebook (Inspiron 6400 with an ATI radeon X1400) using a VGA cable getting only 1280&#215;800). This also may be applied to 42LW5700, 47LW5700, 47LW9500 and 55LW9500 models. After trying to get a modeline using cvt: felipe@funstation $ cvt 1920 [...]]]></description>
			<content:encoded><![CDATA[<p>After receiving my new LG 3D TV (32LW5700) I try to connect it to my &#8216;old&#8217; notebook (Inspiron 6400 with an ATI radeon X1400) using a VGA cable getting only 1280&#215;800). This also may be applied to 42LW5700, 47LW5700, 47LW9500 and 55LW9500 models.<br />
<span id="more-725"></span><br />
After trying to get a modeline using <strong>cvt</strong>:</p>

<div class="wp-terminal"><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> cvt 1920 1080 60<br/># 1920x1080 59.96 Hz (CVT 2.07M9) hsync: 67.16 kHz; pclk: 173.00 MHz<br/>Modeline "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync<br/><br/></div>

<p>Then add the modeline to Xorg with xrandr:</p>

<div class="wp-terminal"><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> xrandr --newmode "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync<br/></div>

<p>And activate it:</p>

<div class="wp-terminal"><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> xrandr --addmode VGA-0 1920x1080_60.00<br/></div>


<div class="wp-terminal"><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> xrandr --output VGA-0 --mode 1920x1080_60.00 --below LVDS --right-of LVDS<br/></div>

<p>And only I got an <strong>Invalid Format</strong> on my TV.</p>
<p>Then searching on the Owner&#8217;s Manual included in the cdrom (<a href="/downloads/32LW5700/eng.pdf">English version</a> and <a href="/downloads/32LW5700/esp.pdf">Spanish version</a>) distributed with the TV (the printed manual sucks!) I figure out that the vertical frequency was 59.934. I try with this new settings and I still got the same message.</p>
<p>Then I found <a href="http://gtf.sourceforge.net/">GTF</a> and using this program I finally found the right configuration:</p>

<div class="wp-terminal"><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> gtf 1920 1080 59.934 -x<br/><br/># 1920x1080 @ 59.93 Hz (GTF) hsync: 67.01 kHz; pclk: 172.61 MHz<br/>Modeline "1920x1080_59.93"  172.61  1920 2040 2248 2576  1080 1081 1084 1118  -HSync +Vsync<br/><br/></div>


<div class="wp-terminal"><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> xrandr --newmode "1920x1080_59.93"  172.61  1920 2040 2248 2576  1080 1081 1084 1118  -HSync +Vsync<br/></div>


<div class="wp-terminal"><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> xrandr --addmode VGA-0 1920x1080_59.93<br/></div>


<div class="wp-terminal"><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> xrandr xrandr --output VGA-0 --mode 1920x1080_59.93 --below LVDS --right-of LVDS<br/></div>

<p>After this I was able to get 1920&#215;1080 on the TV. </p>
<p>If you want to make it persistent try adding the commands on your <strong>~/.xprofile</strong></p>
<p>Now the next problem is to enable the 3D feature when using a VGA cable.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.felipebarriga.cl/linux/using-32lw5700-tv-with-linux-1080p/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>i8krellm patch (to fix segfault) (gkrellm plugin)</title>
		<link>http://blog.felipebarriga.cl/linux/i8krellm-patch-to-fix-segfault-gkrellm-plugin/</link>
		<comments>http://blog.felipebarriga.cl/linux/i8krellm-patch-to-fix-segfault-gkrellm-plugin/#comments</comments>
		<pubDate>Sun, 19 Jun 2011 15:46:14 +0000</pubDate>
		<dc:creator>fbarriga</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programacion]]></category>
		<category><![CDATA[gkrellm]]></category>
		<category><![CDATA[i8krellm]]></category>
		<category><![CDATA[i8kutils]]></category>
		<category><![CDATA[patch]]></category>

		<guid isPermaLink="false">http://blog.felipebarriga.cl/?p=717</guid>
		<description><![CDATA[After trying to contact the developer of i8krellm without success I&#8217;ve decided to post here an small patch to avoid a segfault of this plugin. i8krellm is a plugin for gkrellm to control fans on DELL notebooks via i8kutils. Files: i8krellm-segfault.patch.bz2 i8krellm-segfault.patch.gz i8krellm-2.5.tar.gz i8kutils_1.25.tar.gz Patch: diff -rupN i8krellm-2.5/i8krellm.c ../i8krellm-2.5//i8krellm.c --- i8krellm-2.5/i8krellm.c 2003-09-21 15:57:08.000000000 -0400 +++ [...]]]></description>
			<content:encoded><![CDATA[<p>After trying to contact the developer of <a href="http://www.coding-zone.com/?page=i8krellm">i8krellm</a> without success I&#8217;ve decided to post here an small patch to avoid a segfault of this plugin. i8krellm is a plugin for <a href="http://members.dslextreme.com/users/billw/gkrellm/gkrellm.html">gkrellm</a> to control fans on DELL notebooks via i8kutils.</p>
<p><strong>Files:</strong></p>
<ul>
<li><a href="/downloads/i8krellm-segfault.patch.bz2">i8krellm-segfault.patch.bz2</a></li>
<li><a href="/downloads/i8krellm-segfault.patch.gz">i8krellm-segfault.patch.gz</a></li>
<li><a href="/downloads/i8krellm-2.5.tar.gz">i8krellm-2.5.tar.gz</a></li>
<li><a href="http://distfiles.gentoo.org/distfiles/i8kutils_1.25.tar.gz">i8kutils_1.25.tar.gz</a></li>
</ul>
<p><span id="more-717"></span><br />
<code><br />
<strong>Patch:</strong><br />
diff -rupN i8krellm-2.5/i8krellm.c ../i8krellm-2.5//i8krellm.c<br />
--- i8krellm-2.5/i8krellm.c	2003-09-21 15:57:08.000000000 -0400<br />
+++ ../i8krellm-2.5//i8krellm.c	2011-06-19 11:28:24.005620314 -0400<br />
@@ -328,9 +328,8 @@ static struct _i8krellm_state _i8k_state</p>
<p> static void __i8k_draw_chart(void) {<br />
-	static gchar temp[12];<br />
-<br />
-	memset(temp,0,12);<br />
+	static gchar temp[12+2];<br />
+	memset(temp,0,12+2);<br />
 	strcpy(temp,"\\t");<br />
 	strcat(temp,&#038;_i8k_state.temp_disp[0]);<br />
 	gkrellm_draw_chartdata(_i8k_chart);<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.felipebarriga.cl/linux/i8krellm-patch-to-fix-segfault-gkrellm-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SmartQ V7 Linux under QEMU</title>
		<link>http://blog.felipebarriga.cl/linux/smartq-v7-linux-under-qemu/</link>
		<comments>http://blog.felipebarriga.cl/linux/smartq-v7-linux-under-qemu/#comments</comments>
		<pubDate>Wed, 29 Dec 2010 19:45:36 +0000</pubDate>
		<dc:creator>fbarriga</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[SmartQ]]></category>
		<category><![CDATA[nxPADD]]></category>
		<category><![CDATA[QEMU]]></category>
		<category><![CDATA[smartq]]></category>

		<guid isPermaLink="false">http://blog.felipebarriga.cl/?p=702</guid>
		<description><![CDATA[This mini howto should work with another versions of SmartQ. It only run with some limited features (no X environment, only with nxPADD firmware and it extremly slow). You can get the nxPADD firmware in this post. You need to have a working QEMU installation with arm support. You also need this kernel (if you [...]]]></description>
			<content:encoded><![CDATA[<p>This mini howto should work with another versions of <a href="/tag/smartq/">SmartQ</a>. It only run with some limited features (no X environment, only with <a href="/tag/nxpadd/">nxPADD</a> firmware and it extremly slow). You can get the nxPADD firmware in <a href="/linux/smartq-v7-custom-linux/">this post</a>.</p>
<p>You need to have a working <a href="/tag/qemu/">QEMU</a> installation with arm support. You also need <a href="/downloads/smartq/vmlinuz.bz2">this kernel</a> (if you have another working kernel put the link as a comment).</p>
<p><span id="more-702"></span><br />
<u><strong>Create System Image</strong></u></p>

<div class="wp-terminal"><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> dd if=/dev/zero of=rootfs-new.raw bs=1024 count=2048000<br/><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> mkfs.ext3 -F -L smartq rootfs-new.raw<br/><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> sudo mount -o loop rootfs-new.raw /mnt/temp<br/></div>

<p><u><strong>Copy Filesystem</strong></u></p>

<div class="wp-terminal"><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> sudo cp -a extracted/rootfs/* /mnt/temp/<br/><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> sudo cp -a extracted/homefs/user /mnt/temp/home/<br/></div>

<p><u><strong>Edit fstab</strong></u></p>

<div class="wp-terminal"><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> sudo nano /mnt/temp/etc/fstab<br/></div>

<p>The file must look like this:</p>
<pre>
#/dev/ndda1     /               ext3    noatime         0       1
#/dev/ndda2     /home           ext3    noatime         0       2
/dev/sda        /               ext3    noatime         0       0
</pre>
<p><u><strong>umount image</strong></u></p>

<div class="wp-terminal"><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> sudo umount /mnt/temp<br/></div>

<p><u><strong>Run Virtual Machine</strong></u></p>

<div class="wp-terminal"><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> qemu-system-arm -M versatilepb -cpu cortex-a8 -kernel vmlinuz -hda rootfs-new.raw -m 256 -show-cursor -serial vc -append "root=/dev/sda mem=256M rootwait rw"<br/></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.felipebarriga.cl/linux/smartq-v7-linux-under-qemu/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SmartQ V7 Custom Linux</title>
		<link>http://blog.felipebarriga.cl/linux/smartq-v7-custom-linux/</link>
		<comments>http://blog.felipebarriga.cl/linux/smartq-v7-custom-linux/#comments</comments>
		<pubDate>Wed, 29 Dec 2010 19:01:09 +0000</pubDate>
		<dc:creator>fbarriga</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[SmartQ]]></category>
		<category><![CDATA[nxPADD]]></category>
		<category><![CDATA[smartq]]></category>

		<guid isPermaLink="false">http://blog.felipebarriga.cl/?p=684</guid>
		<description><![CDATA[Here is a small How To customize Linux on SmartQ V5/V7. If you need more information you can look here: http://www.smartqmid.com/wiki/index.php?title=V5/V7_Linux_Development_Guide Downloads FW Utils fw-utils.tar.bz2 Official Linux 5.5 Firmware http://d.smartdevices.com.cn/files/SmartQV7-Linux-V5.5updated.rar SmartQV7-Linux-V5.5updated.rar Custom Linux Firmware: nxPADD http://www.smartqmid.com/phpBB3/viewtopic.php?f=36&#038;t=1792&#038;start=260 SmartQ V5 SmartQ V5 old bootloader SmartQ V7 SmartQ V7 old bootloader Extract The Firmware felipe@funstation $ cd ~/smartqfelipe@funstation [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a small How To customize Linux on <a href="/tag/smartq/">SmartQ</a> V5/V7.<br />
If you need more information you can look here: <a href="http://www.smartqmid.com/wiki/index.php?title=V5/V7_Linux_Development_Guide">http://www.smartqmid.com/wiki/index.php?title=V5/V7_Linux_Development_Guide</a></p>
<p><span id="more-684"></span><br />
<u><strong>Downloads</strong></u></p>
<p><strong>FW Utils</strong></p>
<ul>
<li><a href="/downloads/smartq/fw-utils.tar.bz2">fw-utils.tar.bz2</a></li>
</ul>
<p><strong>Official Linux 5.5 Firmware</strong></p>
<ul>
<li><a href="http://d.smartdevices.com.cn/files/SmartQV7-Linux-V5.5updated.rar">http://d.smartdevices.com.cn/files/SmartQV7-Linux-V5.5updated.rar</a></li>
<li> <a href="/downloads/smartq/SmartQV7-Linux-V5.5updated.rar">SmartQV7-Linux-V5.5updated.rar</a></li>
</ul>
<p><strong>Custom Linux Firmware: <a href="/tag/nxpadd/">nxPADD</a></strong></p>
<ul>
<li><a href="http://www.smartqmid.com/phpBB3/viewtopic.php?f=36&#038;t=1792&#038;start=260">http://www.smartqmid.com/phpBB3/viewtopic.php?f=36&#038;t=1792&#038;start=260</a></li>
<li> <a href="/downloads/smartq/SmartQV7.nxPADD.20101003-1147EDT.zip">SmartQ V5</a></li>
<li> <a href="/downloads/smartq/SmartQV5.nxPADD.20101003-1147EDT.oldbootloader.zip">SmartQ V5 old bootloader</a></li>
<li> <a href="/downloads/smartq/SmartQV7.nxPADD.20101003-1147EDT.zip">SmartQ V7</a></li>
<li> <a href="/downloads/smartq/SmartQV7.nxPADD.20101003-1147EDT.oldbootloader.zip">SmartQ V7 old bootloader</a></li>
</ul>
<p><u><strong>Extract The Firmware</strong></u></p>

<div class="wp-terminal"><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> cd ~/smartq<br/><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> tar xvfj fw-utils.tar.bz2<br/><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> cd fw-utils<br/><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> ./uncompress ../SmartQV7<br/><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> cd ..<br/><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> mkdir extracted<br/><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> cd extracted<br/><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> mv /tmp/tcboot  /tmp/rootfs.tgz  /tmp/homefs.tgz /tmp/linux.rom .<br/></div>

<p><u><strong>Generate new Firmware</strong></u></p>

<div class="wp-terminal"><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> cd ~/smartq/extracted<br/><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> ../fw-utils/compress.v tcboot linux.rom rootfs.tgz homefs.tgz 0<br/><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> mv SmartQV5 SmartQV7<br/><br/></div>

<p><u><strong>Uncompress Filesystem</strong></u></p>

<div class="wp-terminal"><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> cd ~/smartq/extracted<br/><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> mkdir rootfs<br/><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> cd rootfs<br/><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> sudo tar zxvfp ../rootfs.tgz<br/><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> cd ..<br/><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> mkdir homefs<br/><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> cd homefs<br/><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> sudo tar zxvfp ../homefs.tgz<br/><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> cd ..<br/></div>

<p><u><strong>Compress Filesystem</strong></u></p>

<div class="wp-terminal"><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> cd ~/smartq/extracted/rootfs<br/><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> sudo tar cspvzf ../new-rootfs.tgz ./*<br/><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> cd ~/smartq/extracted/homefs<br/><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> sudo tar cspvzf ../new-homefs.tgz ./*<br/></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.felipebarriga.cl/linux/smartq-v7-custom-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>gnome-power-statistics history file</title>
		<link>http://blog.felipebarriga.cl/linux/gnome-power-statistics-history-file/</link>
		<comments>http://blog.felipebarriga.cl/linux/gnome-power-statistics-history-file/#comments</comments>
		<pubDate>Sat, 25 Dec 2010 18:13:44 +0000</pubDate>
		<dc:creator>fbarriga</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[devicekit]]></category>
		<category><![CDATA[gnome power statistics]]></category>

		<guid isPermaLink="false">http://blog.felipebarriga.cl/?p=677</guid>
		<description><![CDATA[The Gnome Power Statistics (an applet for Gnome Panel) show chart (with limited options) of the battery charge (10 minutes, 2 hours, 1 day, 1 week) without the possibility to select an arbitrary interval. After been reading the source code of this applet I&#8217;ve found that it get the data from DeviceKit (Devkit). Once again [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://library.gnome.org/users/gnome-power-manager/2.91/statistics.html.en_GB">Gnome Power Statistics</a> (an applet for <a href="http://live.gnome.org/GnomePanel">Gnome Panel</a>) show chart (with limited options) of the battery charge (10 minutes, 2 hours, 1 day, 1 week) without the possibility to select an arbitrary interval.<br />
After been reading the source code of this applet I&#8217;ve found that it get the data from <a href="http://fedoraproject.org/wiki/Features/DeviceKit">DeviceKit</a> (Devkit). Once again I check the source code of Devkit and I found that the data is stored in: <strong>/var/lib/upower/</strong>  (on <a href="http://www.gentoo.org">Gentoo</a>).<br />
So now you can plot this data with another tool (<a href="http://www.openoffice.org">OpenOffice</a> do the trick easily).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.felipebarriga.cl/linux/gnome-power-statistics-history-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VOD (Video on Demand) de TVN &#8211; Bajar Teleseries</title>
		<link>http://blog.felipebarriga.cl/linux/vod-video-on-demand-de-tvn-bajar-teleseries/</link>
		<comments>http://blog.felipebarriga.cl/linux/vod-video-on-demand-de-tvn-bajar-teleseries/#comments</comments>
		<pubDate>Wed, 22 Sep 2010 05:34:01 +0000</pubDate>
		<dc:creator>fbarriga</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[flvstreamer]]></category>
		<category><![CDATA[mplayer]]></category>
		<category><![CDATA[rtmp]]></category>
		<category><![CDATA[rtmpdump]]></category>
		<category><![CDATA[TV]]></category>
		<category><![CDATA[vod]]></category>
		<category><![CDATA[wireshark]]></category>

		<guid isPermaLink="false">http://blog.felipebarriga.cl/?p=548</guid>
		<description><![CDATA[Después de llegar tarde a ver un capítulo de 40 y Tantos esperé a que lo subieran para verlo entero. Cuento corto, apenas lo subieron trate de verlo pero andaba super cortado y no hay opciones para configurar el buffer. Revisando lo que postie hace un tiempo, decidí utilizar nuevamente rtmpdump y funcionó bastante bien. [...]]]></description>
			<content:encoded><![CDATA[<p>Después de llegar tarde a ver un capítulo de <em><a href="http://teleseries.tvn.cl/40ytantos/">40 y Tantos</a></em> esperé a que lo subieran para verlo entero. Cuento corto, apenas lo subieron trate de verlo pero andaba super cortado y no hay opciones para configurar el buffer.</p>
<p>Revisando <a href="http://blog.felipebarriga.cl/linux/tv-chilena-online-para-linux/">lo que postie hace un tiempo</a>, decidí utilizar nuevamente <a href="http://rtmpdump.mplayerhq.hu/">rtmpdump</a> y funcionó bastante bien. Por el momento es necesario bajar el video y luego verlo (no probé mucho, pero parece que no le gusta mandar por pipe un stream que por defecto no es <em>&#8216;live&#8217;</em>).</p>
<p>Para algunos que me preguntaron como hacer que esto funcione en otros lados, adjunto unos screenshots didácticos que muestran en que hay que fijarse al utilizar <a href="http://www.wireshark.org/">wireshark</a>.<br />
<span id="more-548"></span><br />
<strong>Ver señal en vivo:</strong></p>
<p><a href="http://blog.felipebarriga.cl/wp-content/uploads/2010/09/rtmp-envivo-tvn-highlights.png" rel="lightbox[548]"><img src="http://blog.felipebarriga.cl/wp-content/uploads/2010/09/rtmp-envivo-tvn-highlights-300x160.png" alt="RTMP packet on Wireshark" title="Señal En Vivo de TVN" width="300" height="160" class="aligncenter size-medium wp-image-549" /></a></p>

<div class="wp-terminal"><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> rtmpdump --pageUrl "http://www.tvn.cl/servicios/senal/2010/index.html" --swfUrl "http://www.tvn.cl/include/mediaplayer/player.swf" --rtmp "rtmp://190.196.11.201/envivo" --playpath "tvchile_s" --live --flv - | mplayer -<br/></div>

<p><br/><br/><br/><br/></p>
<p><strong>Bajar Publicidad de Loncoleche:</strong></p>
<p><a href="http://blog.felipebarriga.cl/wp-content/uploads/2010/09/rtmp-propaganda-tvn-highlights.png" rel="lightbox[548]"><img src="http://blog.felipebarriga.cl/wp-content/uploads/2010/09/rtmp-propaganda-tvn-highlights-300x164.png" alt="" title="RTMP Packet on Wireshark" width="300" height="164" class="aligncenter size-medium wp-image-550" /></a></p>

<div class="wp-terminal"><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> rtmpdump --pageUrl "http://tvn.cl/teleseries/40ytantos/2010/" --swfUrl "http://tvn.cl/include/flowplayer/flowplayer.rtmp-3.1.3.swf" --rtmp "rtmp://flv.tvn.cl/vod" --playpath "_portada/videos/loncoleche" --flv loncoleche.flv<br/></div>

<p><br/><br/><br/><br/></p>
<p><strong>Bajar Capitulo de <em>40 y Tantos</em>:</strong></p>
<p><a href="http://blog.felipebarriga.cl/wp-content/uploads/2010/09/rtmp-video-on-demand-tvn-highlights.png" rel="lightbox[548]"><img src="http://blog.felipebarriga.cl/wp-content/uploads/2010/09/rtmp-video-on-demand-tvn-highlights-300x155.png" alt="" title="RTMP Packet on Wireshark" width="300" height="155" class="aligncenter size-medium wp-image-551" /></a></p>

<div class="wp-terminal"><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> rtmpdump --pageUrl "http://tvn.cl/teleseries/40ytantos/2010/" --swfUrl "http://tvn.cl/include/flowplayer/flowplayer.rtmp-3.1.3.swf" --rtmp "rtmp://flv.tvn.cl/vod" --playpath "/teleseries/40ytantos/2010/videos/40ytantos_210910_cap39" --flv 40ytantos_210910_cap39.flv<br/></div>

<p><strong><font color="red">2010-03-07 Update: Ultimo capitulo de La Familia de al Lado</font></strong><br />
En TVN se equivocaron y subieron el ultimo capitulo de <em>La Familia de al Lado</em> (capitulo 125) en el dia Viernes 7 de Marzo cuando el dia que correspondia era el Lunes 7 de Mazo.<br />
Si quieren bajarlo:</p>

<div class="wp-terminal"><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> rtmpdump --pageUrl "http://tvn.cl/teleseries/lafamiliadeallado/2010/" --swfUrl "http://tvn.cl/include/flowplayer/flowplayer.rtmp-3.1.3.swf" --rtmp "rtmp://190.196.11.201/vod" --playpath "/teleseries/lafamiliadeallado/2010/videos/lfdal_20110304_c125" --flv lafamiliadeallado_125.flv<br/></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.felipebarriga.cl/linux/vod-video-on-demand-de-tvn-bajar-teleseries/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Bajar/Ver videos de Chilevisión (CHV)</title>
		<link>http://blog.felipebarriga.cl/linux/bajar-ver-videos-de-chilevision-chv/</link>
		<comments>http://blog.felipebarriga.cl/linux/bajar-ver-videos-de-chilevision-chv/#comments</comments>
		<pubDate>Sat, 17 Jul 2010 23:52:35 +0000</pubDate>
		<dc:creator>fbarriga</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[chilevision]]></category>
		<category><![CDATA[CHV]]></category>
		<category><![CDATA[TV]]></category>

		<guid isPermaLink="false">http://blog.felipebarriga.cl/?p=484</guid>
		<description><![CDATA[Si usas Linux y no puedes ver los videos en el sitio de Chilevisión (o simplemente quieres bajarlos) aquí va un tip de como hacerlo. Copia el siguiente texto y pegalo en la barra de navegación de tu navegador cuando te encuentres en la página del video que quieras bajar: javascript: var regEx = new [...]]]></description>
			<content:encoded><![CDATA[<p>Si usas Linux y no puedes ver los videos en el sitio de <a href="http://www.chilevision.cl/home/index.php?option=com_content&#038;task=view&#038;id=278842&#038;Itemid=2369">Chilevisión</a> (o simplemente quieres bajarlos) aquí va un tip de como hacerlo.<br />
Copia el siguiente texto y pegalo en la barra de navegación de tu navegador cuando te encuentres en la página del video que quieras bajar:<br />
<span id="more-484"></span><br />
<code><br />
javascript:<br />
var regEx = new RegExp("\('http:\/\/(.)+([\.mp4]|[\.flv])'\)");<br />
var tmp1 = regEx.exec(document.body.innerHTML);<br />
if (tmp1 == null)<br />
{<br />
  alert("Video no encontrado!");<br />
} else {<br />
  var tmp2 = tmp1[0].substr(1,tmp1[0].length-2);<br />
  location.href = decodeURIComponent(tmp2);<br />
}<br />
</code><br />
<strong>Nota 1</strong>: Para evitar el tener que pegar siempre el código para bajar un video, puedes agregarlo a tus favoritos.<br />
<strong>Nota 2</strong>: Las teleseries ocupan el mismo protocolo que las transmisiones en vivo (<a href="http://blog.felipebarriga.cl/tag/rtmp/">RTMP</a>). <a href="http://blog.felipebarriga.cl/linux/tv-chilena-online-para-linux/">En este post explico como ver el canal online</a>. Ahí hay una base para ver que cambios hay que hacer para poder ver/bajar las teleseries.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.felipebarriga.cl/linux/bajar-ver-videos-de-chilevision-chv/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TV Chilena Online (para Linux)</title>
		<link>http://blog.felipebarriga.cl/linux/tv-chilena-online-para-linux/</link>
		<comments>http://blog.felipebarriga.cl/linux/tv-chilena-online-para-linux/#comments</comments>
		<pubDate>Sun, 11 Jul 2010 07:00:16 +0000</pubDate>
		<dc:creator>fbarriga</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[flvstreamer]]></category>
		<category><![CDATA[mplayer]]></category>
		<category><![CDATA[rtmp]]></category>
		<category><![CDATA[rtmpdump]]></category>
		<category><![CDATA[TV]]></category>

		<guid isPermaLink="false">http://blog.felipebarriga.cl/?p=469</guid>
		<description><![CDATA[Para todos quienes por diversos motivos no pueden ver TV online de nuestros queridos canales nacionales (TVN, Canal 13, UCV TV, Megavisión, Chilevisión) porque por lo general a ellos solo les preocupa de que se vea en Windows. Aquí podrán encontrar algunos tips para poder verlos. Casi todos los canales ocupan RTMP para el envío [...]]]></description>
			<content:encoded><![CDATA[<p>Para todos quienes por diversos motivos no pueden ver TV online de nuestros queridos canales nacionales (<a href="http://www.tvn.cl/servicios/senal/2010/index.html">TVN</a>, <a href="http://envivo.13.cl/">Canal 13</a>, <a href="http://www.ucvtv.cl/">UCV TV</a>, <a href="http://beta.mega.cl/senal-en-vivo/">Megavisión</a>, <a href="http://www.chilevision.cl/home/index.php?option=com_content&#038;task=blogcategory&#038;id=1&#038;Itemid=1624">Chilevisión</a>) porque por lo general a ellos solo les preocupa de que se vea en Windows. Aquí podrán encontrar algunos tips para poder verlos.<br />
<span id="more-469"></span><br />
Casi todos los canales ocupan <a href="http://en.wikipedia.org/wiki/Real_Time_Messaging_Protocol">RTMP</a> para el envío de los datos. La única opción que he encontrado por el momento es ocupar el programa <a href="http://rtmpdump.mplayerhq.hu/">rtmpdump</a> para pasar el contenido a <a href="http://www.mplayerhq.hu">mplayer</a> o guardarlo en el disco. Si guardan el stream pueden verlo mientras se va guardando o posteriormente. En Ubuntu viene un fork de <a href="http://rtmpdump.mplayerhq.hu/">rtmpdump</a> que se llama <a href="http://savannah.nongnu.org/projects/flvstreamer">flvstreamer</a> que al parecer le sacaron varias características de cifrado. Supongo que habrá sido para evitar problemas legales.<br />
Los ejemplos que pondré son para ver directamente los canales con <a href="http://www.mplayerhq.hu">mplayer</a>. No deberían de tener problemas con otros reproductores. Si quieren guardar el stream solo tienen que reemplazar <em>-o &#8211; | mplayer -</em> por <em>-o dump.flv</em></p>
<p>Mucho bla bla y pocos comandos, aquí van:</p>
<p><strong>Chilevisión</strong></p>

<div class="wp-terminal"><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> flvstreamer --pageUrl "http://www.chilevision.cl/home/index.php?option=com_content&task=blogcategory&id=1&Itemid=1624" --rtmp "rtmp://streaming.chilevision.cl/internacional" --playpath "livestream"  --live -o - | mplayer -<br/></div>

<p><strong>Megavisión</strong></p>

<div class="wp-terminal"><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> rtmpdump --pageUrl "http://beta.mega.cl/senal-en-vivo/" --swfUrl "http://beta.mega.cl/website/js/flowplayer/3.2.2/swf/rtmp.swf" --rtmp "rtmp://cluster.ztreaming.com/mega" --playpath "megaJaeRa1xing" --live --flv - | mplayer -<br/></div>

<p><strong>Televisión Nacional de Chile &#8211; TVN</strong></p>

<div class="wp-terminal"><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> rtmpdump --pageUrl "http://www.tvn.cl/servicios/senal/2010/index.html" --swfUrl "http://www.tvn.cl/include/mediaplayer/player.swf" --rtmp "rtmp://190.196.11.201/envivo" --playpath "tvchile_s" --live --flv - | mplayer -<br/></div>

<p>Pueden ver un <a href="http://blog.felipebarriga.cl/wp-content/uploads/2010/07/tvn.png" rel="lightbox[469]">screenshot</a> de la transmisión vista en Windows y al lado con <a href="http://www.videolan.org/vlc/">VLC</a> en Linux. De hecho para poder ver como &#8216;colgarme&#8217; al stream tuve que ocupar la maquina virtual (<a href="http://www.virtualbox.org/">VirtualBox</a>) con Windows y de host Linux con <a href="http://www.wireshark.org/">Wireshark</a>.</p>
<p><strong>Canal 13</strong></p>

<div class="wp-terminal"><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> rtmpdump --pageUrl "http://envivo.13.cl/" --swfUrl "http://envivo.13.cl/streaming.swf" --rtmp "rtmp://200.6.119.4/c13str-aire" --playpath "c13str-aire.stream" --live --flv - | mplayer -<br/></div>

<p><strong>Canal 13 Cable</strong></p>

<div class="wp-terminal"><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> rtmpdump --pageUrl "http://envivo.13.cl/" --swfUrl "http://envivo.13.cl/streaming.swf" --rtmp "rtmp://200.6.119.4/c13str-cable" --playpath "c13str-cable.stream" --live --flv - | mplayer -<br/></div>

<p><strong>Tele 13 Online</strong></p>

<div class="wp-terminal"><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> rtmpdump --pageUrl "http://envivo.13.cl/" --swfUrl "http://envivo.13.cl/streaming.swf" --rtmp "rtmp://200.6.119.4/c13str-online" --playpath "c13str-online.stream" --live --flv - | mplayer -<br/></div>

<p>* Si tienen problemas con la IP <em>200.6.119.4</em> pueden ocupar la <em>200.91.29.254</em><br />
* Les recomiendo ocupar filtros de desentrelazado (<a href="http://en.wikipedia.org/wiki/Deinterlacing">deinterlacing</a>). Para mplayer: <em>mplayer -vf pp=linblenddeint</em></p>
<p><strong>UCV TV</strong></p>

<div class="wp-terminal"><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> mplayer mms://200.24.226.186:8080/<br/></div>

<p><strong>La Red</strong><br />
No tiene transmisión online&#8230;</p>
<p>* Recomiendo darle un poco más de cache a mplayer con <em>mplayer -cache 512</em> (o lo que estimen mejor, comenten como les va).</p>
<p><strong>UPDATE: Ahora pueden <a href="http://blog.felipebarriga.cl/linux/vod-video-on-demand-de-tvn-bajar-teleseries/">bajar capítulos de series/teleseries de TVN</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.felipebarriga.cl/linux/tv-chilena-online-para-linux/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Easy crop a PDF in Linux/Unix</title>
		<link>http://blog.felipebarriga.cl/linux/easy-crop-a-pdf-in-linux-unix/</link>
		<comments>http://blog.felipebarriga.cl/linux/easy-crop-a-pdf-in-linux-unix/#comments</comments>
		<pubDate>Wed, 12 May 2010 20:43:57 +0000</pubDate>
		<dc:creator>fbarriga</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ImageMagick]]></category>
		<category><![CDATA[PDF]]></category>
		<category><![CDATA[pdftoppm]]></category>

		<guid isPermaLink="false">http://blog.felipebarriga.cl/?p=335</guid>
		<description><![CDATA[Sometimes somebody send you a pdf with big white margins that only annoy you. This is often when you receive Power Point presentations in pdf format so is almost impossible to print several slides on one page. To avoid this you can crop the pdf pages and remove those margins. Getting the bounding box First [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes somebody send you a <a href="http://es.wikipedia.org/wiki/Pdf">pdf</a> with big white margins that only annoy you. This is often when you receive Power Point presentations in pdf format so is almost impossible to print several slides on one page.<br />
<center><br />
<table>
<tr>
<td>
<div id="attachment_349" class="wp-caption aligncenter" style="width: 160px"><a href="http://blog.felipebarriga.cl/wp-content/uploads/2010/05/before_pdf.jpg" rel="lightbox[335]"><img src="http://blog.felipebarriga.cl/wp-content/uploads/2010/05/before_pdf-150x150.jpg" alt="PDF Before Conversion" title="Before" width="150" height="150" class="size-thumbnail wp-image-349" /></a><p class="wp-caption-text">Before</p></div>
</td>
<td>
<div id="attachment_350" class="wp-caption aligncenter" style="width: 160px"><a href="http://blog.felipebarriga.cl/wp-content/uploads/2010/05/after_pdf.jpg" rel="lightbox[335]"><img src="http://blog.felipebarriga.cl/wp-content/uploads/2010/05/after_pdf-150x150.jpg" alt="PDF After Conversion" title="After" width="150" height="150" class="size-thumbnail wp-image-350" /></a><p class="wp-caption-text">After</p></div>
</td>
</tr>
</table>
<p></center><br />
To avoid this you can crop the pdf pages and remove those margins.<br />
<span id="more-335"></span><br />
<br/></p>
<h1>Getting the bounding box</h1>
<p>First execute <a href="http://poppler.freedesktop.org/">pdftoppm</a> to get the first slide and then open it with <a href="http://www.gimp.org/">The Gimp</a>.</p>

<div class="wp-terminal"><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> pdftoppm -f 1 -l 1 -png clase_1_introduccion.pdf test<br/></div>


<div class="wp-terminal"><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> gimp test-01.png<br/></div>

<p>Now put the cursor on the top-left corner of the desired place to begin the crop. Look at the bottom of The Gimp window and write somewhere the coordinates. Now do the same thing with the bottom-right corner. With those numbers you have the (X,Y) coordinates of the top-left and the width and height of the box.</p>
<p>In my case I get:<br />
<center><br />
<table>
<tr>
<td>
<div id="attachment_351" class="wp-caption aligncenter" style="width: 160px"><a href="http://blog.felipebarriga.cl/wp-content/uploads/2010/05/top-left.jpg" rel="lightbox[335]"><img src="http://blog.felipebarriga.cl/wp-content/uploads/2010/05/top-left-150x150.jpg" alt="Top Left Coordinates of PDF" title="Top Left" width="150" height="150" class="size-thumbnail wp-image-351" /></a><p class="wp-caption-text">Top Left</p></div>
</td>
<td>
<div id="attachment_352" class="wp-caption aligncenter" style="width: 160px"><a href="http://blog.felipebarriga.cl/wp-content/uploads/2010/05/bottom-right.jpg" rel="lightbox[335]"><img src="http://blog.felipebarriga.cl/wp-content/uploads/2010/05/bottom-right-150x150.jpg" alt="Bottom Right Coordinates of PDF" title="Bottom Right" width="150" height="150" class="size-thumbnail wp-image-352" /></a><p class="wp-caption-text">Bottom Right</p></div>
</td>
</tr>
</table>
<p></center><br />
<strong>&nbsp;&nbsp;&nbsp;top-left-X = 261<br />
&nbsp;&nbsp;&nbsp;top-left-Y = 198</strong><br />
&nbsp;&nbsp;&nbsp;bottom-right-X = 1014<br />
&nbsp;&nbsp;&nbsp;bottom-right-Y = 1449<br />
&nbsp;&nbsp;&nbsp;<strong>width</strong> &nbsp;= bottom-right-X &#8211; top-left-X = 1014 &#8211; 261 <strong>= 753</strong><br />
&nbsp;&nbsp;&nbsp;<strong>height</strong> = bottom-right-Y &#8211; top-left-Y = 1449 &#8211; 198 <strong>= 1251</strong><br />
<br/></p>
<h1>Cropping and saving the slides as images (png)</h1>

<div class="wp-terminal"><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> pdftoppm -x 261 -W 753 -y 198 -H 1251 -png clase_1_introduccion.pdf clase1_temp<br/></div>

<p>If the images doesn&#8217;t look nice (low resolution, check this using a non anti-aliasing viewer) you can try to increase from 150dpi (default value of pdftoppm) to 600dpi.</p>
<p>The ratio between 600 and 150 is 4:1 so you need to do some complex maths:<br />
&nbsp;&nbsp;&nbsp;&nbsp;<strong>new-top-left-X</strong> = top-left-X * 4 = 261 * 4 <strong>= 1044</strong><br />
&nbsp;&nbsp;&nbsp;&nbsp;<strong>new-top-left-Y</strong> = top-left-Y * 4 = 198 * 4 <strong>= 792</strong><br />
&nbsp;&nbsp;&nbsp;&nbsp;<strong>new-width&nbsp; </strong> = width &nbsp;* 4 = &nbsp; 753 * 4 <strong>= 3012</strong><br />
&nbsp;&nbsp;&nbsp;&nbsp;<strong>new-height</strong> = height * 4 = 1251 * 4 <strong>= 5004</strong></p>
<p>So the new command line is:</p>

<div class="wp-terminal"><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> pdftoppm -r 600 -x 1044 -W 3012 -y 792 -H 5004 -png clase_1_introduccion.pdf clase1_temp<br/></div>

<p><br/></p>
<h1>Merging images in a pdf</h1>
<p>Using the convert command (<a href="http://www.imagemagick.org/">ImageMagick</a>) you can reassemble the images in a single pdf:</p>

<div class="wp-terminal"><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> convert clase1_temp*.png clase_1_introduccion_cropped.pdf<br/></div>

<p><br/></p>
<h1>Deleting temporary files</h1>

<div class="wp-terminal"><font color='#33FF00'>felipe@funstation</font> <font color='#0066FF'>$</font> rm -f test-01.png clase1_temp*.png<br/></div>

<p><br/></p>
<h1>Notes</h1>
<ul>
<li>Using 600dpi instead of 150dpi will increase a bit the size of temporal files and the size of output pdf can increase from 3MB to 14MB. The big problem is that is going to <strong>eat huge amounts of ram memory</strong> (<u>can be several GB</u>) making your computer a bit unstable (only on convert). Also processing time will increase significantly (only on pdftoppm). I recomend to use only 300dpi.</li>
<li>We use the -<a href="http://es.wikipedia.org/wiki/Portable_Network_Graphics">png</a> flag to avoid get the output files in <a href="http://en.wikipedia.org/wiki/Netpbm_format#PPM_example">ppm</a> format. Using this we can save space (in hard drive) in both temp images and final pdf (<strong>it really generate an smaller pdf</strong>).</li>
</ul>
<p><br/></p>
<h1>Example Files</h1>
<ul>
<li><a href='http://blog.felipebarriga.cl/wp-content/uploads/2010/05/clase_1_introduccion.pdf'>clase_1_introduccion.pdf (1.7 MB)</a></li>
<li><a href='http://blog.felipebarriga.cl/wp-content/uploads/2010/05/clase_1_introduccion_cropped.pdf'>clase_1_introduccion_cropped.pdf (8 MB)</a></li>
</ul>
<p><br/></p>
<h1>TODO</h1>
<ul>
<li>Convert png to jpg before making the pdf and see the change of quality v/s size</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.felipebarriga.cl/linux/easy-crop-a-pdf-in-linux-unix/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

