Thursday, August 30, 2012

Convert AVCHD (.MTS) video to mp4, avi, or mov

A number of digital cameras these days are capable of shooting 1080 HD video, but unfortunately, many cameras use the AVCHD format that was jointly developed by Sony and Panasonic. The use of this proprietary container can make playback on many devices and computers problematic.

Neither the less expensive Windows 7 versions nor Mac OS 10 versions prior to 10.8 (Mountain Lion) support native playback. I've also found the same issue with Android. Of course VLC is always a good desktop solution, and there are a number of Android players, such as MX Player.

Quickly googling for converting between MTS and MP4, etc. brings up a lot of solutions, but few are desirable because they transcode the video and audio streams. This is not only a waste of time and CPU cycles, quality will deteriorate. The thing is, inside these files are streams encoded with standard codecs that should be playable on anything - if not for the annoying AVCHD container. Most likely, the video stream inside a ".mts" file is h.264 video. There is no reason to re-encode the video to h.264 just to get an AVI, MOV, or MP4/M4V file.

So I use ffmpeg to just change the container, while keeping the streams intact and untouched, by using the copy options for the video and audio codecs. If you already have ffmpeg installed, all you have to do to get an mp4 file is type this from your command line (while in the proper directory).

ffmpeg -i input.MTS -vcodec copy -acodec copy output.mp4

To get an AVI or MOV file, just change the name of the output file accordingly (output.avi or For whatever reason, Quicktime on Mac OS 10.7 doesn't like these mp4 files and changing the extension to m4v does not fix the problem. For quicktime playback, change the containter to MOV (e.g.,

This simply copies the existing streams into a new container. Be warned, though, that this might not copy all streams and probably won't include any embedded GPS data. (Here is a neat tool for extracting GPS data from these containers.)

In case you want to batch process files, here is a bash shell script (inspired from here) for either mac OS 10 or Linux (sorry windows users). From "for" to "done" is all one line.

for a in `ls *.MTS` ; do ffmpeg -i $a -vcodec copy -acodec copy `echo "$a" | cut -d'.' -f1`.mp4 ; done

Copy the above text to a text editor (not a word processor) and save as any name you like (e.g., and either add it to you path or save it to the same folder as the video files. Give it execute permissions,

chmod +x

And, if the script is in the same folder as your videos (i.e., not added to your path), then execute by doing the following:

sh ./

Mac users might find it useful to install macports to get quick access to a large number of ported *nix applications. To install with macports, first update the list of ports, then install as follows:

sudo port selfupdate
sudo port install ffmpeg

As mentioned above, this isn't a perfect conversion. Using ffprobe on both the original and new files, I notice several inconsistencies. Here is the relevant information from the original:

Duration: 00:00:49.08, start: 0.718789, bitrate: 16880 kb/s
Program 1
Stream #0.0[0x1011]: Video: h264 (High), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 59.96 fps, 59.94 tbr, 90k tbn, 59.94 tbc
Stream #0.1[0x1100]: Audio: ac3, 48000 Hz, stereo, s16, 192 kb/s
Stream #0.2[0x1200]: Subtitle: pgssub

And from the mp4 file:

Duration: 00:00:49.11, start: 0.033000, bitrate: 15999 kb/s
Stream #0.0(und): Video: h264 (High), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 15808 kb/s, 59.94 fps, 59.94 tbr, 30k tbn, 59.94 tbc
creation_time : 1970-01-01 00:00:00
Stream #0.1(und): Audio: ac3, 48000 Hz, 2 channels, s16, 192 kb/s
creation_time : 1970-01-01 00:00:00

Notice that there is a slightly different bit rate to the video, changed duration and start time, only two streams (no subtitle file - gps data(?)), and a bogus creation data on both streams. I am guessing some of these changes to stream properties might be related to container limitations on perhaps I-frames or something (but really have no idea).

Anyways, the conversion works and the videos play!

Wednesday, August 22, 2012

NTT Docomo announces free wifi access

Docomo has always charged a premium relative to the other Japanese carriers. They were the last to introduce free in-network calling with the Xi Talk 24 Plan, and up until now, their wifi access cost an additional ¥300.

However, from September 1, 2012 until March 31, 2014, subscribers to the "Docomo Wi-Fi" plan will be granted free access to the 30,000+ access points Docomo has placed in stations, airports, cafes, and similar locations. By March 2013, Docomo claims they will nearly double the number of access points.

After the campaign expires, hot spot access will remain free, forever, as long as you fulfill the requirements by subscribing to both 1) an Xi (LTE) or Foma (3G) mobile data plan and 2) a blackberry, Mopera, or SP Mode ISP*
また、キャンペーン期間中から継続して適用条件を満たす限り、キャンペーン期間終了後も「docomo Wi-Fi」の月額使用料315円を無料といたします。
Xi data plan subscribers are currently receiving heavy discounts until September. Accordingly, Xi subscribers will not be eligible until the Xi data discounts end on October 1. At the same time, the Xi Lite plan will become available.

Existing subscribers to the "Docomo Wi-Fi" service will automatically receive the discount. Those who aren't currently subscribed will need to add the plan. There is an app on the market called docomo Wi-Fi かんたん接続 to simplify connecting from and Android device.

Docomo press release (J)

*all normal Docomo smartphone users will have one of these ISPs. The required data plans are also the standard data plans.

Is NTT Docomo really releasing 3 Nexus phones?

Update: The source for these rumors appears to be information posted/leaked to 2ch here. See posts 93-97 made on 8/16/2012, at just about the same time as when J-BQ made the Xperia experiment post. (I'm not certain of the time zone for the "August 15" displaying in Google Groups, so I can't actually say which came first. ) Confirmed that the J-BQ posts does in fact predate all the rumors, for whatever that is worth.

Just getting a chance to read though some of the responses to the poster who posted the list of NTT Docomo phones he'd like/expect to see. Most just ignore it. Those that do respond do so by saying things like:.
We don't need your f##king delusions, so get the f##k out and die
Ouch. Yeah, Sorry phandroid et al, but this list is total BS.

After Jean-Baptise Queru announced his AOSP experiment with the Xperia S, a rumor surfaced on a Taiwanese site that a DCM Xperia Nexus is coming. I received feedback on Google+ that this Taiwanese site is typically fairly reliable, and the pasted excerpt from the purported product list was indeed in Japanese. Coincidence? Maybe.

Next, a Hong Kong based site jumps in with what appears to be a more complete list of upcoming DCM handsets, including handsets other domestic makers including NEC, Panasonic, Fujitsu (with a Win 8 phone, among others), Sharp, and Kyocera. The list then goes on to include phones from LG, and Samsung, and dongles from AnyData. Next are Huawei, LG, and Nokia.

Last but not least is HTC, with FOMA and Xi versions of two phones including the One X.

Now, this has been picked up by phandroid, who apparently can't tell the difference between Chinese and Japanese. I tried leaving a comment that they'd get better results by setting their machine translator to go from C to E, instead of J to E, but that comment seems to have disappeared. I guess they don't want facts to get in the way over there.

So is this all BS?

Well, the HTC inclusion is interesting. HTC has not done well in Japan. Nobody but Nicholas and I bought the HTC Magic ht-03a. The two SBM Desire handsets also didn't sell well, though we now understand that part of the deal with Apple required SBM to aggressively push the iPhone. Readers have recounted being actively steered by SBM staff away from the Desire towards the iPhone.

So is HTC giving the quirky J market another go?

To try and get some insight, I went to some Japanese-language sources that I know and trust, beginning with Juggly. But alas, our friend currently has no posts regarding anything but a highly likely revision to the Galaxy Nexus. Other sites also have nothing. In fact, there is absolutely nothing regarding this written anywhere in the web in Japanese that I found with a quick search. So, for now, while the prospects of pure-AOSP devices from multiple makers is a very nice idea, I'm going to have to call BS on this one.

Yes, these handsets are made in China, so if there was information to be leaked, it would likely come out of China. However, I don't believe that makers are ready just yet to give up on their differentiation. The hardware is all essentially the same. It's mainly the software that makes the difference. Maybe makers could offer the same hardware with and without their UIs, such as HTC did with the Nexus One and the Desire.

I'm just not seeing it. At least not at this point.

Tuesday, August 21, 2012

B-mobile Smartphone Voice SIM with data as an option

UPDATE: See here for new data plan prices.

Until now, JCI SIMs have been focused on data, with voice as an option. The new, and there really is no elegant way to say this in English, "smartphone phone SIM" is a voice-only SIM with data available as an option. The plans are roughly comparable to the data+voice Aeon SIMs.

The primary difference is that the "sumaho" SIM (or perhaps I'll call it the "Smartphone Voice SIM") carries a lesser contract requirement of only 3-months with a ¥5,250 early cancellation fee, compared to the Aeon SIM's 1-year, ¥10,500 requirement. Accordingly, the Aeon SIMs are slightly less expensive.

JCI did away with cancellation fees on the "talking SIMs," so I'm not sure why this new SIM includes one. I don't quite see how activation of this SIM would incur more expenses than activation of a "talking SIM" (not the Aeon SIMs). Either way, 3 months is quite reasonable compared to the standard 2-year, autorenewing contract.

A ¥3,150 activation fee applies. When ordering, choose one each of the following:
  1. Voice Plan
    • S: ¥1,290 for 32.5 min (¥21/30s additional)
    • M: ¥2,290 for 75 min (¥18.9/30s additional)
    • L: ¥3,710 for ~357 min (¥14.7/30s additional)
  2. Data Plan
    • U200: ¥1,690 (200 kbps)
    • 2GB Flat Rate: ¥2,990 (best effort)
  3. SIM size
Like all of the "low speed" data SIMs, including the Aeon Plan A (100 kbps), the b-mobile U300 (300kbps), and the 14-day Visitor SIM (300kbps), the U200 will not allow streaming or sustained data transfers, so no Skype or youtube. These SIMs are known to have high latency, so they are best for background data transfer, such as automatic download of push mail and automatic updating of location services. This especially applies to the 100 kbps Plan A. Less so for the U300.

Trying to load a complex website with the U200 would probably be difficult. It is likely that some bits of the page will timeout while waiting for a connection to be established. The stuff that does come down will do so rather slowly.

The 2GB Flat Rate on the other hand is equivalent to the 1 GB Flat Rate and the 1 GB Visitor SIMs in terms of speed, so again, don't expect a blazing fast internet, but it should work well for everyday usage.

See here for a comparison of all the available data plans.

Voice Plan SVoice Plan MVoice Plan L
U200 Data Plan (200 kbps)¥1,690¥2,980¥3,980¥5,400
2GB Flat Rate Data Plan¥2,990¥4,280¥5,280¥6,700

Payment is by credit card and but no subsequent address verification is required. Japanese law prohibits non-residents from contracting mobile voice service.

Friday, August 17, 2012

Cellular version of new iPad now on sale at Apple Store - still SIM locked

Originally incorrectly sold as a "4G" iPad, the wifi + cellular iPad is now on sale at the online Apple store. Unfortunately, it is locked to Softbank's network while in Japan.

Wednesday, August 15, 2012

B-Mobile Visitor SIMs for tourists in Japan

B-mobile has revamped their visitor SIMs. The original product is no longer available. Instead, there are now two prepaid, data-only SIM cards. Both cost ¥3,980 and are valid for 14-days, with a choice between regular and micro sizes.

These SIMs are delivered preactivated with English support (including the webpage).

The "14-day prepaid" has unlimited data capped at 300 kbps, and the "1 GB prepaid" allows full speed (best effort) up to 1 GB. It should be noted that the 300 kbps version will not allow sustained streaming, so it won't work with VoIP, Skype, youtube and the like.

Because of this, I recommend the 1 GB flat rate SIM.

Also, the 300 kbps SIMs often have high latency, meaning it can take a little time for a connection to be completed. All of the "U300" products have this issue. The 1GB version will provide a much more responsive internet experience. However, these are not a wide-open connection to the internet with a public IP address. These connect through a proxy and there is some amount of traffic shaping. Most people find that they can use VoIP like Skype with little issues.

While the 1GB version is marketed as "perfect for Skype," I confirmed that the SIM is technically equivalent to the standard 1 GB Flat Rate SIM and has no additional "Quality of Service" provisions specifically for Skype.

Non-visitor data-only SIMs also an option

See here for a list of SIMs that can also be used by visitors. Voice SIMs are by law limited to residents.

There is no reason why a tourist cannot use a standard, non-visitor SIM while temporarily in Japan. These are less expensive and the prepaid charges are good for 30 days. However, these require access to a Japanese mobile phone to activate the SIM. An English activation menu is available. These can be found at large electronic stores, such as Yodobashi Akiba. The 30-day U300 is not available in retail stores, but can often be found in the Akihabara gray market shops. It can be delivered to a hotel room.

The increase in price for the visitor SIMs may be worthwhile for the decreased hassle. Some may note that the there has been a substantial price increase on the visitor SIMs relative to the price of the original, with the price per day increasing from ¥100 to nearly ¥300. All I have to say about that is JCI made a mistake in pricing the original. Why would they offer it at the exact same price as the regular SIM when the market would obviously allow a higher price point?

Thursday, August 9, 2012

Naver's Line app need root permissions?

Naver's Line app is extremely popular in Japan. It was partly responsible for NTT Docomo network troubles that resulted in punitive, temporary pay cuts for CEO Yamada and other top executives.

I've been badgered to install it since the beginning of the year, but there is no way I am surrendering that much access to my personal information to a relatively unknown company. While their privacy policy states they'll behave with all the information about you and your contacts that they collect, I'm not quite convinced.

Now we've got a report of the Line app asking for root permission. There is no reason whatsoever that this app should do that, and you should never grant it that privilege - or any app that doesn't specifically need it, which are typically system utilities. Apps that need root to function correctly are firewalls, CPU over/under clockers, application backup tools, etc.

This of course only affects people who have have a rooted device. [Note that this screenshot shows the newer SuperSU is installed, rather than Superuser.]

Has anyone else noticed this behavior?

Wednesday, August 1, 2012

Free Unlock app for Galaxy S2 SC-02C

The free Galaxy_S Unlock (Market/XDA link) app is confirmed to SIM unlock the Galaxy S2 (SC-02C). The app description indicates that it does not work with "older Docomo phones," so it is unlikely to work with the original Docomo Galaxy S (SC-02B). It also doesn't seem to yet work with the S3. The app requires root access, as well.

It creates a backup, but it goes without saying that this is a bit dangerous, so use it at your own risk.

The app's developer helroz is relatively new to XDA Developers but seems to be doing good work and garnering respect. The internet permissions on the app is for downloading a generic unlocked nv_data file to use to build a real unlocked nv_data file.