Page 2 of 5 FirstFirst 1234 ... LastLast
Results 11 to 20 of 45

Thread: Get recording length from stream

  1. #11
    Join Date
    May 2006
    Location
    Canada
    Posts
    28,061
    You didn't send logs you sent a snippet from one log. In any event NextPVR buffers 56400 byte blocks internally on this command It looks like VLC is using 564,000 bytes at the end of file to help calculate the file length and is getting it wrong, could be post padding in another show with different info.

    Martin

  2. #12
    Join Date
    Mar 2019
    Location
    Sweden
    Posts
    19
    I don't know how Vlc does this duration interpretation, the log snippet is from when trying to play the recording from exoplayer. Now, I have setup the same recording in three different locations, original NPVR server, apache server and other pvr (dvblink). Playing from apache and other pvr works as expected. That is, exoplayer sends a range request to byte 347908288 and then tries to find a pcr value from that location which is found and the duration is calculated based on that information.
    When recording is read from NPVR server I can see in the log that the range request is received and that 564000 bytes is sent. But reading anything from the returned stream leads to an EOFException. To me it seems as if the position has not been set as requested by the range request.

    Any ideas?

  3. #13
    Join Date
    May 2006
    Location
    Canada
    Posts
    28,061
    My comment about VLC was based on your comment. NextPVR's web server is very basic I am not surprised to find differences with others, in fact there are other ways of sending files via http in NextPVR and they use different approaches. In at least one case the range request was off by one byte. I'm guessing based on that snippet and your comments about EOF, that NextPVR closes the file when EOF is reached and expects the client to reopen in for playback.

    Martin

  4. #14
    Join Date
    Mar 2019
    Location
    Sweden
    Posts
    19
    Of course, no worries. What other ways are there to send files? If there is another way, it might be good enough for me to get the duration of the file?

  5. #15
    Join Date
    May 2006
    Location
    Canada
    Posts
    28,061
    I just tried ffprobe on a three files with different formats here and it reported the correct duration on all of them when served by NextPVR, it could be your file is the issue.

    Martin

  6. #16
    Join Date
    Mar 2019
    Location
    Sweden
    Posts
    19
    There are probably many different ways to discover video duration. But in my case the only source that failed was NPVR. It's a transport stream (.ts) probably with mpeg2 video and audio, it's very unlikely that anything's wrong with the file.

  7. #17
    Join Date
    May 2006
    Location
    Canada
    Posts
    28,061
    Can you put a link on the cloud? All my NextPVR files are mpegts mux, one was mp2 SD video and mp2 audio, one was mp2 HD video with ac3 and one was h264 HD with ac3

    Martin

  8. #18
    Join Date
    Nov 2003
    Location
    NextPVR HQ, Wellington, New Zealand
    Posts
    89,763
    If you can supply a wireshark trace of the start of playback in VLC over http, where the it correctly reports the duration, I'll check if what it's doing differently. Start the trace before you request playback, then stop the trace as soon the duration appears.

  9. #19
    Join Date
    Mar 2019
    Location
    Sweden
    Posts
    19
    mvallevand: You have a PM!

  10. #20
    Join Date
    May 2006
    Location
    Canada
    Posts
    28,061
    Got it what are you expecting? For me ffprobe gives me the same time 12:59:78 from http as from the file system.

    Code:
    Input #0, mpegts, from 'http://172.16.3.2:8866/live?recording=20952':
      Duration: 00:12:59.78, start: 75861.826589, bitrate: 3575 kb/s
      Program 870 
        Stream #0:0[0x367]: Video: mpeg2video (Main), 1 reference frame ([2][0][0][0] / 0x0002), yuv420p(tv, top first, left), 720x576 [SAR 64:45 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
        Stream #0:1[0x368](swe): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 256 kb/s
        Stream #0:2[0x36a](swe): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 128 kb/s (visual impaired)
        Stream #0:3[0x36c](swe,swe,swe): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)
        Stream #0:4[0x3ed]: Unknown: none ([5][0][0][0] / 0x0005)
    Martin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •