Geekzone: technology news, blogs, forums
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.

118 posts

Master Geek

# 252947 18-Jul-2019 11:42
One person supports this post
Send private message quote this post

So I'll start this off with saying I'm a complete noob when it comes to writing script files, but I'm a quick learner once I know what the hell in doing!!!

I'm starting the process to setup a new Plex media server and plan to use DVR to record live tv.
I want to use the Post-Processing script function on the DVR to reduce file size from a huge .ts file to something like .MP4 or .mkv while keeping quality.
Also want to remove commercials.

I want to test this on my windows PC first before making the jump to get a brand new NAS.

Does anyone use the post processing function and have they got a script I can use?
Also help explain for me how to edit the script file for my settings?

Create new topic
480 posts

Ultimate Geek

  # 2279340 18-Jul-2019 23:54
Send private message quote this post

The "huge .ts file"s from Freeview DVB-T broadcasts are already H.264 encoded, like most .mp4 and .mkv files.  You will lose quality if you try to make them smaller.  In fact, when using lossy compression codecs such as H.264 or H.265, it is impossible to re-encode anything without losing quality, even if you make a file that is bigger than the original.  The "lossy" nature of the codec ensures that each encoding will lose information that was in the original source file.  There is no way around that - it is inherent in how lossy codecs work.  The best solution for having too many huge recording files is simply to buy another big hard drive to store them on.  Hard drives are much cheaper than they used to be, and come in sizes up to 16 Tbytes now.


The only time it makes sense to re-encode to a lower quality is when the display device has a lower quality screen than the source file and you will not see the loss of quality.


It also takes significant processing power to encode video files.  NAS boxes do not normally have powerful CPUs, so they take a while to encode video.  Using CPU power to encode video runs the CPU flat out - and that spends electricity also.  Not a huge amount, but you can calculate how much it will cost you if you put a power meter on the box doing the encoding.


Removing commercials in NZ is quite difficult as our broadcasters do not make it easy to automate finding the boundaries between commercial and programme.  Automated processing fails so often that the only real way to do it is to manually mark the commercial to be cut out.  That is far too time consuming for anyone to want to do it.  But...  There is really no need to cut out commercials, if you have good playback software.  Good software allows you to quickly skip forwards over an ad break until you see programme again, then quickly skip backwards in smaller steps until you see the end of the commercials.  Then you let it play again and see no more than 10 seconds of commercial before the programme starts again.  I have MythTV set up to do this, with the right arrow on my remote skipping forwards 30 s per press, and then when skipping back after having been skipping forwards, the left arrow skips back 10 s per press.  But if I have not been skipping forwards first, the left arrow skips at 30 s per press.  My fingers are so used to doing this that I can skip an ad break and be back to watching programme again within 15 seconds, and usually faster.  Because this sort of software allows you to not see the commercials at all, this sort of skipping is banned in any device or software that is Freeview certified, which is why I will never buy a Freeview certified recording device.

118 posts

Master Geek

  # 2279441 19-Jul-2019 09:10
Send private message quote this post

That's really interesting to know about the broadcasts already being H.264 so encoding to that won't change anything file size wise

I should add that I'm not planning on doing this with Freeview NZ (my Sony TV has pretty basic recording feature and an external HDD connected for that) but I'm planning to record IPTV channels using the Plex DVR.

I've tested and it works on my Windows PC, but just have the huge .TS file to deal with.

I'm ok with letting things take a while to encode cause most of the shows I would record are broadcasts during the day NZ time and so will let it do it's thing while I'm at work.

The end goal is to have recorded TV shows ready to watch when I get home at night (without commercial if possible but can easily fast forward)
With a video file size that's comparable to something you would download.

I'm willing to invest in some decently sized HDD for NAS storage as it see it as a investment for my needs, but obviously I don't wanna waste storage space if I can do something about it.

Create new topic

Twitter and LinkedIn »

Follow us to receive Twitter updates when new discussions are posted in our forums:

Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:

Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:

News »

Major Japanese retailer partners with smart New Zealand technology IMAGR
Posted 14-Oct-2019 10:29

Ola pioneers one-time passcode feature to fight rideshare fraud
Posted 14-Oct-2019 10:24

Spark Sport new home of NZC matches from 2020
Posted 10-Oct-2019 09:59

Meet Nola, Noel Leeming's new digital employee
Posted 4-Oct-2019 08:07

Registrations for Sprout Accelerator open for 2020 season
Posted 4-Oct-2019 08:02

Teletrac Navman welcomes AI tech leader Jens Meggers as new President
Posted 4-Oct-2019 07:41

Vodafone makes voice of 4G (VoLTE) official
Posted 4-Oct-2019 07:36

2degrees Reaches Milestone of 100,000 Broadband Customers
Posted 1-Oct-2019 09:17

Nokia 1 Plus available in New Zealand from 2nd October
Posted 30-Sep-2019 17:46

Ola integrates Apple Pay as payment method in New Zealand
Posted 25-Sep-2019 09:51

Facebook Portal to land in New Zealand
Posted 19-Sep-2019 18:35

Amazon Studios announces New Zealand as location for its upcoming series based on The Lord of the Rings
Posted 18-Sep-2019 17:24

The Warehouse chooses Elasticsearch service
Posted 18-Sep-2019 13:55

Voyager upgrades core network to 100Gbit
Posted 18-Sep-2019 13:52

Streaming service Acorn TV launches in New Zealand with selection with British shows
Posted 18-Sep-2019 08:55

Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.

Support Geekzone »

Our community of supporters help make Geekzone possible. Click the button below to join them.

Support Geezone on PressPatron

Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.