Bug 326230 - Wish: play movies given by the RichMedia annotation (LaTeX media9 package)
Summary: Wish: play movies given by the RichMedia annotation (LaTeX media9 package)
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: PDF backend (show other bugs)
Version: unspecified
Platform: unspecified All
: NOR wishlist
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
: 311457 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-10-18 19:26 UTC by Oliver Sander
Modified: 2015-09-17 08:04 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Example pdf file (492.55 KB, application/pdf)
2013-10-18 19:27 UTC, Oliver Sander
Details
The corresponding tex sources (1.35 KB, text/x-tex)
2013-10-18 19:28 UTC, Oliver Sander
Details
The movie file (27.98 KB, video/mp4)
2013-10-18 19:28 UTC, Oliver Sander
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Sander 2013-10-18 19:26:43 UTC
It would be great if okular would play movies embedded in a pdf file with the RichMedia annotation.  Such pdf files can be created using the LaTeX 'media9' package.

I'll attach an example file.

Reproducible: Always
Comment 1 Oliver Sander 2013-10-18 19:27:27 UTC
Created attachment 82935 [details]
Example pdf file
Comment 2 Oliver Sander 2013-10-18 19:28:14 UTC
Created attachment 82936 [details]
The corresponding tex sources
Comment 3 Oliver Sander 2013-10-18 19:28:47 UTC
Created attachment 82937 [details]
The movie file
Comment 4 Albert Astals Cid 2015-03-18 00:09:16 UTC
*** Bug 311457 has been marked as a duplicate of this bug. ***
Comment 5 Oliver Sander 2015-03-26 06:02:45 UTC
Not trivial, when you look at what RichMedia does.  Apparently, the pdf viewer is expected to be able to play flash.  When embedding a movie in a pdf file using LaTeX and media9, the resulting pdf file actually contains a small video player written in flash, which needs to be run by somebody.

There appear to be (at least) three possible approaches to this problem:

a) Call lightspark from okular (apparently the flash dialect used rules out using gnash).   That would be the cleanest solution from the okular point of view: all remaining issues would be lightspark bugs.  Ironing out whatever bugs there are you would get all the features described in the media9 documentation: video, sound, 3d content, interactivity etc.

Unfortunately, it is not clear how many lightspark bugs need to be fixed before getting first results with okular.  In particular, lightspark apparently does not play the video player flash file that media9 embeds in pdf files: https://bugs.launchpad.net/lightspark/+bug/1246050
The maintainer of media9 has been very helpful, and has provided simplified versions of the player: that's https://bugs.launchpad.net/lightspark/+bug/1246682 and https://bugs.launchpad.net/lightspark/+bug/1246690 (the most action has been on that last one), but the list time I tried (about a year ago), these wouldn't play either.

Actually I think this would make a nice GSOC project.

b) Tobias suggested to make okular recognize the media9 flash video player, parse its input arguments, and then send the movie file to phonon instead.  That way you get the movie playing without having to deal with lightspark.  But of course you only get movie playing, and no other media9 feature.

c) Albert suggested to extract the flash file, write it in a temporary file, and make the browser play it.  That's (I guess) also reasonably simply to implement and comes without external dependencies.  However, it would open a separate browser window for all kinds of flash content, which is usually not desired.
Comment 6 Oliver Sander 2015-09-17 05:00:10 UTC
Option b) is now implemented.

commit 8b603c174dc288dcd83e19afb075853e459a82a7
Author: Tobias Koenig <tobias.koenig@kdab.com>
Date:   Tue Aug 4 11:11:29 2015 +0200

    Add basic support for RichMedia annotations in PDF files
    
    That patch extracts the video file, which is defined in a
    rich media annotation as parameter for the flash player,
    and uses the normal multimedia player, to playback the video
    file.
    
    This feature requires poppler-qt5 in version 0.36.
    
    FEATURE: 326230
    REVIEW: 124612
Comment 7 Albert Astals Cid 2015-09-17 08:04:16 UTC
It's not really FIXED since it isn't part of a branch that is slated for release yet, but yeah.