NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Legacy (v4.x and earlier) v
« Previous 1 … 199 200 201 202 203 … 433 Next »
Batch file auto run after a recording finishes?

Batch file auto run after a recording finishes?
GrimLoke
Offline

Junior Member

Posts: 9
Threads: 3
Joined: Nov 2014
#1
2014-11-30, 07:06 PM
I have my recordings set to: D:\DVR

Inside I created rename.bat: forfiles /S /M *.ts /C "cmd /c rename @file @fname.mpg"

I was wondering if I could get NextPVR to auto run this batch file after it finishes a recording.

My Blu-Ray player can't see the .ts files from my server but if I rename them .mpg it can see the files and play them. This way I can use my Blu-Ray player to watch my recordings in another room. Thanks for any help.
cbgifford
Offline

Member

Posts: 189
Threads: 20
Joined: Aug 2014
#2
2014-11-30, 07:19 PM (This post was last modified: 2014-11-30, 07:23 PM by cbgifford.)
GrimLoke Wrote:I have my recordings set to: D:\DVR

Inside I created rename.bat: forfiles /S /M *.ts /C "cmd /c rename @file @fname.mpg"

I was wondering if I could get NextPVR to auto run this batch file after it finishes a recording.

My Blu-Ray player can't see the .ts files from my server but if I rename them .mpg it can see the files and play them. This way I can use my Blu-Ray player to watch my recordings in another room. Thanks for any help.

Check out http://www.nextpvr.com/nwiki/pmwiki.php?...BatchFiles for the quick answer to your question. However, when you rename them, you won't be able to watch them on your NPVR box. You could set up a media directory in NPVR and part of the rename process, move them to that directory but then you loose the organization of the recordings menus. Food for thought...
Chris


Server - Intel Core I3-3210 @ 3.40GHz - 8 GB RAM - Windows 10.0 Pro - Total Storage - 5.4 TB
Two Silicondust HD Prime CC capture, 6 tuners total
Client - Intel Core I3-3210 @3.2GHz - 4GB Ram - Windows 7.0 Pro
Client - Intel Core I3-3210 @2.9GHz - 4GB Ram - Windows 10.0 Pro
NAS - Intel Core I3-3220T @ 2.8GHz - 4GB RAM - Windows 10.0 Pro (Total Storage - 25 TB)


GrimLoke
Offline

Junior Member

Posts: 9
Threads: 3
Joined: Nov 2014
#3
2014-11-30, 08:26 PM
cbgifford Wrote:Check out http://www.nextpvr.com/nwiki/pmwiki.php?...BatchFiles for the quick answer to your question. However, when you rename them, you won't be able to watch them on your NPVR box. You could set up a media directory in NPVR and part of the rename process, move them to that directory but then you loose the organization of the recordings menus. Food for thought...

Thanks. When attempting to play the recording within NextPVR's recording menu I get a black screen. Like you said its unplayable from its location. Its fine for my setup though. I'm only using NextPVR as a PVR back end for XBMC/Kodi.

Just tried a recording and it worked. Luckily it doesn't alter an ongoing recordings file name so no conflicts. Big Grin
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,909
Threads: 956
Joined: May 2006
#4
2014-11-30, 08:45 PM
The problem here is you are renaming a ts file to mpg tells NextPVR that it is a mpeg-ps file and leaves it to you to configure Windows video playback defaults to play it properly. Your default decoder will first think it mpeg-ps format and if it can't adapt to the fact that it is a mpeg-ts container you will have problems. It's probably are safer to remux from mpeg-ts to mpeg-ps rather than just renaming.

Martin
GrimLoke
Offline

Junior Member

Posts: 9
Threads: 3
Joined: Nov 2014
#5
2014-11-30, 09:00 PM
mvallevand Wrote:The problem here is you are renaming a ts file to mpg tells NextPVR that it is a mpeg-ps file and leaves it to you to configure Windows video playback defaults to play it properly. Your default decoder will first think it mpeg-ps format and if it can't adapt to the fact that it is a mpeg-ts container you will have problems. It's probably are safer to remux from mpeg-ts to mpeg-ps rather than just renaming.

Martin

What could I use to auto remux after it finished a recording?
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,909
Threads: 956
Joined: May 2006
#6
2014-11-30, 09:13 PM
ffmpeg -i foobar.ts -acodec copy -vcodec copy foobar.mpg

Martin
GrimLoke
Offline

Junior Member

Posts: 9
Threads: 3
Joined: Nov 2014
#7
2014-11-30, 10:25 PM (This post was last modified: 2014-11-30, 11:40 PM by GrimLoke.)
mvallevand Wrote:ffmpeg -i foobar.ts -acodec copy -vcodec copy foobar.mpg

Martin

How would I use that? Sorry I don't have a clue about command line. I found the script to change file names online.

-edit-
I've got it down to this:

D:
cd DVR
forfiles /S /M *.ts /C "cmd /c ffmpeg -i *.ts -acodec copy -vcodec copy @fname.mpg"
forfiles /S /M *.ts /C "cmd /c DEL @file @fname.ts"

But it requires a copy of ffmpeg in each folder with a .ts file.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,909
Threads: 956
Joined: May 2006
#8
2014-11-30, 11:22 PM (This post was last modified: 2014-11-30, 11:38 PM by mvallevand.)
Sorry I shouldn't have jumped in, I normally don't help out on the actually transcoding and remuxing since I think it is best to use players that support NextPVR files.

First you need to install ffmpeg and point to it using the full directory and path information in your script, the ffmpeg with NextPVR is too old.

foobar.ts is the parameter that you used as the source you used in your rename batch

foobar.mpg would be the destination on your rename batch.

Hopefully others will be more helpful.

Martin
cbgifford
Offline

Member

Posts: 189
Threads: 20
Joined: Aug 2014
#9
2014-12-01, 12:24 AM
GrimLoke Wrote:How would I use that? Sorry I don't have a clue about command line. I found the script to change file names online.

-edit-
I've got it down to this:

D:
cd DVR
forfiles /S /M *.ts /C "cmd /c ffmpeg -i *.ts -acodec copy -vcodec copy @fname.mpg"
forfiles /S /M *.ts /C "cmd /c DEL @file @fname.ts"

But it requires a copy of ffmpeg in each folder with a .ts file.

Put FFMpeg somewhere in your path statement or specify ffmpeg with a fully qualified path. I would Google for more information
Chris


Server - Intel Core I3-3210 @ 3.40GHz - 8 GB RAM - Windows 10.0 Pro - Total Storage - 5.4 TB
Two Silicondust HD Prime CC capture, 6 tuners total
Client - Intel Core I3-3210 @3.2GHz - 4GB Ram - Windows 7.0 Pro
Client - Intel Core I3-3210 @2.9GHz - 4GB Ram - Windows 10.0 Pro
NAS - Intel Core I3-3220T @ 2.8GHz - 4GB RAM - Windows 10.0 Pro (Total Storage - 25 TB)


GrimLoke
Offline

Junior Member

Posts: 9
Threads: 3
Joined: Nov 2014
#10
2014-12-01, 01:17 AM
cbgifford Wrote:Put FFMpeg somewhere in your path statement or specify ffmpeg with a fully qualified path. I would Google for more information

That worked. Thanks. Smile

D:
cd DVR
forfiles /S /M *.ts /C "cmd /c D:\DVR\ffmpeg.exe -i *.ts -acodec copy -vcodec copy @fname.mpg"
forfiles /S /M *.ts /C "cmd /c DEL @file @fname.ts"

Attempting to play back the remuxed .mpg file on the blu ray player skips horribly though. The simple rename trick plays back smooth. I tried to use the latest version of ffmpeg to see if that would fix the issue but I get this error:
*.ts: Invalid argument

I'm guessing they changed the commands for the newer versions.
« 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
  Recording movies / TV to XBMC directory stucture spinnaker 10 3,489 2024-06-03, 03:56 AM
Last Post: Rod Hutchinson
  Not recording errors vidwiz 4 953 2024-04-17, 05:39 PM
Last Post: mvallevand
  Add Series/Episode Info to Recording Metadata andrewj 2 1,035 2023-11-20, 03:42 PM
Last Post: sub
  incorrect frequency in adelaide .ini file spin35 5 2,990 2023-02-01, 05:40 PM
Last Post: sub
  Recording to a network drive woes. 2leftfeet 12 7,147 2022-04-05, 08:03 PM
Last Post: mvallevand
  device needed for recording David209 2 1,721 2021-04-04, 08:47 AM
Last Post: David209
  PC not going to sleep after recording LeoL 7 3,228 2021-04-01, 07:17 PM
Last Post: Handy.Man
  HDHomerun recording bizzarely not working Jean0987654321 3 2,014 2021-03-27, 03:23 PM
Last Post: Jean0987654321
  Auto Update EPG not running as scheduled? BairStrokes 2 1,710 2021-03-26, 12:02 PM
Last Post: NumberFive
  ts file shows length too long? SuttonWillow 2 1,887 2021-03-15, 01:56 PM
Last Post: mvallevand

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

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

Linear Mode
Threaded Mode