Re: Problems with images and video

446 views
Skip to first unread message

Houssam Salem

unread,
Oct 12, 2012, 7:24:49 AM10/12/12
to anki-a...@googlegroups.com, drmos...@gmail.com
Hello Mossy

Since Anki cards are just HTML rendered in a browser, you can use HTML5 and the video tag. The bad news is that it's a little messy and probably won't work everywhere. For starters, you need a browser that supports the <video> tag. That rules out old versions of IE, which might be an issue if you had planned to distribute this deck to others. The other problem is the video format. mp4 seems to work both within Anki and Chrome (they're both webkit), and I'm pretty sure it works in AnkiDroid as well but only for newer versions. I'm running Android 2.3 and it doesn't want to play the video, even though it shows the player controls (maybe I'm doing something wrong). I tried it on an Android emulator with Android 4.1, and it appeared to have played the video (I got sound but I don't think it rendered the video due to GPU acceleration getting in the way, or something). mp4 doesn't work in firefox, but ogg does. The <video> tag can have multiple files in it to use as a fallback so you can support multiple browsers. This of course means you need multiple versions of your video (maybe an Anki plugin can scan your collection for video files and create web format versions of them, which you can add in your template).

Here is an example you can use, straight from w3schools.com. Put this in your card's template:

<video width="320" height="240" controls="controls">

<source src="http://www.w3schools.com/html/movie.mp4" type="video/mp4">

<source src="http://www.w3schools.com/html/movie.ogg" type="video/ogg">

Your browser does not support the video tag.

</video>


Of course, you'd need to refer to the video in your own media collection, but this works as a demonstration. 

I've attached a screenshot for your amusement.

On Wednesday, October 10, 2012 11:57:07 PM UTC+11, drmos...@gmail.com wrote:
Hi,

I'm trying to learn British Sign Language but am having difficulty having videos show up on the flash cards. I've downloaded Anki1 for the desktop because I want to be able to use my Android and gather that isn't working yet with Anki 2. I've used my webcam to record a few signs and begun to make cards with Anki Desktop. To begin with I couldn't make them show up at all but when I found another program to convert the files to mp4, they are showing up. They pop up in a window of their own, rather than in the Anki window. I've synchronised and my cards show up on Ankiweb and Android but the videos don't appear on either.  On my desktop, I can see the files in C:\Users\DrMossyLawn\Documents\Anki\BSL.media.

I asked on the general forum and gather AnkiWeb doesn't handle video. Does the Android version handle video and if so any ideas how I can get it going?

And in case someone here knows: is there an easier way to capture video from the webcam into Anki instead of using Picasa to record - which is a ,wmf - and then converting it in WMCapture to an mp4?

If I don't find an easy way to use video, then I'll use diagrams of signs instead. But I can't see how to add these on the Android, which is frustrating. I'd hoped to be able to photograph something on my phone and add that to a card.

Thank you.

Mossy
videotag.jpeg

Houssam Salem

unread,
Oct 20, 2012, 9:26:49 AM10/20/12
to anki-a...@googlegroups.com, drmos...@gmail.com
Perhaps converting the videos into animated gifs would be a vastly simpler option in your case (if you don't need audio along with the video). I suspect something like ffmpeg or imagemagick would do the trick, but I've never done it before so I wouldn't know.

On Saturday, October 20, 2012 11:33:52 PM UTC+11, drmos...@gmail.com wrote:
Thanks. I don't think this is for me then. I'd hoped for something quick - click and drag. Writing the html for everything is going to be too much of a slog.
Reply all
Reply to author
Forward
0 new messages