ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* embedded sounds aren’t played
@ 2018-08-14 15:38 Pablo Rodriguez
  2018-08-14 16:35 ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Pablo Rodriguez @ 2018-08-14 15:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 2358 bytes --]

Dear list,

this is sounds-001.tex from the examples:

    \definerenderingwindow
      [example]
      [width=0pt,height=0pt,frame=off]

    \setupinteraction[state=start]

    \useexternalrendering
      [mysound]
      [audio/mpeg] % audio/x-mp3
      [akkerman.mp3]
      [embed]

    \definereference [StartSoundTrack] [StartRendering{mysound}]
    \definereference [StopSoundTrack]  [StopRendering{mysound}]

    \definelayer[resources][width=\paperwidth,height=\paperheight]

    \setupbackgrounds[page][background=resources]

    \starttext
        \setlayer[resources]{\placerenderingwindow[example][mysound]}
        \startTEXpage
            \button{start}[StartSoundTrack]
            \button{stop}[StopSoundTrack]
        \stopTEXpage
        \startTEXpage
            \button{start}[StartSoundTrack]
            \button{stop}[StopSoundTrack]
        \stopTEXpage
    \stoptext

I added the option to embed the file. I’m attaching the result.

As I cannot check it myself with Acrobat for Linux (it seems to lack a
player for MP3 files), I asked at the Spanish TeX mailing list whether
they can play the MP3 file embedded in the PDF file.

A MacOS X user (with Acrobat 9.5) told me that the program reports that
the file "akkerman.mp3" is missing. Although the file is indeed
embedded, the /Filespec points to the external file.

Decompressing the PDF file, I see that there are two similar objects:

    8 0 obj
    <<
      /EF <<
        /F 7 0 R
      >>
      /F (akkerman.mp3)
      /Type /Filespec
      /UF
(\376\377\000a\000k\000k\000e\000r\000m\000a\000n\000.\000m\000p\0003)
    >>
    endobj

    10 0 obj
    <<
      /EF 8 0 R
      /F (akkerman.mp3)
      /Type /Filespec
    >>
    endobj

This object contains a strange dictionary (an indirect reference to the
same object it contains it?):

    13 0 obj
    <<
      /Type /Annot
      /A <<
        /AN 13 0 R
        /OP 0
        /R 12 0 R
        /S /Rendition
      >>
      /Border [ 0 0 0 ]
      /P 14 0 R
      /Subtype /Screen
      /Rect [ 0 14.416 0 14.416 ]
    >>
    endobj

I mean, the object already exists:

    15 0 obj
    <<
      /AN 13 0 R
      /OP 0
      /R 12 0 R
      /S /Rendition
    >>
    endobj

Could anyone tell me what I’m doing wrong so that the embedded file
isn’t played?

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk

[-- Attachment #2: mediaclip-sound.pdf --]
[-- Type: application/pdf, Size: 54455 bytes --]

[-- Attachment #3: Type: text/plain, Size: 492 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-08-15 20:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-14 15:38 embedded sounds aren’t played Pablo Rodriguez
2018-08-14 16:35 ` Hans Hagen
2018-08-15 17:25   ` Pablo Rodriguez
2018-08-15 19:34     ` Hans Hagen
2018-08-15 20:17       ` Pablo Rodriguez
2018-08-15 20:31         ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).