NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support v
« Previous 1 2 3 4 5 6 … 43 Next »
Extras.xml | restart ffmpeg when it closes?

 
  • 0 Vote(s) - 0 Average
Extras.xml | restart ffmpeg when it closes?
D3iver
Offline

Junior Member

UK
Posts: 5
Threads: 2
Joined: Sep 2024
#1
2024-09-27, 08:52 AM
Hi,
My iptv provider uses rotating links for the stream which are fetched from a base url.

E.G ffmpeg connects to "https://someiptvprovider.com/streams/994724824708/" which returns "https://someiptvprovider.com/hls/hfsjfhiouf89f89f7fs8fg/index.m3u8

the issue with this is that the return url changes every 2 hours or so, causing ffmpeg to close and cut off my recordings, 
I've tried to use some flags like "-reconnect" and "-reconnect_on_eof" and stuff like that, the issue is that these flags
try to reconnect to the redirected url instead of the one input into ffmpeg. there is a 7 year old bugtracker post about this
on ffmpeg's bugtracker, but it's still open and has no responses at all.

Is it possible to have some sort of xml line that checks if ffmpeg closed and restarts it to continue playing?
E.G
<reconnect>
     reconnect=true
</reconnect>

I'm also open to other ideas to get the same result.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,901
Threads: 955
Joined: May 2006
#2
2024-09-27, 11:35 AM
I cannot think of any easy way to do this if the token is invalidated during playback. If you want to play ffmpeg can take a named pipe as input (you are on there) but reopening a stream will almost surely provide broken timestamps and missing or extra media so you can't just append them, better to limit your recording time and create manual recordings as needed or get a better source.

Martin
D3iver
Offline

Junior Member

UK
Posts: 5
Threads: 2
Joined: Sep 2024
#3
2024-09-27, 11:55 AM (This post was last modified: 2024-09-27, 12:13 PM by D3iver.)
(2024-09-27, 11:35 AM)mvallevand Wrote: I cannot think of any easy way to do this if the token is invalidated during playback.  If you want to play ffmpeg can take a named pipe as input (you are on there) but reopening a stream will almost surely provide broken timestamps and missing or extra media so you can't just append them, better to limit your recording time and create manual recordings as needed or get a better source.

Martin

theres no token as its just a bunch of free streams, nothing is invalidated, all i really need it to do is reconnect to the base url when it loses connection instead of trying to reconnect to the redirect url,
so it can get the new redirect url to play it.
not entirely sure why the URL is even rotated but finding streams for even the few free channels i want is very hard as it is, and this is about the only provider i could find
in essense, what i explained in the original post above would suffice, even if it would cause a 1 second skip in a recording i wouldn't really mind that.
named pipes are not possible for me since im using windows and not linux
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,901
Threads: 955
Joined: May 2006
#4
2024-09-27, 01:12 PM
It could cause more than a one minute skip the file might not be seekable, the total length could be be wrong and possibly unplayable you may need to transcode the named pipe.

Good luck.

Martin
D3iver
Offline

Junior Member

UK
Posts: 5
Threads: 2
Joined: Sep 2024
#5
2024-09-27, 02:54 PM
(2024-09-27, 01:12 PM)mvallevand Wrote: It could cause more than a one minute skip the file might not be seekable, the total length could be be wrong and possibly unplayable you may need to transcode the named pipe.

Good luck.

Martin

I don't really understand how reconnecting would cause that, would it be possible to modify the source of ffmpeg and recompile it with base url reconnect instead of redirect?
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,901
Threads: 955
Joined: May 2006
#6
2024-09-27, 03:35 PM
I for one am completely finished with this thread so feel free to try and getting it working however you would like to do it.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  [FFMPEG]: HTTP error 404 Not Found bit_creepy 19 1,480 2025-02-27, 05:04 AM
Last Post: sub
Question extras.xml | channel management D3iver 3 381 2025-01-12, 09:05 PM
Last Post: mvallevand
  Adding new channels - extras hdpvr-doug8796 20 1,951 2024-09-20, 05:26 PM
Last Post: sub
  Crashing out trying to start ffmpeg Ade_AV 12 2,129 2023-08-13, 05:05 AM
Last Post: mvallevand
  BBC News HD - Embed M3U8 playlist as extras device cbconrad92 12 8,201 2022-08-05, 07:25 PM
Last Post: cbconrad92
  Cannot get extras to work MiF 5 1,346 2022-03-30, 12:13 AM
Last Post: sub
  Extras and IR Blasters TheCompWiz 11 2,287 2022-02-23, 04:58 PM
Last Post: sub
  Web apps play always fail and restart when moving time pascalb 7 1,538 2022-02-16, 06:25 PM
Last Post: pascalb
  Why does recording HLS use FFMPEG and not just save .ts chunks to disk? welshdemon 9 2,936 2021-04-03, 02:31 PM
Last Post: mvallevand
Tongue Run extras tuner batch file every time recording starts dlfergrd 7 1,998 2020-12-18, 11:47 PM
Last Post: dlfergrd

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

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

Linear Mode
Threaded Mode