Since PDF >= 1.5 files may contain videos or sound but currently they can't be viewed correctly with free software. Even linux-native adobe reader can't do this. Such animations would be nice for PDF-based presentations. PDF-files containing videos can be created via pdflatex and the movie15 style. Please have a look at: http://www.tug.org/tex-archive/macros/latex/contrib/movie15/
Would it be so difficult to implement a way so that mplayer could play the embedded media objects? More on http://www.tug.org/tex-archive/macros/latex/contrib/movie15/doc/movie15.pdf. Thanks, Pablo
I started to implement sound support in poppler 0.6. At the moment, only the Qt4 frontend expose the API for reading sounds that should be played as a result of an action (eg a page enter/leave). No news about movie support, yet.
Update on the situation. Sound: - poppler core and qt4 support them since 0.6 - poppler qt(3) and glib do not support them Movies: - poppler core support them since 0.8 - poppler qt4 will ship a basic support for them in 0.10 - poppler qt(3) and glib do not support them
As there has not been a comment on this bug for about a year. I was wondering if there has been any progress. This is something that the freedesktop desperately needs. Please fix this.
(In reply to comment #3) > Update on the situation. > > Sound: > - poppler core and qt4 support them since 0.6 > - poppler qt(3) and glib do not support them > > Movies: > - poppler core support them since 0.8 > - poppler qt4 will ship a basic support for them in 0.10 > - poppler qt(3) and glib do not support them I've tried to grab the SoundObject through Document->Page->Annotations->LinkAnnotation(because the subType is "ALink", but the LinkAnnotation couldn't return a correct Link object, which is always null, and couldn't find the SoundObject therefore. It seems that no support for sound is in Poppler 0.12.4. Any suggestions will be welcome!Tks. Cobra
Thought page->links->linkSound->SoundObject->data, I've retrieved the sound raw data along with channels, BPS, and volume information. But converted by sox into WAV format, it's just noise! Need any conversion or modification before I can use the raw data? Any suggestion are welcome. Tks. Cobra
If you attach the file someone maybe will be able to help you better.
QList<Poppler::Link*> pageLinks = doc->page(currentPage)->links(); if (pageLinks.isEmpty()){ QLabel *msgLabel = new QLabel(tr("No L's")); msgLabel->setVisible(true); } else{ //QLabel *msgLabel = new QLabel(tr("W L's")); //msgLabel->setVisible(true); int linkCount = pageLinks.count(); QString outStr; foreach (Poppler::Link* link, pageLinks){ bool firstMP3 = true; if (link==0){ ; } if ( link != 0 ){ switch (link->linkType()){ case Poppler::Link::Sound:{ outStr.append( "Sound" ); void *linktmp = (void*) link; Poppler::LinkSound* ls = (Poppler::LinkSound *)(linktmp); Poppler::SoundObject *so = ls->sound(); double volume = ls->volume(); QRectF linkArea = ls->linkArea(); bool mix = ls->mix(); if ( so->soundType() == Poppler::SoundObject::Embedded ){ if ( so->data().size() > 0 ){ QByteArray soByteArray(so->data()); int balen = soByteArray.size(); Poppler::SoundObject::SoundEncoding se = so->soundEncoding(); double samplingRate = so->samplingRate(); int channels = so->channels(); int bitsPerSample = so->bitsPerSample(); QFile destFile("./test.raw"); destFile.open(QIODevice::WriteOnly); destFile.write(soByteArray.data(), soByteArray.size()); if ( firstMP3==true ){ firstMP3 = false; /* QWidget *widget = new QWidget; widget->setWindowTitle("Video Player"); widget->resize(400,400); widget->show(); Phonon::VideoPlayer *player = new Phonon::VideoPlayer(Phonon::VideoCategory, this); player->load(Phonon::MediaSource(soByteArray)); player->play(); */ } else{ } } else{ } } break; } ------------- I've saved the RAW data into a file "./test.raw". Then, the file was transformed into WAV format by SOX. But, after all, it's full of noise! Cobra
(In reply to comment #8) I've compared the retrived QByteArray with the original audio file (.aiff), and finally gotten the point. Now, my question turns out to how we could find out what format it is? I mean, although we could get the bits per sample, channel number, and sampling rate, there is no obvious way to know the exact file format, i.e, WAV, AIFF, and even MP3. Cobra
As of poppler 0.20, pdfs with videos created by pdflatex and the movie15 package are now shown by okular. There are various minor glitches, but they should better be dealt with in separate bug reports. The basic functionality is there.
Agreed with sander, please file smaller and more concise bug reports so we can tackle them better and in a more focused way
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.