Record to something other than mpg, OR post transcode to mp4 on a Mac?

As others have said, it isn’t an MPG vs MP4 issue, it is a file size/network transfer issue. if you made MPG files the same size as the MP4 files, i bet you would not have a problem

Over-the-air HD in the US is about 18 Mbps, per channel after overhead, and with most channels dividing this among 1-2 sub-channels, the actual bandwidth of and individual recording is less. I first started recording MPEG-2 on ATA-100 drives almost a decade ago. You have some type of hardware or networking limitation.

if you are on a 1000 Mbps ethernet network, 18 Mbps will barely be a blip.

if you are on a wireless then you have to worry about latency & all sorts of issues that will affect the streaming higher bandwidth video.

Automatic transcoding is a dire necessity. This was one of my first draws to SageTV back in '08/'09 when ATSC first was rolling out in the US. Video is already transcoded for iOS, etc, so i do not understand the delay in transcode & replace…

EDIT
personally, i stream, over 802.11/n, ATSC MPEG-2 recordings everyday & have no issues with playback at all.

1 Like

Unfortunately I no longer have the original file that was giving me issues. However, subsequent recordings of the same series and quality (‘River Monsters’ in HD) have played ok, providing I play them via Channels DVR and not through Plex.

There was definitely something wrong with the original file but, for now, I’m filing it under ‘one of those things’.

My belief that it is an mpg/mp4 issues is simply that mpg by itself plays poorly (in Plex) whereas mp4’s of the same file (transcoded using Handbrake’s Apple TV 1080p preset) play absolutely fine.

I’d be interested to know if Channels is using its own mpg decoder, or whether it’s relying on ATV’s inbuilt abilities (as Plex does).

My network is wireless 802.11ac. The NAS is on a wired segment and connected to the Airport basestation via a gigabit switch. I’ve had no issues streaming full-res Bluray mp4 files via Plex, so I’m reasonably sure that bandwidth isn’t an issue.

To sum up this rather rambling post (sorry!): currently I think this is a non-issue. I’d certainly prefer to use Plex as my interface as I like having all my content under one app, but it’s no biggie. I may still look into that auto-transcode Applescript idea, but purely as an interesting exercise.

Thanks for all the input folks.

1 Like

Is there any updates on transcode & replace functionality for the DVR?

Not right now. There are numerous other projects ahead of that. You should know that we want it too though! So it’s still on our list.

Has this made it any closer to the top of the list?

A decade ago, before the automated re-encoding flows on SageTV, we could re-encode outside SageTV & via Finder drop it in the recordings directory with the same file name as the original & SageTV would recognize it.

Something like that would even be great with Channels, ie Channels being able to associate files re-encoded with Handbrake, etc but named the same.

Is re-encoding of existing recordings to a more efficient CODEC still "on the list"

...I ask as i approach 12 TB of MPEG-2 files :slight_smile:

2 Likes

That's one of the big problems I see with this product as well. It's an absolute disk pig. At the very least a nightly conversion to mp4 should be added in. Two days of DVRing sets off space alerts on my cache drives. I don't need a 100tb nas. Not yet. But I will if I keep using Channels.

1 Like

Just wanting to bump this one up, see where it stands. The MPEG2 streams are absolute disk hogs. With quicksync capable hardware so cheap these days it would be nice to see transcode to disk.

I'm not looking to push to plex or anything, I'm making an effort to make channels the only interface the fam sees to simplify.

I process all recordings with mmcbudy that moves them to the import folder then do a pruned command to remove from the recorded database. Seems to work good so far. You should be able to setup something similar using ffmpeg.

1 Like

I just want to see something similar in place in Channels.

Now that i can import non-recorded media, transcoding is the one thing i still really miss from SageTV circa 10 years ago.

Does anyone have any other methodology of re-encoding MPEG 2 recordings while keeping them in the Channels system?

Most of my recordings are still MPEG-2 OTA, so they are ridiculously large compared to MP4.

I would really love to just be able to drop them in Handbrake & have Channels still recognize the recording.

You have 2 options: transcode to H.264, but store it in a container with an .mpg file extension, and Channels will find it fine; or you can transcode and store in a container of your choice, and use Channels' local content imports system.

3 Likes

Has anyone ever actually got this script to work?
Every time I use it HandbrakeCLI claims it cannot understand the content:

[13:34:46] hb_scan: path=*.mpg, title_index=1

disc.c:333: failed opening UDF image *.mpg

disc.c:437: error opening file BDMV/index.bdmv

disc.c:437: error opening file BDMV/BACKUP/index.bdmv

bluray.c:2646: nav_get_title_list(*.mpg/) failed

[13:34:46] bd: not a bd - trying as a stream/file instead

libdvdread: Encrypted DVD support unavailable.

libdvdread: Can't stat *.mpg

No such file or directory

libdvdread: Could not open *.mpg

libdvdnav: vm: failed to open/read the DVD

[13:34:46] dvd: not a dvd - trying as a stream/file instead

[13:34:46] hb_stream_open: open *.mpg failed

[13:34:46] scan: unrecognized file type

[13:34:46] libhb: scan thread found 0 valid title(s)

This is for basic over the air (MPEG2 TS) content that Handbrake clearly DOES understand, because opening the same content in the GUI app allows one to transcode it as expected.
This problem still exists as of HandbrakeCLI 1.4.2

Has there been any update in regards to transcoding stored recordings?

I just updated my server (it pretty much runs without any concern, recording everything i need OTA) and i realized, once again, that i could have about 2x more recordings in the same disk space if the .mpg streams would convert to .mp4

1 Like

Just a small correction, you seem to be confusing video containers and video codecs. A .mpg and .mp4 can store any type of codec. If you are wanting a way to transcode from MPEG-2 to H.264/5 you are going to have to do that with handbrake, ffmpeg or other transcoding software, which is going to be very a processor intensive task.
You could remux all the videos with ffmpeg to .mp4 but that wouldn't save you any space.

Only way to get a mp4 file is to use Handbrake or FFMPEG to convert. They've been feature requests for container options but they've been denied since mpg is preferred due to most streams being MPEG2.

They are ways to queue up recordings for conversion on a Mac (Tdarr, Fileflows, Unmanic) which makes things easier.

Actually Channels DVR saves recordings to an mpeg transport stream container.
The recorded source could have any number of video codecs, mpeg2, h.264, h.265, etc.

The filename extension .mpg is just what they chose for a recording filename extension. Doesn't mean it's an mpeg file. It actually should be .ts.

2 Likes

The DVR saves the raw video/audio data in whatever codec it receives. It is only MPEG2 / AC3 if it comes from a ATSC1.0 OTA HDHR station. Most TVE is h.264 / AAC. And ATSC 3.0 is h.265 / AC4.

For whatever reason, the Channels devs choose .mpg as their container format.
You can change that to .ts, .mp4, .mkv, etc with various programs, without re-encodeing/converting the the video. This is called remuxing.

ffmpeg (command line) can do it. (google how to use this)
ShanaEncoder (copy preset)
MKVToolnix GUI (import file, it exports as .mkv)

Various other tools can accomplish a remux....

If you want to convert the video to another codec format, like h.264 to h.265, this requires re-encodeing and will result in loss of image quality, and take much cpu/gpu resources, depending on what settings u use.

Not, not confusing them, just being lazy in my typing.

I’ve mostly grown frustrated that Channels doesn’t have anything in place for re-encoding recordings for space savings.

I started using SageTV in 2006, when ATSC over the air transmission came to Philadelphia (USA)

MPEG-2 HD was gigantic, especially given the hard drive sizes of 17 years ago. But we could run Comskip, auto edit the commercials out & re-encode into H.264 & replace the original recording.

newer CODECs won’t show much of an improvement in space savings, but the majority (almost all) of my recordings are still coming via my trusty 50 year old antenna on the roof aimed @ the Roxborough antenna farm (line of sight, maybe five miles) https://billypenn.com/2015/10/05/those-giant-antennas-in-roxborough-the-secret-home-of-philadelphia-broadcasting-on-tv-and-radio/

1 Like

If u want something like that, then Plex, Emby, Jellyfin has such feature.

Would be nice if Channels had such a feature, but don't think that is on their to do list for now.