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

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.

I went with Channels specifically for the OTA recording when Google bought SageTV & killed it.

Plex, Myth & others are good, but Channels, like Sage, offers a much better non-tech end user experience for kids, spouses, older people - the set top boxes were bulletproof & easy to implement.

I just want Channels to recognize recordings by file name, so i can change the container & CODEC to anything (this, i believe, is how SageTV functioned - take the OTA MPEG-2 to h.264, keep the file name the same & it recognized it in the library)

You can do that.
Remux or Transcode the Channels DVR recording and overwrite the Channels DVR recorded file with it. Just keep the same filename and extension Channels recorded to and Channels will use it.

If you do that you should Refresh Metadata and Regenerate Video Index on the recording.

I do that for recordings I remove commercials from and use a windows command script to mark the recording as having no commercials, refresh the metadata to pickup the new duration and to regenerate the video index.

Just started using FileFlows and it has been working well. Does anyone know how to refresh the metadata and regenerate the video index via a web hook?

Your answers are right above in the previous message from @chDVRuser. :wink:

As my wife would say, I used my man eyes...
Thank you!