Summary: | Wish; Show videos in a pdf | ||
---|---|---|---|
Product: | [Applications] okular | Reporter: | Leopold Palomo-Avellaneda <leo> |
Component: | general | Assignee: | Okular developers <okular-devel> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | a.m.p.boelens, aacid, bradh, edward.hades, graeser, Mr.Gosh, oliver.sander, s.witzel, tgpfeiffer |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 4.9.0 | |
Attachments: |
Example of a video embed in a pdf file
the video file.. |
Description
Leopold Palomo-Avellaneda
2006-10-31 18:32:37 UTC
Created attachment 18338 [details]
Example of a video embed in a pdf file
The archive has 2 files: the pdf file and the LaTeX source for the example. The
video comes in another attachment
Created attachment 18339 [details]
the video file..
The video file ...
*** Bug 139144 has been marked as a duplicate of this bug. *** Reassigning to the mailing list I have developed a way of displaying videos etc from kpdf when in fullscreen. It is reported in detail at http://silas.psfc.mit.edu/fullscreen/. I'd like to urge that okular implement this ability, or the equivalent, within its own code. It would really be a killer advantage for kpdf/okular to be able to do what acroread can't which is to display helper programs "in front" of a fullscreen display. For pdf presentations, this is the main thing that prevents them being as featureful as (ugh!) powerpoint. The problem is not really the displaying of the video itself (with Phonon is like 5 lines of code - plus the handling of the video widget itself, of course). The problem is the reading of the video information (and some related informations) from the PDF document itself. Currently, this requires some work in the library we are using for PDFs (Poppler), and (way easier) adding the support structures for making the okular backends load the videos into the pages. The latter (adding the real okular work) is not really difficult (I have a basic patch for that). In the the Okular handbook it says that Okular has support for embedded files. However, if I understand the above post correctly, video in pdf is not supported? Embedded files is another kind of PDF goodies, but usually it's meant as a different thing than videos or sounds, even because the videos are not embedded, but you find only the URL of the video to be played (and some additional metadata for it). I just added some code for handling (in a really basic way) the video information and showing video widgets in the page view and in the presentation mode. If this proves to be working, it will be KDE 4.2 material (for the joy of the voters of this bug, especially the people from the Berlin university). Small downside of this implementation: on the PDF side, the video data are read with the current development version of the Poppler library (going to be 0.9.0 -- development release). Thank you! The people from the Berlin University are happy indeed! I'll try and test it and keep you informed about any problems. You write that your code is 'really basic'. What consequences should I expect this to have? I finally got to test this with poppler 0.9.2 and todays svn version of okular. It seems to work, but with minor glitches. With the document attached further above, here's what's happening: Upon starting okular (with the test file as command line argument), I get the message Error: parseAction: Bad annotation action for URI 'NULL' On the individual slides: First slide) (Non-embedded video and picture of first slide) This works correctly. KMPlayer is started and plays the movie. Incidentally, KMPlayer resizes its window about four times before starting to play, but I guess that's a different story. I also get the message okular(23959) KRunMX1::expandEscapedMacro: -miniicon isn't supported anymore (service "KMPlayer" ) Second slide) (Embedded video with autostart, looping and picture of first frame) This does indeed play the embedded movie, but only after clicking. Looping works. Before clicking, the first frame is not shown. Instead, there is a black rectangle of the size of the movie. The first frame is shown in the preview, however. Third slide) (Embedded video with no autostart, no looping, no picture of first frame) Works correctly. However, before clicking there is again the black rectangle. This time, it is slightly wider than the movie (about 5% of the movie width on each side). Therefore, when the movie plays there are black vertical bars to the left and right of the movie. The preview area again correctly displays the page, i.e. without the black rectangle. All these things hold both in regular and presentation mode. Hope this helps :-) The KPDF equivalent to this wishlist item is #109541. Tested it with the kde4daily qemu-image (updated today) and phonon xine-backend. My pdf was generated by the latex-beamer package. It contains an embedded mpg-movie. The results are the same in normal and presentation mode: *Embedded movies work after clicking. :-) *Autostart does not work. *Poster(first frame as preview) does not work. I did mot test audio output. With qemu the movie runs very unsteady and sometimes a few frames backwards. But this seems to be a performance issue with qemu and xine since movies run smoothly with virtualbox (after converting the image). I am curious about the status here. Is there any hope of having this working in 4.2? Thanks a lot! Playing an embedded video still doesn't work on KDE 4.2.4 / Kubuntu Jaunty, command line message is "Annotation Screen not supported" (also with Okular build from SVN). However, I can save the embedded video to the file system. My versions of libpoppler are: $ dpkg -l | grep poppler ii libpoppler-glib4 0.10.5-1ubuntu2 ii libpoppler-qt4-3 0.10.5-1ubuntu2 ii libpoppler4 0.10.5-1ubuntu2 ii poppler-utils 0.10.5-1ubuntu2 Oliver reported that he managed to show videos using Okular and libpoppler 0.9.2, so I'm wondering a) why this doesn't work for me and b) what is the current state of video support in Okular? Your video is actually embedded in the pdf file, right? In that case what you report is bug 172847. For videos that are not contained in the pdf file itself, I can still reproduce the behavior that I reported in Comment 11, now with the KDE 4.2.2 packages from Debian testing. The black rectangles are annoying but at least in informal situations I can show videos now. Has there been any progress on the autostart-issue? My impression ist that the state is still as Oliver and Carsten reported it above (11 and 13). I'm also interested in this for beamer-presentations, where it would be important that the video starts immediately. AFAIK there has been no progress. I had a look at the relevant code recently. It seems that the remaining issues (like missing autostart and poster features) are not bugs, but features that haven't been implemented yet at all. In particular, it appears that poppler (the library that does the actual pdf parsing) does not expose all the relevant information to okular (I think that is what the poppler TODO item "expose Rendition media through the MovieObject API" means). Hence further progress involves additions to poppler, and even additions to the poppler qt4 interface. I think the most difficult part for people without okular/poppler hacking experience are the interface enhancements. How are they supposed to look like? How is the movie poster image supposed to get from poppler to okular? Maybe one of the experts could comment on that. I would find implementing the actually functionality much easier with that information. Oliver, i do not really understand you question, the interface has to look like the otehrs, and i guess to "How is the movie poster image supposed to get from poppler to okular?" would be a QImage. If you are really interested in implementing those features please drop by #okular or #poppler IRC channels and let's talk about it (my nick is tsdgeos). Hi Albert, this just highlights how little I know of pdf and qt programming. I've been wanting to do this (and 172847) all this time, however I see myself forced to admit that I will never find enough free time to learn and do it. Somebody else will have to do the coding. Sorry. I'll happily help out with testing, though. I've implemented support for Movie actions, which are required for autostart to work. Unfortunately, that requires some support from the Poppler side. So before I send patches for Okular, a respective patch should be accepted in Poppler. See bug here: https://bugs.freedesktop.org/show_bug.cgi?id=40561 If you want to test it, I can give you a link to my Okular and Poppler sources. Awesome. I am currently travelling and without a machine that I can use for testing, but as soon as I get home (in about 10 days) I'll check it out. Thank you! I could test this feature now if needed. How can I get hold of your okular patch? (In reply to comment #23) > I could test this feature now if needed. How can I get hold of your okular > patch? Depending on your preferences: 1a. Clone my repositories of poppler and okular: git://hades.name/poppler.git git://hades.name/okular.git (in both repositories you want branch called "movie"). 1b. Download snapshots directly: http://git.hades.name/cgit.cgi/poppler.git/snapshot/poppler-movie.tar.bz2 http://git.hades.name/cgit.cgi/okular.git/snapshot/okular-movie.tar.bz2 2. Unpack, compile, install, run, test, enjoy! Did these patches got implemented in upstream dev. version? Because the only show-stopper for not using Impress anymore is the autostart Movie function. So I created a Bug espeacially for that: https://bugs.kde.org/show_bug.cgi?id=293141 I think this bug can be closed. Most of the functionality is here (thanks to everybody involved!) A few minor problems remain, but these are better dealt with in separate bug reports. Agreed with Oliver |