The best kittens, technology, and video games blog in the world.

Showing posts with label android. Show all posts
Showing posts with label android. Show all posts

Tuesday, November 28, 2017

How to watch high speed let's plays on London Underground

le petit chat by FranekN from flickr (CC-NC-ND)

Apparently the idea that some places - like London trains - are offline - never occurred to anyone in California or Seattle or wherever people who write mobile software tend to live. And even support for high speed playback is not quite as common as it should be.

So I came up with a process to deal with it - which even with all the scripts to automate it still has far too many steps. I'm not saying I recommend it to anyone, but maybe someone needs to do something similar, and they might use it as a starting point.

Download let's plays

First, let's find a bunch of let's plays we want to watch, it's best to use playlists instead of individual videos to reduce URL copy and pasting time, but it works for both.

To download them we can use youtube-dl, which is available as a homebrew package (brew install youtube-dl), or you can get it from here.

$ youtube-dl -t -f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best"
  "url1" "url2" "url3"

Youtube offers videos in many formats, and arguments above are what I found to result in highest quality and best compatibility with various video players. Default settings often ended up causing issues.

Speed up the videos

There's plenty of command line tools to manipulate audio and video, and they tend to have ridiculously complicated interfaces.

I wrote speedup_mp3 script (available in my unix-utilities repository) which wraps all such tools to provide easy speedup of various formats - including of video files.

The script uses ffmpeg to speedup videos - as well as sox and id3v2 to deal with audio files if you need to do so to some podcasts. All those dependencies you can satisfy with brew install ffmpeg sox id3v2.

The script can speedup a whole directory of downloaded videos at once by 2.0x factor:

$ speedup_mp3 -2.0 downloaded_videos/ fast_videos/

Adjust that number to your liking. Factors higher than 2.0 are not currently supported, as ffmpeg requires multiple speedup rounds in such case. I plan to add support for that later.

The process takes a lot of time, so it's best left overnight to do its thing.

The script already skips videos which exist in target directory, so you can add more videos to the source, run it again, and it won't redo videos it already converted.

Put them on Dropbox

Infuriatingly there doesn't seem to be any good way to just send files to Android tablet from a laptop over WiFi. There used to be some programs, but they got turned into microtransaction nonsense.

If you already use Dropbox, the easiest way is to put those sped up files there. This step is a bit awkward of course, as video files are big, people's upload speeds are often low, and free Dropbox plan is pretty small.

If that doesn't discourage you, open Dropbox app on your tablet, and use checkbox to make your files available offline. You don't need to wait for it to finish syncing, Dropbox should keep updating files as they get uploaded.

After that any video player works. I use VLC. Just open Dropbox folder, click on the video, it will open in VLC and play right away. First time you do it, make sure to set VLC as default app to avoid an extra dialog.

Isn't this ridiculously overcomplicated?

Yeah, it sort of is. Some parts of it will probably get better - for example speed controls on video/audio playback are getting more common, so you could skip that part (watching at 100% speed is of course totally silly). It still makes some sense to pre-speedup to save space and battery on the device, as faster files are proportionally smaller, but if you feel it's not worth the hassle, you can probably find a video player with appropriate functionality.

TfL showed zero interest in fixing lack of connectivity on London underground, and mobile ecosystem assumes you're always online or everything breaks, so this part will probably be a major pain point for very long time.

The part I find most embarrassing is lack of any builtin way to just send files over to a device. Hopefully this gets fixed soon.

Saturday, June 14, 2014

Samsung Galaxy Note 10.1 2014 Edition first impressions

Galileo by Erick Nava Riefenstahl from flickr (CC-NC)
It's not a serious review, just a collection of observations from two day with the tablet.

We need to stop designing for mobiles. When I did some browsing on it, far too many websites autoredirected me to their "mobile" domain which was awful shit compared to the desktop version. There's an option in the browser to make it request desktop version, but it doesn't always work. Every year "mobiles" get closer and closer to desktop quality. Instead of wasting all the time designing "for mobiles" just wait and the problem will solve itself. Remember garbage like WAP early adopters of mobile web did? All gone. Remember all low-resolution designs? All mid-level or higher phones and tablets are 200ppi+ these days, usually closer to 300ppi. 10"+ tablets should be treated the same as laptops today, end of story. For smaller tablets or high-end mobiles it makes some sense to have special mobile version, but the win isn't really that big for most sites. Low-end or old smartphones still sort of need those mobile sites, but unless you're targeting Nigerian market, just wait couple years and everybody will upgrade their phone to something decent.

Samsung should just reassign to another position whoever is coming up with names like "Samsung Galaxy Note 10.1 2014 Edition" before they release "Samsung Galaxy Note 10.1 Early 2015 Edition Gangnam Style Special Deluxe Edition".

It's insane how many passwords I have to enter to get everything running. I'm so grateful for each app which I can just authorize via my Google account. Of course when everything on the Internet can be accessed via Google authorization, NSA won't even have to bother to hack everyone, they'll just hack Google (or find a hole in oauth2) to authorize themselves as you to everything.

VLC for Android does exactly what I want, that is fast playback with pitch correction (you need to turn on pitch correction in settings). I know I probably sound obsessed about that, but there's only 24 hours in a day, and the last thing I want to use them on is slow narrators.

Maximum sound volume of the tablet is surprisingly low, and VLC doesn't go over 100%, which it very much should if the source is encoded at very low volume (like most stuff off youtube).

It's confusing that it's charged via USB cable, but I need to use special charger, not a PC or a regular charger. I understand technical reasons - USB puts limits on how much current devices can request, and tablet's huge battery just wants a lot more - but it's extremely annoying. Wasn't USB3 standard supposed to fix this?

Twitter's Android app is phone-only and doesn't work with tablets, and they don't have official tablet app. That's so weird. I'll have to give all the unofficial client apps a try.

I'll need to get myself some kind of folding case like Kindle Fire has, so I can watch stuff in bed while eating with one hand and petting the cat with the other. That's sort of why I got myself a tablet.

I wanted to read comic books on the tablet, but a lot of scans are very low res, so on high res screen I can see JPEG artifacts better than text itself. Fairly disappointing.

It is way better for reading PDFs (mostly research papers, which tend to be high quality PDFs, not low quality scans) than epaper Kindle I tried for it before.

Airdroid is pretty bad at transferring big video files over wifi, and doesn't know how to resume. It's just faster to connect the damn USB cable than retrying a few times.

XCOM for Android is confused by high resolution and keeps zooming up far too close. It looks like an OK game, but I can't get myself to play with it - not only due to lack of Enemy Within, mostly due to lack of Second Wave options I unlocked ten fucking times on desktop (Steam) version. Absolutely Critical (should be unlocked!!!) and Aiming Angles (unfortunately Enemy Within only) double tactical depth of the game. I wish there were more games on that - most genres don't map that well into tablet interface, but strategy games like Civilization 5 would be just awesome.

My cat likes the tablet a lot more than the laptop. I still need to hold the tablet is awkward positions sometimes for cat's convenience, but it's better than trying to watch something on a laptop while the cat is sitting on its warm keyboard.

SwiftKey keyboard is much less convenient to use than on the phone - on the phone gestures are relatively fast and require just finger movement, but swiping your fingers through tablet keyboard requires moving the whole hand, and it's not great.

Saturday, November 16, 2013

Why I want Apple to fail

Dear Apple fanboys. Dear Apple haters. Here's what phone for stupid people looks like:

I'll pause for a moment to let you consider the level of stupidity that has people pay $10k for a phone far worse in just about every possible way than a five year old Blackberry.

But I didn't mention that just to make fun of rich idiots. The entire consumer electronics market consists of pretty much three segments:
  • Very expensive and totally shitty things to take advantage of idiots with too much money - like Vertu phones, "audiophile" cables and so on. Everybody with any clue knows to stay away from them.
  • Bulk of the market which competes on price alone, with quality usually ranging from shitty to at best mediocre. You can find high quality or innovative stuff here from now and then, but nothing consistent and the next product in the same line will probably revert to the mean.
  • Apple. They sure have very high margins, but you actually get premium product for it.
The thing is - Apple didn't get to be $400bln+ company by doing anything amazing. For just about every Apple product you could make a long list of things which are wrong with it, their interoperability record is dismal, and it usually gives you a choice of Apple way or no way. Remember - this is the company which insisted on a one-button mouse. They're making that kind of ridiculous money because nobody bothers to compete with them!

Only this year other phone makers (mostly Samsung) even started bothering with the high end of the market. Due to network effects it can only win in total Android victory (the course we're currently on), destruction of high end Android market (more likely via lawsuits than any real innovation), or iPhones becoming Android-compatible - and knowing Apple's attitude towards interoperability that's about as likely as the Pope converting to Buddhism.

Anyway, on phones and tablets Android is finally putting some real pressure on Apple - not just from the lower end which Apple completely abandoned, but also from the high end. And Apple was never serious about desktops. But one huge area where Apple is still completely without any competition is laptops.

Laptop market today looks just like smartphone market looked like five years ago. There's Apple with their overpriced but pretty decent hardware. There's ton of cheap Windows junk. And of course there's overpriced and underdelivered sector of "gaming laptops" and their likes (less extreme than Vertu shitphones, but still not good value for money).

Other than Apple nobody is seriously trying to target the laptop high end market. One big reasons is Windows, which is about as compatible with anything high end as... well, Windows Phone. The high end market is largely tech people, so anybody with any hope of competing with Apple must do something Unix-y as well. It would most likely need to be Linux, possibly with some custom distro, and reasonable Windows (or OSX) compatibility layer to deal with smaller application ecosystem.

Or it could be licensed OSX, but we all know what's the likelihood of that. Or maybe, just maybe, Microsoft could go in more developer-friendly direction and made their OS tolerable, but that seems even less likely to happen than licensed OSX. Or it could follow Apple's steps with Bootcamp and simply dual boot Linux/Windows, or some kind of virtual machine.

Unfortunately right now nobody is even trying. There's some effort into pushing non-Windows non-Apple laptops, but they are definitely on the low end. Google Chromebook Pixel is sort of trying to go there, but it's still years behind, trying to attack Apple from the low-end, not the high-end. Other than that, nobody even tries... So tech people either stick to desktops, or accept overpriced OSX, with all its problems.

Anyway, I really hope Apple fails. I hope they get some serious competition and fall from their undeserved position as the most valuable company in the world to being just one of many manufacturers of quality consumer electronics. Because the alternative is really horrible for consumers.

Sunday, July 28, 2013

SwiftKey for Android review

Solea's Time... by ERIO from flickr (CC-NC-SA)

One of the reasons I've been reluctant to get a smartphone in the past is that it's pretty difficult to type on touchscreens. Input method was always my priority when it came to phone choice - I never got anywhere near keypad typing, and by previous phones all had either stylus-based virtual keyboard (which is actually fine since stylus tip is tiny compared with a finger), or an actual physical keyboard.

So even after I gave in and got myself a Galaxy S4 the first thing I looked for was better input methods.

Good things about SwiftKey

SwiftKey is a paid app, but it comes with a month trial period - reasonably long to learn if it works for you or not.

Unlike with all the predictive text methods (and for that matter all spellchecking) I saw, it can support multiple languages (English and Polish) without switching between them in menu all the time. It just tries to figure out the language from context and is pretty happy to switch it in the middle of text if you need it.

This was always hugely annoying and it's a proof that Americans with their massive single language bias should stay the hell away from designing any software having to do with languages. The world differs from Murica not in people using a single non-English language - it differs in people using multiple languages. I know, shocking, right? (SwiftKey is London based - in UK people are more aware that non-English languages exist).

At least for English it's pretty reasonable most of the time, and it's very easy to fall back to manually fixing the word if it doesn't get it right.

SwiftKey also doesn't try to censor every ducking thing you write, unlike some other predictive text systems I won't mention.

Bad things about SwitfKey

One very bad but easily fixable thing is long touch delay for punctuation. If you need some punctuation like "://" you long press the letter key on virtual keyboard corresponding to particular symbol - but defaults are just insanely slow. Yes, it's easy to fix it, but then if that excuse worked we'd all be using Emacs, right?

A more annoying problem is that it's not very context aware. For example if you try to type URL it will likely contain whole words. So you type one word, then second word, then ".com" and done, right? Well, not so much because SwiftKey "helpfully" inserted spaces between the words for you and now you need to go back and fix them. It really needs some concept of contexts where spaces should not be included.

And second big problem is quality of Polish language support. Unlike with English where it has decent success rate, Polish support barely even gets half the words right - and when it doesn't it's very difficult to correct it yourself with proper Polish diacritical characters.

Overall, it's a 4/5 for English, 3/5 for Polish. Much better than I expected from touchscreen devices (I expected regretting ever buying a touchscreen phone), but it's still nowhere near good enough level.