Showing posts with label multimedia. Show all posts
Showing posts with label multimedia. Show all posts

08/09/2017

How to get okular to play nice with pretty much all embedded movies

The trick is to have VLC play them, because vlc plays basically everything.
Install via apt-get either phonon4qt5-backend-vlc or phonon-backend-vlc or both.
In System Settings -> Audio and Video, prefer 'Phonon VLC' in the backend tab. If in doubt, restart Okular.

02/03/2012

Movie playback in Latex/Beamer: the current situation with Adobe Reader, Okular and Impress

A few years ago, the only option to include multimedia content in Linux presentations was linking to an external player. While the situation is still far from ideal, we have a few options now:
  • Okular has been able to play back movies via mplayer for quite some time now. Features: pause and seek. Downside: poster images appear all black (fixed in KDE 4.10), control bar spacing.
  • Adobe Reader can embed external flash players and videos. Features: pause. Downside: Flash, works only with old acroread.
  • Open/Libre Office Impress movie playback finally works. Features: presenter console. Downside: plays immediately, pause and seek only outside presentation mode. Also, the LaTeX PDF has to be converted into page images.

24/02/2012

A fairly decent poster in Inkscape

Input: nicely polished LaTeX/Beamer slides from the last conference presentation. No concept at all yet. The poster is due in 5 days.
I used to do posters with LaTeX/geometry, but that only works if you have lots of text and a plan. Trying this approach with throwing lots of figures on your empty canvas and shuffling them around is a nightmare.

20/02/2012

Upgrading to VLC 2.0 on Ubuntu 11.04 with checkinstall

There doesn't seem to be an official Debian package yet (at least I couldn't find a natty ppa), so I installed from source with checkinstall.
Checkinstall (instead of make install) creates a local .deb package, which can be uninstalled via dpkg -s vlc when the official repositories catch up.
The configure script kept popping up with missing packages, so I posted a list here. It's probably not complete (depending on what I had installed already) and might include a few unnecessary dev packages. Anyway, missing packages can usually be resolved by  aptitude search <keyword>.
Checkinstall failed at first being unable to create /usr/local/include/vlc and not finding vlc-cache-gen  (source). Afterwards, vlc crashed at startup missing some libraries, which had ended up in /usr/local/lib instead of /usr/lib, so I had to create a few symbolic links (source).

30/01/2011

Keynotifying PDF presentations

Update: (03/01/12) My version of pdf2odp.py now converts movies and Impress can actually play them. See this post for details.
Confession time: I did my defence on daWuzzzz's MacBook. The first reason was that I already had an Apple remote, the second was Keynote's excellent presenter console.
The downside was having to import my LaTeX/Beamer PDF presentation as images into Keynote and fiddling around with movie positioning afterwards.
You can do something like that purely on Linux - excluding the Apple remote :-) - so this post covers 3 topics:
  • the PDF presenter console
  • a harangue on crappy vector graphics import in OpenOffice and its presenter console
  • using python scripts to convert PDF into ODF with page images

28/01/2011

How to get ImageMagick to convert PDF to PNG with reasonable image quality

Without special effort, converting PDF to a series of PNG images produces images that look kind of corroded. The reason for this is related to ImageMagick's ghostscript backend, which sucks at antialiasing.
Thus, the only way to get better images would be to convert at an insanely high resolution (convert's density option) and resize afterwards. This can be done in one go by ImageMagick:
convert -density 1000x1000 <thepdf.pdf> -resize <xsize>x test%03d.png
However, I found that running ghostscript separately reduces the eventual image size by a factor of 2-3. I don't know why, it seems to be relatively device-independent (tested with both png16m and pngalpha).
gs -sDEVICE=png16m -sOutputFile=test%03d.png -r1000 -dNOPAUSE -dBATCH <mypdf.pdf>
for file in test???.png; do convert $file -resize <xsize>x $file; echo $file; done

17/07/2010

Lilypond fails at ghostscript PDF conversion

openSuSE 11.3 came with the new ghostscript 8.70, which lilypond wasn't quite ready for yet. On my system, gs consistently threw a "failed (256)" error when called by lilypond - just copying and pasting the gs code from the lilypond log into a shell worked, btw.
Quoting Graham Percival on the Lilypond mailing list:
Ghostscript was bumped to something.70, and a bunch of extra patches we apply to ghostscript changed. We'll look into it.
He has already posted an apparently patched development version here, but I haven't seen a linux x86 version there. Anyway, for all x86 users and people who'd rather stick to the stable release, there is the simple solution of downgrading to ghostscript < 8.70 - I used openSuSE 11.2's ghostscript-library 8.64, which worked fine, at least with LaTeX and lilypond.

25/02/2010

I love disper!

...and, if you use a laptop with nVidia graphics and want to extend/clone your screen output to an external monitor or projector, you will, too.
Disper is a python-based command line app and can be downloaded from here. I don't think there are any prerequisites except the nVidia packages and basic Python, and potentially xrandr. Install with make /sudo make install.
The beauty of disper is that it automatically and quite intelligently fits your screen resolution and panning to the detected displays.

19/01/2010

Rotating my screen output

or: Who ate my xorg.conf?
Oh. SuSE did, as the xorg.conf file is deprecated for newer versions of Xorg. Right.
Which posed a bit of a problem, as I needed the file to make xrandr work. Xrandr is a console app able to flip your screen by multiples of 90° (actually, it can do a lot more) via
xrandr -o left #right, inverted, normal

07/01/2010

timidity vs my USB sound card

timidity refused to play MIDI files with cryptic error messages:
can't create mcop directory
and, after I had created /tmp/ksocket-<myuser>:
sh: arts-start: command not found
Couldn't open output device
It turns out that the problem lay with my USB sound card, which I had set as the primary card in YaST to get the sound output from online flash movies etc. on it (Firefox is not handled by Phonon, so you have to do it permanently via YaST), and which I had unplugged. Setting the on-board card as the primary card again solved the issue. I suppose plugging in the USB card might also help, but I don't have it with me right now.

17/12/2009

Copying calendar and contacts from Kontact to an iPod with the proper encoding

Copying your personal data to an iPod is surprisingly easy:
Calendar: export your calendar as an iCal file (File->Export…) and copy it to the Calendars directory on your mounted iPod (e.g. /media/MYIPOD/Calendars)
Address book: File->Export->Export vCard…, take care to export your contact list to several files. Copy to the Contacts directory on your iPod.
It's getting a bit trickier if you have special characters in your files, as these have to be converted from Kontact's UTF-8 to the iPod's ISO_8859-15 encoding. Recoding can be done by iconv with a shell script. Run from the directory where vCards and calendar have been exported to:

15/11/2009

Amarok: Again the album art issue

Amarok doesn't handle album art well for me. They can't help some of the main issues: Amazon's API restrictions have forced the developers to switch to last.fm for automatic cover fetching, which apparently is not implemented in v2.2.0 yet. Additionally, for classically minded listeners like me it's generally difficult to get the matching cover without manual intervention (sorting out composers, artists, correct album title).
It doesn't get easier if you want to synchronise an iPod or similar and need to merge collections from different sources.

06/09/2009

Crackling USB sound card

Short note: My laptop's new USB sound card made annoying crackling noises at high CPU load (simple check: swipe mouse over buttons in task bar with full plasma desktop effects :-) ) . Apparently this is due to the USB bus not supplying enough power, because I got rid of this by using an externally powered hub.
Hm. Simple solution, but dire consequences: lugging around a fat hub and its power supply? Or get a Y adaptor (like this one) and let it block two of my precious USB ports? Not amused.

03/09/2009

Oh, those sneaky Apple people…

…still trying valiantly to keep us from procrastinating. Apparently they now deny apple.com/trailers access to all non-Quicktime users, which is more or less the Linux community. Hey, and I always thought we stood all united against Microsoft.
Several workarounds have been proposed.

21/08/2009

DigiKam woes

Archimedes reproducibly failed to connect to my digital camera with digiKam, with the following message:
'Failed to connect to the camera. Please make sure it is connected properly and turned on. Would you like to try again?'
Root access worked.
The omniscient Google came up with two answers:

15/08/2009

My USB soundcard did not want to play mp3s

As Tisiphone's line out jack is pretty worn out, I bought a cheap C-Media USB soundcard to finally get stereo sound again. It's quite plug-and-play, the channels showed in KMix without me having to change any settings, but the damn thing refused to play mp3s.
It turned out to be Phonon's fault, and it's actually a pretty cool feature.

05/08/2009

Texlive 2007 and inkscape 0.46 on openSuSE 10.3

I hadn't thought this would be a problem, but I fiddled quite a while with inkscape's and texlive's alternating complaints about missing poppler libraries.
Poppler is a pdf rendering library (xpdf fork), of which texlive 2007 needs version 1 (provided by the poppler package), while inkscape 0.46 (yes, the new version with built-in pdf import) needs libpoppler2. For some reason YaST apparently deleted one of them :-(
Well, I learnt quite a bit about library linking conventions.
Altogether, it has to be some problem of the expiring support for SuSE 10.3; texlive 2008 probably already depends on a newer poppler version (cf. the 'PageGroup detected' error, which is fixed by now), but it's packaged only for 11.0 and higher. Still, Archimedes is stuck with 10.3 until I've got my PhD at least - or so I thought.

17/07/2009

More Virtual Box: USB devices

Actually, the last remaining device I need Windows for (apart from the printing issue) is my Sony HI-MD audio recorder. The usual Sony support bullshit: software and standards are closed source, the system is too dated and unpopular for any viable Linux hack (though there are some people in Berlin working on it), and Wine is useless with anything involving a USB connection.

09/07/2009

Brute force presentation clock


Prerequisites: KDE 4.2, Superkaramba, Acrobat reader.
The idea is to force the relative placement of the Adobe Reader and a Karamba clock widget. This doesn't work with Plasma widgets and the Okular presentation mode, as both seem to override Kwin placement rules (plasma is desktop-integrated anyway).
Get a suitable Karamba clock or countdown widget from kde-look.org (small and preferably with transparency) and put it onto your dektop.
Back up your present window rules:

27/06/2009

Flash not working on some pages?

… e.g. thedailyshow.com or arte.tv (yep, procrastinating again). By now, some pages require Flash 10, while the SuSE repos are stuck on v9. Get the Flash RPM from the Adobe page. Remove flash-plugin in YaST, and install the new one. Flash will still not work in Firefox, because a symlink is missing. Ben Kevan found it:
sudo ln -s /usr/lib/flash-plugin/libflashplayer.so /usr/lib/browser-plugins/libflashplayer.so