ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <j.hagen@xs4all.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: embedded sounds aren’t played
Date: Tue, 14 Aug 2018 18:35:11 +0200	[thread overview]
Message-ID: <4ed2eaa1-6984-fdbc-f3f6-721a66ac210c@xs4all.nl> (raw)
In-Reply-To: <7436ccf9-e077-9de5-33d1-04776bfdff51@gmx.es>

On 8/14/2018 5:38 PM, Pablo Rodriguez wrote:
> 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.

I have no clue. But these interactive media features in pdf are such a 
mess. Embedding a simple sound file or video has become a pain and 
changed over time. I think that the modern way is to create a bunch of 
useless objects, embed a shockwave (soon obsolete flash) player etc etc 
and who knows what in a few years.

While all we want is to embed a sound file (afaik the old easy ways are 
obsolete).

One can only use acrobat to check. My most recent version is 10.1 and 
i'm not going to subscribe to some lock-in pro version for 20 euro per 
month in order to check if code still works. Having the file in the sam 
epaths seems to work so maybe something is missing. One problem i 
remember is that when one adds too many key/values one suddenly gets 
sounds mentioned in side bars and so.

If you need it you can spend some time on deciphering the latest spec 
and tell me what is missing.

> 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:

\nopdfcompression save you that step


>      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
> 
> 
> 
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
> 


-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________

  reply	other threads:[~2018-08-14 16:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-14 15:38 Pablo Rodriguez
2018-08-14 16:35 ` Hans Hagen [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4ed2eaa1-6984-fdbc-f3f6-721a66ac210c@xs4all.nl \
    --to=j.hagen@xs4all.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).