Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#40 Support for seeking within some transcoded files

open
Leo
7
2008-09-02
2008-09-02
James Henstridge
No

It would be nice if it was possible to seek within a transcoded file. At the moment it won't even let me pause playback of a transcoded vorbis file on my PS3.

I realise that this is not possible in general, but it should be possible for constant bitrate formats like audio/L16.

Given a file offset into an audio/L16 file, it should be a simple matter to deduce the sample number and restart the transcoding from that point in time.

Discussion

  • Jin
    Jin
    2008-09-02

    • priority: 5 --> 7
    • assigned_to: jin_eld --> lww
     
  • Jin
    Jin
    2008-09-02

    Logged In: YES
    user_id=1205152
    Originator: NO

    This is indeed planned, even for video files. The idea is to simply cache the transcoded data and make sure that seeks past the end of file are ignored.

    Btw, with the current transcoding solution pausing works fine on the DSM-510, so a client-side pause would be possible, it's just that the PS3 does not do it the smart way.

    You have to bribe Leo to add seeking to the buffered io handler and to extend it to use disk instead of memory or something like that :)

     
  • I've been playing around with getting seeking working in another UPnP/DLNA server (Rygel), and attacked this from a different angle:

    1. set the DLNA.ORG_OP value for the transcoded resource to 10 (time seek mode).

    2. Assuming the player supports time seeks (the PS3 is such a player), it will send an HTTP request header like:
    TimeSeekRange.dlna.org: npt=42.5-

    This indicates that it wants you to play from 42.5 seconds into the resource.

    3. Send a TimeSeekRange.dlna.org HTTP response header in the same format, and seek forward 42.5 seconds before transcoding the resource.

    As this avoids byte offsets, it will work for output formats that aren't constant bit rate. Also, the PS3 seems to have no problem pausing on such a stream -- it just stops reading from the stream temporarily.