NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 2 3 4 5 … 93 Next »
Get recording length from stream

 
  • 0 Vote(s) - 0 Average
Get recording length from stream
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,112
Threads: 957
Joined: May 2006
#11
2019-04-11, 02:42 PM
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
skogl
Offline

Junior Member

Posts: 20
Threads: 2
Joined: Mar 2019
#12
2019-04-12, 10:24 AM
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?
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,112
Threads: 957
Joined: May 2006
#13
2019-04-12, 12:30 PM
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
skogl
Offline

Junior Member

Posts: 20
Threads: 2
Joined: Mar 2019
#14
2019-04-12, 03:56 PM
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?
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,112
Threads: 957
Joined: May 2006
#15
2019-04-12, 04:27 PM
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
skogl
Offline

Junior Member

Posts: 20
Threads: 2
Joined: Mar 2019
#16
2019-04-12, 04:50 PM
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.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,112
Threads: 957
Joined: May 2006
#17
2019-04-12, 04:54 PM
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
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#18
2019-04-12, 05:12 PM
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.
skogl
Offline

Junior Member

Posts: 20
Threads: 2
Joined: Mar 2019
#19
2019-04-12, 05:13 PM
mvallevand: You have a PM!
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,112
Threads: 957
Joined: May 2006
#20
2019-04-12, 05:28 PM
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
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (5): « Previous 1 2 3 4 5 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Custom recording tomx 2 709 2025-02-07, 09:14 AM
Last Post: tomx
  API call for Recording Complete linustorvalds 1 473 2025-01-19, 02:11 PM
Last Post: mvallevand
  Manual recording API mvallevand 2 1,132 2023-11-09, 02:14 PM
Last Post: mvallevand
  API channel.stream.start mvallevand 2 1,452 2023-05-07, 09:40 PM
Last Post: mvallevand
  IPTV like stream from Sound Card input - FM Radio Project NumberFive 3 1,537 2022-11-20, 04:28 PM
Last Post: mvallevand
  Recording direct to GPhotos API rgonzalez 0 1,523 2020-06-29, 04:45 AM
Last Post: rgonzalez
  Recurring Recording URL Parameters jcole998 2 3,077 2019-09-19, 01:08 PM
Last Post: jcole998
  Unexpected result when deleting a pending recording scJohn 5 3,882 2018-05-06, 10:09 PM
Last Post: sub
  How to best verify success when adding a recurring recording drmargarit 1 2,880 2017-03-02, 03:13 PM
Last Post: mvallevand
  Change recording filename programmatically immediately before recording starts? craigrs84 5 6,221 2015-07-13, 09:28 PM
Last Post: patco444

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode