NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support v
« Previous 1 … 22 23 24 25 26 … 43 Next »
Why does recording HLS use FFMPEG and not just save .ts chunks to disk?

 
  • 0 Vote(s) - 0 Average
Why does recording HLS use FFMPEG and not just save .ts chunks to disk?
welshdemon
Offline

Junior Member

uk
Posts: 5
Threads: 1
Joined: Mar 2021
#1
2021-03-22, 09:35 AM
Just wondering why is FFMPEG required when recording a HLS stream which comprises of downloading .ts chunks to view? 

Can't the chunks be saved to disk bypassing the need for FFMPEG?

My concern is for people on older computers / crappy CPU laptops, as I'm developing a streaming video website and would like to offer people an option to record locally.

Thank you
Graham
Offline

Posting Freak

UK
Posts: 4,058
Threads: 102
Joined: Dec 2005
#2
2021-03-22, 11:52 AM
(2021-03-22, 09:35 AM)welshdemon Wrote: Just wondering why is FFMPEG required when recording a HLS stream which comprises of downloading .ts chunks to view? 

Please can you describe your situation with a tad more detail. My understanding is that NextPVR only uses FFMPEG to transcode when sending a stream to a web browser when viewing a recording or when watching Live TV.

I don't think that FFMPEG is used to create the recording file on disk.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,708
Threads: 767
Joined: Nov 2003
#3
2021-03-22, 05:02 PM
(2021-03-22, 09:35 AM)welshdemon Wrote: Just wondering why is FFMPEG required when recording a HLS stream which comprises of downloading .ts chunks to view? 

Can't the chunks be saved to disk bypassing the need for FFMPEG?

My concern is for people on older computers / crappy CPU laptops, as I'm developing a streaming video website and would like to offer people an option to record locally.
HLS only supports a small very specific set of codecs (certain H264 profiles of video + AAC audio). The vast majority of transport streams delivered to NextPVR from the tuners it supports do not meet those requirement. Broadcast TV uses other video codecs like MPEG2, or different H264 profile levels not compatible with HLS, or audio formats that are not supported like HE-AAC, EAC3, MPEG1 etc. This means that pretty much all broadcast TV needs transcoding to get it into a format that can be use for HLS.

For those situations where the source stream is a compatible format, usually from an IPTV source, ffmpeg is used as a simple remux rather than a transcode, since it's convenient to have the application always using the same components regardless of the type of source channel.

It's worth noting that even IPTV sources often use codecs that are incompatible with HLS (MPEG1 audio etc). Sometimes only on a subset of channels from a single IPTV provider.
welshdemon
Offline

Junior Member

uk
Posts: 5
Threads: 1
Joined: Mar 2021
#4
2021-03-23, 10:09 AM (This post was last modified: 2021-03-23, 10:13 AM by welshdemon.)
Thanks for the replies.

Yes I was watching while recording.
But even if not recording I notice FFMPEG busy. As it's fairly standard HTML5 video I'd expect the browser would play without transcoding. So maybe first step see if that is even possible.

It's an IPTV stream, x264 (MPEG4-AVC) AAC (ADTS)

CPU usage:
~5% normal browser
~15% NPVR browser app (ffmpeg in use)
~20% NPVR Desktop app (ffmpeg in use)

Is there a list of supported codecs which would allow NPVR to play without using FFMPEG?
I installed the LAV filters but it made no difference.

Also I realised they are ABR streams. Could that make any difference?

Thanks
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,708
Threads: 767
Joined: Nov 2003
#5
2021-03-23, 04:19 PM
It shouldn't require ffmpeg while viewing in the desktop app. This may be a sign NextPVR doesn't like something about the IPTV stream, and it falls back to using ffmpeg to transcode it to a more standard looking stream. That may be happening, and I might be able to stop it happening. Zip and attach your logs and I'll take a look.
welshdemon
Offline

Junior Member

uk
Posts: 5
Threads: 1
Joined: Mar 2021
#6
2021-03-24, 11:42 AM
Thanks for your offer to look at the log. Here they are.


Attached Files
.zip   logs-20210324-1136.zip (Size: 975.72 KB / Downloads: 5)
welshdemon
Offline

Junior Member

uk
Posts: 5
Threads: 1
Joined: Mar 2021
#7
2021-03-30, 10:00 AM
Did you have a chance to look at the logs and notice anything incorrect with the codecs in use or something please?
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,708
Threads: 767
Joined: Nov 2003
#8
2021-03-30, 07:39 PM
I spent some time with it this morning. I decrypted one of your urls from your log and tried it here. It was some authentication/security stuff that is tripping up NextPVR, and this causes it to fall back to letting ffmpeg take care of it. I haven't seen another IPTV provider doing this same thing.
welshdemon
Offline

Junior Member

uk
Posts: 5
Threads: 1
Joined: Mar 2021
#9
2021-04-03, 06:00 AM
The video server uses Nimble streamer with "wmsauth" security (From wmspanel.com) but I have made my own get.php auth script so users only have to type username and password, then the script creates a really long hashed wmsauth URL which wmspanel/Nimble checks.

I will have to experiment.

Thank you for your time and info.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,943
Threads: 956
Joined: May 2006
#10
2021-04-03, 02:31 PM
If not transcoding is important and you have some expertise consider doing this as an Extra. I've played with nimble sessions and the tokens aren't static but the Extra can forward a dynamic playlist.m3u8&wmcAuthSign=... directly to NextPVR with any headers you might need added

Martin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Recording from the point you switch channels rather than when you press record Swindiff 2 256 2025-05-05, 12:30 PM
Last Post: Swindiff
  Controlling the nextpvr server from Jellyfin (via the nextpvr plugin) (no recording) kfmf 2 345 2025-05-04, 02:21 PM
Last Post: mvallevand
  Keeping users recording separate Swindiff 2 260 2025-05-02, 07:47 PM
Last Post: Swindiff
  Recurring recording creates multiple recordings of same event txinga 2 377 2025-03-29, 12:33 AM
Last Post: txinga
  [FFMPEG]: HTTP error 404 Not Found bit_creepy 19 1,557 2025-02-27, 05:04 AM
Last Post: sub
  Recording Auto Transcode VCR58 8 1,767 2025-02-18, 12:45 AM
Last Post: mvallevand
  Automated placement based on recording type? ehfortin 6 587 2024-12-28, 11:50 PM
Last Post: spin35
  HDHR Tuner not released after recording since update to 7.0.0 spin35 1 359 2024-12-24, 01:46 PM
Last Post: mvallevand
  Cannot seek live recording, v7.0.0.241105 pulley 6 697 2024-11-17, 09:58 PM
Last Post: mvallevand
  [Failed: Recording service not running at recording time] Poocher 17 1,416 2024-10-14, 11:14 PM
Last Post: Poocher

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

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

Linear Mode
Threaded Mode