NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Linux v
« Previous 1 2 3 4 5 6 … 34 Next »
Folder location PostProcessing.sh with LibreElec

 
  • 0 Vote(s) - 0 Average
Folder location PostProcessing.sh with LibreElec
retrofan
Offline

Junior Member

The Netherlands
Posts: 42
Threads: 8
Joined: Aug 2024
#1
2024-08-13, 08:30 AM (This post was last modified: 2024-08-13, 08:33 AM by retrofan.)
Hi,

I would like to do some tests with PostProcessing.sh and ParallelProcessing.sh with LibreElec.

What exact location do I have to put those files?
I already gave them all the permissions (777) but the files aren't executed after recording.
The commands are correct as I tested it with SSH.

The script file must contain a last line with 'exit 0' as well?
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,820
Threads: 954
Joined: May 2006
#2
2024-08-13, 09:14 AM
It will be /storage/.kodi/userdata/addon_data/service.nextpvr/config/scripts/

I will update the wiki with these there have been a couple of recent posts on the LE file location.

Martin
retrofan
Offline

Junior Member

The Netherlands
Posts: 42
Threads: 8
Joined: Aug 2024
#3
2024-08-13, 09:25 AM
(2024-08-13, 09:14 AM)mvallevand Wrote: It will be /storage/.kodi/userdata/addon_data/service.nextpvr/config/scripts/

I will update the wiki with these there have been a couple of recent posts on the LE file location.

Martin

Thanks! I will try again.

However, there's a placeholder.txt in /storage/.kodi/addons/service.nextpvr/nextpvr-bin/data/scripts/
which states:

Batch files can be created in this directory.

PostProcessing.bat
PostCancel.bat
ParallelProcessing.bat
UpdateEPG.bat

For LibreElec this is different as it uses .sh scripts instead of batchfiles .bat
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,820
Threads: 954
Joined: May 2006
#4
2024-08-13, 09:39 AM
Yes that is confusing it probably shouldn't be in the program directory, but not sure if NextPVR uses both. For sure the scripts folder works but sub would need to comment.

Martin
retrofan
Offline

Junior Member

The Netherlands
Posts: 42
Threads: 8
Joined: Aug 2024
#5
2024-08-13, 12:05 PM
I'm sorry, but no matter what I try, the PostProcessing.sh script isn't executed even though I used chmod +x / 777.

This is what I tried, just a test:

#!/bin/bash
./storage/.kodi/addons/tools.ffmpeg-tools/bin/ffmpeg -y -i "$1" -c copy -f mpegts "$newfile"
exit 0

Why isn't the script executed?
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,820
Threads: 954
Joined: May 2006
#6
2024-08-13, 12:12 PM
First upload your zipped logs from the first settings page and we can confirm it is running.

Martin
retrofan
Offline

Junior Member

The Netherlands
Posts: 42
Threads: 8
Joined: Aug 2024
#7
2024-08-13, 02:23 PM
(2024-08-13, 12:12 PM)mvallevand Wrote: First upload your zipped logs from the first settings page and we can confirm it is running.

Martin

Here you go.


Attached Files
.zip   logs-20240813-1621.zip (Size: 105.05 KB / Downloads: 1)
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,820
Threads: 954
Joined: May 2006
#8
2024-08-13, 02:35 PM
You probably aren't letting your test recordings finish

2024-08-13 16:21:19.367 [DEBUG][13] No /storage/.kodi/userdata/addon_data/service.nextpvr/config/scripts/PostCancel.sh

create a PostCancel.sh script from your PostProcessing.sh

I am surprised that your script runs from ssh with the leading . and the output filename not set.

Martin
retrofan
Offline

Junior Member

The Netherlands
Posts: 42
Threads: 8
Joined: Aug 2024
#9
2024-08-14, 07:44 AM (This post was last modified: 2024-08-15, 05:48 AM by retrofan.)
(2024-08-13, 02:35 PM)mvallevand Wrote: You probably aren't letting your test recordings finish
2024-08-13 16:21:19.367 [DEBUG][13] No /storage/.kodi/userdata/addon_data/service.nextpvr/config/scripts/PostCancel.sh
create a PostCancel.sh script from your PostProcessing.sh
I am surprised that your script runs from ssh with the leading . and the output filename not set.
Martin

Okay, now in the end I understand.

1. You have to write a script from scratch in the nano text editor directly in LibreElec with SSH

or

2. You have to remove the DOS line endings created by a Windows text editor (which is copied to LibreElec) in SSH with:
dos2unix /storage/.kodi/userdata/addon_data/service.nextpvr/config/scripts/PostProcessing.sh (or other script)

Watch the filename: it must be PostProcessing.sh (Postprocessing.sh or postprocessing.sh isn't the same in Linux).

And it has to be executeable, done with chmod +x PostProcessing.sh

Now it finally works, thanks!

The script is sh and not bash in LibreElec and exit 0 is advised. Included paths for ffpmeg aren't needed.

And never forget to create both PostProcessing.sh and PostCancel.sh in case the scheduled recording is cancelled earlier by the user.

Maybe helpful for the wiki?
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,820
Threads: 954
Joined: May 2006
#10
2024-08-14, 02:55 PM
The different scripts are already documented, but I don't think the NextPVR wiki is the best place to instruct Linux users on how to write batch files or Windows users to write shell scripts, and also why I don't support scripts or ffmpeg in general. Definitely best to test for yourself though

That being said some things to consider in your script, the stdout from scripts are written to the log to help debugging but once that is done you should try and avoid spamming the logs. In this case use -v panic as an input option. For ffmpeg in scripts (especially Windows, but LE does have optional versions of ffmpeg too) you might not want the system default.

Martin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): 1 2 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  NextPVR server on LibreElec jcjefferies 45 3,865 2024-09-16, 04:38 PM
Last Post: mvallevand
  folder location XMLTV file [LibreElec] retrofan 2 477 2024-08-22, 08:32 AM
Last Post: retrofan
  No playback with NextPVR client LibreElec retrofan 6 753 2024-08-17, 03:52 PM
Last Post: mvallevand
  V6 ZIP Fle Location astrid 2 476 2024-01-09, 09:37 AM
Last Post: astrid
  scan tables location?? cdvreede 1 693 2023-06-22, 11:54 AM
Last Post: mvallevand
  LibreElec file locations jcjefferies 24 3,029 2023-01-27, 05:32 PM
Last Post: jcjefferies
  EPG Data Location in Linux kevin-pvr 3 900 2022-12-18, 08:26 PM
Last Post: mvallevand
  [Obsolete] CoreElec and LibreElec as native host for NextPVR mvallevand 47 16,329 2022-11-04, 02:14 AM
Last Post: mvallevand
  How to change user and location of config data? Deihmos 1 777 2022-10-25, 11:39 PM
Last Post: mvallevand
  Clean install - LibreElec, Need NextPVR Backend ElJefe 46 6,900 2022-10-16, 10:55 PM
Last Post: ElJefe

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

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

Linear Mode
Threaded Mode