NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Information Community Announcements v
« Previous 1 2 3 4 5 … 56 Next »
MCEBuddy 2.x Guide To Convert .TS To .MP4

 
  • 0 Vote(s) - 0 Average
MCEBuddy 2.x Guide To Convert .TS To .MP4
rimmon1971
Offline

Junior Member

Posts: 5
Threads: 0
Joined: Mar 2017
#31
2017-03-09, 12:44 PM
I understand that this thread is quite old, I just didn't find the "tuned" config file attached to it.
Anyway, I need to fire up MCEBuddy (the paid version) inside NPVR's PostProcessing.bat script, so that:
- the original .ts recording will be converted to .mp4 with the same name in the same directory (no fancy renaming) not containing commercials (via ShowAnalyzer)
- the subtitles will be extracted on a .srt file in the same directory
- the original .ts recording will be removed (maybe archived, it feels like safer)

I have several recording directories, say F:\Movies, F:\TVshows, F:\TVseries and when I configure a new recording I'm choosing in advance the output destination according to the show category, so I need that the .mp4 files will be generated in the same directory of the original .ts

Thanks in advance!
Graham
Offline

Posting Freak

UK
Posts: 4,057
Threads: 102
Joined: Dec 2005
#32
2017-03-09, 12:59 PM
You have probably found these but just in case ...

NextPVR passes values to the batch files ... http://www.nextpvr.com/nwiki/pmwiki.php?...Files#toc5

nscripthelper.exe can be used in batch files to update the database ... http://forums.nextpvr.com/showthread.php...post471110
rimmon1971
Offline

Junior Member

Posts: 5
Threads: 0
Joined: Mar 2017
#33
2017-03-09, 01:18 PM
Graham Wrote:You have probably found these but just in case ...

NextPVR passes values to the batch files ... http://www.nextpvr.com/nwiki/pmwiki.php?...Files#toc5

Yes, I've got the example PostProcessing.bat and UpdateEPG.bat in place, thank you anyway.

Graham Wrote:nscripthelper.exe can be used in batch files to update the database ... http://forums.nextpvr.com/showthread.php...post471110

This is a great suggestion, thank you!

If I recall correctly, however, if NPVR records Somefile.ts and it gets replaced by Somefile.mp4 the latter shows up under "Recordings" without any need of tinkering with the database, is it correct?

Maybe nscripthelper could be helpful if I decide to let MCEbuddy perform some custom renaming, like from Someshow.ts to Someshow\Season 1\Someshow - S1 - Ep4.mp4.
Graham
Offline

Posting Freak

UK
Posts: 4,057
Threads: 102
Joined: Dec 2005
#34
2017-03-09, 03:02 PM
rimmon1971 Wrote:If I recall correctly, however, if NPVR records Somefile.ts and it gets replaced by Somefile.mp4 the latter shows up under "Recordings" without any need of tinkering with the database, is it correct?

No. This is not correct. The lists in Recordings are lists of the records from the database. For example, I archive recordings to a NAS unit that is switched off during the day. The recordings on the NAS are still listed in Recordings but I get an error if I try to play one of the recordings while the NAS is switched off.

My understanding is that each process requires two steps ... Step 1) Perform a function on a file e.g. Copy file from one folder to another. ... Step 2) Use nscripthelper to update the database e.g. nscripthelper -rename "old" "new"
snagglewest
Offline

Senior Member

VA USA
Posts: 361
Threads: 60
Joined: Jul 2011
#35
2017-03-09, 04:31 PM
MCBuddy is a stand alone program, it doesn't get called from your PostProcessing.bat script. MCBuddy monitors the recording directory directly and once it sees a completed recording it then runs whatever profile you select.

The monitored directory are selected in the "monitor locations tab, which can be your NPVR recording directory. The profile you want to run is then set in the conversion tasks. So if you want MCBuddy to monitor your recording directory set the monitor location as NPVRs location it records to. For example, Recorded_TV is where NPVR is set to record to on my system. I covert everything to .mp4 and delete the original .TS file to save space. To tell MCBuddy were to save and how to name files use the "enable custom file renaming" check box and a path of "\Recorded_TV\%showname%\%showname%.S%season%##E%episode%##.%episodename%>>" in the location box. This replicates NPVRs naming and folder structure 99% of the time. In the off chance it misses, then I just rename the file correctly and move it to the original/correct location. The only time I have an issue is if it's a really strange show. Masterpiece theater gets me now and then but the network shows are spot on 99.999% of the time.

If you want to then move or delete the original .TS file you can modify or make a new profile in profiles.conf located at C:\Program Files\MCEBuddy2x\config. Here's an example of what I use for SHMBO's soap operas. Once MCBuddy is done converting them to a .mp4 it deleted the original .ts file.

Code:
[MP4 Soaps]
Description=Fast MP4 (H.264/AAC) conversion.  Fastest conversion but lower quality, more sensitive to errors in the source video.
order=handbrake,ffmpeg
ffmpeg-general=-threads 0
ffmpeg-video=-ss 3 -vcodec libx264 -b 1000k -x264opts cabac=0:ref=2:bframes=1:weightp=0:8x8dct=0:trellis=0:subq=6:me=hex:b-adapt=0:threads=auto -map 0:v -sn
ffmpeg-audio=-acodec libfdk_aac -ab 128k -cutoff 18000 -map 0:a
ffmpeg-audioac3=-acodec libfdk_aac -ab 160k -cutoff 18000 -map 0:a
ffmpeg-ext=.mp4
ffmpeg-audiodelay=skip
handbrake-general=--loose-anamorphic --verbose=2 -f mp4 -O
handbrake-video=--start-at duration:3 -e x264 -b 1000 -x cabac=0:ref=2:bframes=1:weightp=0:8x8dct=0:trellis=0:subq=6:me=hex:b-adapt=0:threads=auto
handbrake-audio=-E faac -R auto -B 128 -D 0 -a 1,2,3,4,5
handbrake-audioac3=-E faac -R auto -B 160 -D 0 -a 1,2,3,4,5
handbrake-ext=.mp4
handbrake-audiodelay=skip
PreConversionCommercialRemover=true
AutoDeinterlace=false
PostCustomCommandPath=C:\mcebuddy\DeleteOriginal.bat
PostCustomCommandParameters=""%sourcefile%""
PostCustomCommandHangPeriod=10
PostCustomCommandCritical=false
PostCustomCommandUISession=false
PostCustomCommandShowWindow=false

If NPVR sees a new file with the exact same name but a different extension, say test.ts vs test.mp4, it automatically updates the database and points to the correct file name. You don't' need to do anything special, it's automatic. Just make sure you put the new file in the directory before you delete the old .ts.

If you want to get really fancy, I have MCBuddy monitor the recording directory for movies, sports events and TV shows. It then selects were to save them to based on the show type. TV shows stay in the NPVR recording directory, movies get moved to the NAS and sporting events get moved to a 3rd location.

Here's the path in my main conversion profile if you're interested:
Code:
%ismovie%<\Movies_hold\%showname% (%airyear%),%issport%<\Sports\%showname%.%episodename%.%recordyear%-%recordmonth%-%recordday%,\Recorded_TV\%showname%\%showname%.S%season%##E%episode%##.%episodename%>>

rimmon1971 Wrote:I understand that this thread is quite old, I just didn't find the "tuned" config file attached to it.
Anyway, I need to fire up MCEBuddy (the paid version) inside NPVR's PostProcessing.bat script, so that:
- the original .ts recording will be converted to .mp4 with the same name in the same directory (no fancy renaming) not containing commercials (via ShowAnalyzer)
- the subtitles will be extracted on a .srt file in the same directory
- the original .ts recording will be removed (maybe archived, it feels like safer)

I have several recording directories, say F:\Movies, F:\TVshows, F:\TVseries and when I configure a new recording I'm choosing in advance the output destination according to the show category, so I need that the .mp4 files will be generated in the same directory of the original .ts

Thanks in advance!
NextPVR V6.1.5.231022 - Ubuntu 22.04 VM / 4 core / 8Gb memory
HDHR Prime X2 / HDFX-2 /Schedule Direct / 2X Pi4 + & 3X Pi3 LibreELEC Kodi clients
Server - TrueNAS/ SuperMicro MBD-X10SL7-F MB / Xeon E3-1246 / 32Gb Unbuffered ECC / 8 X 4TB RAIDZ2
rimmon1971
Offline

Junior Member

Posts: 5
Threads: 0
Joined: Mar 2017
#36
2017-03-10, 12:46 PM
snagglewest Wrote:MCBuddy is a stand alone program, it doesn't get called from your PostProcessing.bat script. MCBuddy monitors the recording directory directly and once it sees a completed recording it then runs whatever profile you select.

Actually, the donator version of MCEBuddy has a .UserCLI. executable that can be invoked from within PostProcessing.bat.

snagglewest Wrote:If you want to get really fancy, I have MCBuddy monitor the recording directory for movies, sports events and TV shows. It then selects were to save them to based on the show type. TV shows stay in the NPVR recording directory, movies get moved to the NAS and sporting events get moved to a 3rd location.

Here's the path in my main conversion profile if you're interested:
Code:
%ismovie%<\Movies_hold\%showname% (%airyear%),%issport%<\Sports\%showname%.%episodename%.%recordyear%-%recordmonth%-%recordday%,\Recorded_TV\%showname%\%showname%.S%season%##E%episode%##.%episodename%>>

This is very interesting, thank you! Of course, it should be tested because I'm not sure that here in Italy the TV shows types are so easily recognizable by NPVR.
TeleFragger
Offline

Member

Posts: 109
Threads: 13
Joined: Mar 2016
#37
2017-03-10, 03:27 PM
snagglewest Wrote:MCBuddy is a stand alone program, it doesn't get called from your PostProcessing.bat script. MCBuddy monitors the recording directory directly and once it sees a completed recording it then runs whatever profile you select.

The monitored directory are selected in the "monitor locations tab, which can be your NPVR recording directory. The profile you want to run is then set in the conversion tasks. So if you want MCBuddy to monitor your recording directory set the monitor location as NPVRs location it records to. For example, Recorded_TV is where NPVR is set to record to on my system. I covert everything to .mp4 and delete the original .TS file to save space. To tell MCBuddy were to save and how to name files use the "enable custom file renaming" check box and a path of "\Recorded_TV\%showname%\%showname%.S%season%##E%episode%##.%episodename%>>" in the location box. This replicates NPVRs naming and folder structure 99% of the time. In the off chance it misses, then I just rename the file correctly and move it to the original/correct location. The only time I have an issue is if it's a really strange show. Masterpiece theater gets me now and then but the network shows are spot on 99.999% of the time.

If you want to then move or delete the original .TS file you can modify or make a new profile in profiles.conf located at C:\Program Files\MCEBuddy2x\config. Here's an example of what I use for SHMBO's soap operas. Once MCBuddy is done converting them to a .mp4 it deleted the original .ts file.

Code:
[MP4 Soaps]
Description=Fast MP4 (H.264/AAC) conversion.  Fastest conversion but lower quality, more sensitive to errors in the source video.
order=handbrake,ffmpeg
ffmpeg-general=-threads 0
ffmpeg-video=-ss 3 -vcodec libx264 -b 1000k -x264opts cabac=0:ref=2:bframes=1:weightp=0:8x8dct=0:trellis=0:subq=6:me=hex:b-adapt=0:threads=auto -map 0:v -sn
ffmpeg-audio=-acodec libfdk_aac -ab 128k -cutoff 18000 -map 0:a
ffmpeg-audioac3=-acodec libfdk_aac -ab 160k -cutoff 18000 -map 0:a
ffmpeg-ext=.mp4
ffmpeg-audiodelay=skip
handbrake-general=--loose-anamorphic --verbose=2 -f mp4 -O
handbrake-video=--start-at duration:3 -e x264 -b 1000 -x cabac=0:ref=2:bframes=1:weightp=0:8x8dct=0:trellis=0:subq=6:me=hex:b-adapt=0:threads=auto
handbrake-audio=-E faac -R auto -B 128 -D 0 -a 1,2,3,4,5
handbrake-audioac3=-E faac -R auto -B 160 -D 0 -a 1,2,3,4,5
handbrake-ext=.mp4
handbrake-audiodelay=skip
PreConversionCommercialRemover=true
AutoDeinterlace=false
PostCustomCommandPath=C:\mcebuddy\DeleteOriginal.bat
PostCustomCommandParameters=""%sourcefile%""
PostCustomCommandHangPeriod=10
PostCustomCommandCritical=false
PostCustomCommandUISession=false
PostCustomCommandShowWindow=false

If NPVR sees a new file with the exact same name but a different extension, say test.ts vs test.mp4, it automatically updates the database and points to the correct file name. You don't' need to do anything special, it's automatic. Just make sure you put the new file in the directory before you delete the old .ts.

If you want to get really fancy, I have MCBuddy monitor the recording directory for movies, sports events and TV shows. It then selects were to save them to based on the show type. TV shows stay in the NPVR recording directory, movies get moved to the NAS and sporting events get moved to a 3rd location.

Here's the path in my main conversion profile if you're interested:
Code:
%ismovie%<\Movies_hold\%showname% (%airyear%),%issport%<\Sports\%showname%.%episodename%.%recordyear%-%recordmonth%-%recordday%,\Recorded_TV\%showname%\%showname%.S%season%##E%episode%##.%episodename%>>

dude this is awesome...

i have to figure this out...

right now i record stuff and mcebuddy (paid) moves mp4 to my plex server... however i leave the .ts behind... but my problem is if something is a movie vs show.. it goes to plex/tv shows then i need to move it out...

thx for this!!!! gonna look at it this weekend...
TeleFragger
Offline

Member

Posts: 109
Threads: 13
Joined: Mar 2016
#38
2017-03-10, 03:30 PM
also im going to start from page 1 and read through.. but a question..

i record a show for the wife.. yeah the wife... The Home and Family
1.5h show... ends up as a 4gb .ts file. I convert it to an mp4 1080i and it ends up being 9gb!!!!!
rimmon1971
Offline

Junior Member

Posts: 5
Threads: 0
Joined: Mar 2017
#39
2017-03-10, 03:52 PM
TeleFragger Wrote:also im going to start from page 1 and read through.. but a question..

i record a show for the wife.. yeah the wife... The Home and Family
1.5h show... ends up as a 4gb .ts file. I convert it to an mp4 1080i and it ends up being 9gb!!!!!

Are you sure that the original .TS is a 1080 source? Which conversion profile are you using? MP4 Normal?
snagglewest
Offline

Senior Member

VA USA
Posts: 361
Threads: 60
Joined: Jul 2011
#40
2017-03-10, 05:05 PM
Of course, you're absolutely correct. It just adds a level of complexity though that kinda defeats the purpose of a stand alone program but to each his own.

You can do the same thing with native ffmpeg and a few lines of code too. But for me at least, I found MCB is faster and easier to setup and not having to write batch files, which I don't enjoy one bit, is a huge plus! Yea, I know... MCB uses ffmpeg (and handbrake too) but I don't have to deal with it at the code level Smile

rimmon1971 Wrote:Actually, the donator version of MCEBuddy has a .UserCLI. executable that can be invoked from within PostProcessing.bat.
NextPVR V6.1.5.231022 - Ubuntu 22.04 VM / 4 core / 8Gb memory
HDHR Prime X2 / HDFX-2 /Schedule Direct / 2X Pi4 + & 3X Pi3 LibreELEC Kodi clients
Server - TrueNAS/ SuperMicro MBD-X10SL7-F MB / Xeon E3-1246 / 32Gb Unbuffered ECC / 8 X 4TB RAIDZ2
« 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
  Schedules Direct AU and NZ guide data now available. rkulagow 10 6,712 2016-09-03, 04:29 AM
Last Post: djmorgan
  Modified TV Guide for large 10' Interface Screens Lao Pan 0 1,607 2015-08-30, 07:03 AM
Last Post: Lao Pan
  I-xmltv: TV Guide customization & Zap2It EPG utility. Jim_ 304 93,714 2007-09-18, 02:20 PM
Last Post: lrf2005
  New Plugin: TV Listings (TV Guide Replacement) alibert 47 15,081 2006-12-30, 09:52 AM
Last Post: alibert
  GB-PVR On Toms Hardware Guide lajams 10 4,910 2006-04-27, 10:55 PM
Last Post: Lucas_24
  GPVR PVR-150 / Dish Network Guide rampy 1 2,066 2005-06-02, 03:04 AM
Last Post: sub
  3D looking TV Guide Torque 0 1,974 2005-04-30, 06:21 PM
Last Post: Torque

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

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

Linear Mode
Threaded Mode