Is there a way to dictate settings for 'Convert Video While Recording' for DVR? Current settings are too high for me

Server Version#: 1.25.3.5409
Player Version#: N/A
Tuner Make/Model: HD Home Run Flex Duo

I have 12GB RAM in my Plex Server (Running Ubuntu 18.4), of that 8GB is my RAM disk for transcoding.

When I try and use DVR features, for longer episodes, 8GB of RAM disk is not enough. For example today I tried to DVR Saturday Night Live, which is 90 minutes. At around 75 minutes into the show my ramdisk was full (reached 8GB), it got to 100 Megs free and started freeing some chunks. The problem is that those chunks are I think part of the current show being DVRd. So when the show ended, it corrupted it and I got the dreaded error ‘Could Not Move Recorded Media to Destination’. And transcode folder was empty (as soon as it ended), nothing in transcode folder that was a second ago 8GB and nothing in destination folder. poof gone. When I record smaller shows (an hour or less) there are no problems. Ramdisk fills up to some percentage under 100%, then show ends and its emptied as the show is moved to its final destination. No issues at all (aside from a 30 min show taking atrocious 1.2GB even after transcoding).

I tried turning off Transcode while recording, but that made it even worse. DVR was still putting it into ramdisk but at a much faster rate.

The thing is, I dont need my shows at 1080p, or even 720p, I am perfectly happy with having these things Ill have on in the background at 480p, downmixed to 2 channels AAC 94kbps. Which would make that 90 minute SNL episode around 400 megs.

Is there a way for me to edit some file somewhere to change these encode settings to lower them? Id like to at least achieve 2 hours since that would cover most movies/events/shows.

Alternative is of course to drop some money on more RAM, but that seems like an extreme solution considering for everything else PLEX never exceeds 30% RAM for me.

Another solution would be to be able to point to a new Transcode directory for DVR specifically. From what i understand right now I have to change it globally. And seeing how most of the things that are streamed from my server are transcoded it will kill my SSD fast. But Id be willing to use it for transcoding DVR specific stuff since thats maybe a few times a week.

So, in summary (these are in descending order of preference):

  1. Is there a way for me to change the settings for ‘Convert Video While Recording’? Even setting resolution and framerate 480/24 would be great. Or just a simple Quality setting with a decent range, from equivalent CQ 25 to CQ 18

  2. Is there a way to utilize multiple transcode directories? Once one is full, another is used temporarily? So primary would be RAM, secondary would be SSD.

  3. If not, is there a way for me to set a different transcode directory for DVR only?

  4. If not, is there a way for PLEX to like chop up the show into 2 parts or more every hour?

  5. If none of these are possible. Is there a plan to include any of these? It seems like exposing transcode options would be a very easy thing to do. There is already a postprocessing script option. But unfortunately my issue happens before that stage. It would be nice if that script could be configured to override default setting and happen in realtime (ffmpeg).

Thanks!

Sampling from current Transcoded video output. For my needs 6.6 Megabit bitrate, 5.1 surround and 60FPS are complete overkill. If I could configure it Id do 1Megabit, 2ch, 24fps:

Format                      : MPEG-TS
File size                   : 1.40 GiB
Duration                    : 30 min 0 s
Overall bit rate mode       : Variable
Overall bit rate            : 6 667 kb/s

Video
ID                          : 256 (0x100)
Menu ID                     : 1 (0x1)
Format                      : AVC
Format/Info                 : Advanced Video Codec
Format profile              : Main@L3.2
Format settings             : CABAC / 4 Ref Frames
Format settings, CABAC      : Yes
Format settings, Reference  : 4 frames
Codec ID                    : 27
Duration                    : 30 min 0 s
Bit rate                    : 5 755 kb/s
Width                       : 1 280 pixels
Height                      : 720 pixels
Display aspect ratio        : 16:9
Frame rate mode             : Variable
Color space                 : YUV
Chroma subsampling          : 4:2:0
Bit depth                   : 8 bits
Scan type                   : Progressive
Stream size                 : 1.21 GiB (86%)
Writing library             : x264 core 161
Encoding settings           : cabac=1 / ref=2 / deblock=1:0:0 / analyse=0x1:0 / me=hex / subme=1 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=4 / chroma_me=1 / trellis=1 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=9 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=1 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=10 / rc=crf / mbtree=1 / crf=16.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00

Audio #1
ID                          : 257 (0x101)
Menu ID                     : 1 (0x1)
Format                      : AC-3
Format/Info                 : Audio Coding 3
Commercial name             : Dolby Digital
Codec ID                    : 129
Duration                    : 30 min 1 s
Bit rate mode               : Constant
Bit rate                    : 384 kb/s
Channel(s)                  : 6 channels
Channel layout              : L R C LFE Ls Rs
Sampling rate               : 48.0 kHz
Frame rate                  : 31.250 FPS (1536 SPF)
Compression mode            : Lossy
Delay relative to video     : -617 ms
Stream size                 : 82.4 MiB (6%)
Language                    : English
Service kind                : Complete Main

Audio #2
ID                          : 258 (0x102)
Menu ID                     : 1 (0x1)
Format                      : AC-3
Format/Info                 : Audio Coding 3
Commercial name             : Dolby Digital
Codec ID                    : 129
Duration                    : 30 min 1 s
Bit rate mode               : Constant
Bit rate                    : 192 kb/s
Channel(s)                  : 2 channels
Channel layout              : L R
Sampling rate               : 48.0 kHz
Frame rate                  : 31.250 FPS (1536 SPF)
Compression mode            : Lossy
Delay relative to video     : -617 ms
Stream size                 : 41.2 MiB (3%)
Language                    : Spanish
Service kind                : Complete Main

Text #1
ID                          : 256 (0x100)-CC1
Menu ID                     : 1 (0x1)
Format                      : EIA-608
Muxing mode                 : SCTE 128 / DTVCC Transport
Muxing mode, more info      : Muxed in Video #1
Duration                    : 30 min 0 s
Bit rate mode               : Constant
Stream size                 : 0.00 Byte (0%)
CaptionServiceName          : CC1

Text #2
ID                          : 256 (0x100)-CC3
Menu ID                     : 1 (0x1)
Format                      : EIA-608
Muxing mode                 : SCTE 128 / DTVCC Transport
Muxing mode, more info      : Muxed in Video #1
Duration                    : 30 min 0 s
Bit rate mode               : Constant
Stream size                 : 0.00 Byte (0%)
CaptionServiceName          : CC3

Text #3
ID                          : 256 (0x100)-1
Menu ID                     : 1 (0x1)
Format                      : EIA-708
Muxing mode                 : SCTE 128 / DTVCC Transport
Muxing mode, more info      : Muxed in Video #1
Duration                    : 30 min 0 s
Bit rate mode               : Constant
Stream size                 : 0.00 Byte (0%)

Text #4
ID                          : 256 (0x100)-3
Menu ID                     : 1 (0x1)
Format                      : EIA-708
Muxing mode                 : SCTE 128 / DTVCC Transport
Muxing mode, more info      : Muxed in Video #1
Duration                    : 30 min 0 s
Bit rate mode               : Constant
Stream size                 : 0.00 Byte (0%)

Menu
ID                          : 4096 (0x1000)
Menu ID                     : 1 (0x1)
Duration                    : 30 min 0 s
List                        : 256 (0x100) (AVC) / 257 (0x101) (AC-3, English) / 258 (0x102) (AC-3, Spanish)
Language                    :  / English / Spanish
Service name                : Service01
Service provider            : FFmpeg
Service type                : digital television

and this is from non converted, note its about half the duration but about same size.

Format                      : MPEG-TS
File size                   : 1.23 GiB
Duration                    : 17 min 10 s
Overall bit rate mode       : Variable
Overall bit rate            : 10.3 Mb/s
Law rating                  : TV-PG

Video
ID                          : 256 (0x100)
Menu ID                     : 1 (0x1)
Format                      : MPEG Video
Format version              : Version 2
Format profile              : Main@High
Format settings             : CustomMatrix / BVOP
Format settings, BVOP       : Yes
Format settings, Matrix     : Custom
Format settings, GOP        : Variable
Format settings, picture st : Frame
Codec ID                    : 2
Duration                    : 17 min 10 s
Bit rate mode               : Variable
Bit rate                    : 9 290 kb/s
Maximum bit rate            : 17.6 Mb/s
Width                       : 1 920 pixels
Height                      : 1 080 pixels
Display aspect ratio        : 16:9
Active Format Description   : Full frame 16:9 image
Frame rate                  : 29.970 (30000/1001) FPS
Color space                 : YUV
Chroma subsampling          : 4:2:0
Bit depth                   : 8 bits
Scan type                   : Interlaced
Scan order                  : Top Field First
Compression mode            : Lossy
Bits/(Pixel*Frame)          : 0.149
Time code of first frame    : 15:37:37;25
Time code source            : Group of pictures header
GOP, Open/Closed            : Open
Stream size                 : 1.11 GiB (90%)

Audio #1
ID                          : 257 (0x101)
Menu ID                     : 1 (0x1)
Format                      : AC-3
Format/Info                 : Audio Coding 3
Commercial name             : Dolby Digital
Codec ID                    : 129
Duration                    : 17 min 10 s
Bit rate mode               : Constant
Bit rate                    : 384 kb/s
Channel(s)                  : 6 channels
Channel layout              : L R C LFE Ls Rs
Sampling rate               : 48.0 kHz
Frame rate                  : 31.250 FPS (1536 SPF)
Compression mode            : Lossy
Delay relative to video     : -56 ms
Stream size                 : 47.2 MiB (4%)
Language                    : English
Service kind                : Complete Main

Audio #2
ID                          : 258 (0x102)
Menu ID                     : 1 (0x1)
Format                      : AC-3
Format/Info                 : Audio Coding 3
Commercial name             : Dolby Digital
Codec ID                    : 129
Duration                    : 17 min 10 s
Bit rate mode               : Constant
Bit rate                    : 96.0 kb/s
Channel(s)                  : 2 channels
Channel layout              : L R
Sampling rate               : 48.0 kHz
Frame rate                  : 31.250 FPS (1536 SPF)
Compression mode            : Lossy
Delay relative to video     : -88 ms
Stream size                 : 11.8 MiB (1%)
Language                    : Spanish
Service kind                : Complete Main

Text #1
ID                          : 256 (0x100)-CC1
Menu ID                     : 1 (0x1)
Format                      : EIA-608
Muxing mode                 : A/53 / DTVCC Transport
Muxing mode, more info      : Muxed in Video #1
Duration                    : 17 min 10 s
Bit rate mode               : Constant
Stream size                 : 0.00 Byte (0%)
CaptionServiceName          : CC1

Text #2
ID                          : 256 (0x100)-CC3
Menu ID                     : 1 (0x1)
Format                      : EIA-608
Muxing mode                 : A/53 / DTVCC Transport
Muxing mode, more info      : Muxed in Video #1
Duration                    : 17 min 10 s
Bit rate mode               : Constant
Stream size                 : 0.00 Byte (0%)
CaptionServiceName          : CC3

Text #3
ID                          : 256 (0x100)-1
Menu ID                     : 1 (0x1)
Format                      : EIA-708
Muxing mode                 : A/53 / DTVCC Transport
Muxing mode, more info      : Muxed in Video #1
Duration                    : 17 min 10 s
Bit rate mode               : Constant
Stream size                 : 0.00 Byte (0%)

Text #4
ID                          : 256 (0x100)-2
Menu ID                     : 1 (0x1)
Format                      : EIA-708
Muxing mode                 : A/53 / DTVCC Transport
Muxing mode, more info      : Muxed in Video #1
Duration                    : 17 min 10 s
Bit rate mode               : Constant
Stream size                 : 0.00 Byte (0%)

Text #5
ID                          : 256 (0x100)-3
Menu ID                     : 1 (0x1)
Format                      : EIA-708
Muxing mode                 : A/53 / DTVCC Transport
Muxing mode, more info      : Muxed in Video #1
Duration                    : 17 min 10 s
Bit rate mode               : Constant
Stream size                 : 0.00 Byte (0%)

Text #6
ID                          : 256 (0x100)-4
Menu ID                     : 1 (0x1)
Format                      : EIA-708
Muxing mode                 : A/53 / DTVCC Transport
Muxing mode, more info      : Muxed in Video #1
Duration                    : 17 min 10 s
Bit rate mode               : Constant
Stream size                 : 0.00 Byte (0%)

Text #7
ID                          : 256 (0x100)-5
Menu ID                     : 1 (0x1)
Format                      : EIA-708
Muxing mode                 : A/53 / DTVCC Transport
Muxing mode, more info      : Muxed in Video #1
Duration                    : 17 min 10 s
Bit rate mode               : Constant
Stream size                 : 0.00 Byte (0%)

Text #8
ID                          : 256 (0x100)-6
Menu ID                     : 1 (0x1)
Format                      : EIA-708
Muxing mode                 : A/53 / DTVCC Transport
Muxing mode, more info      : Muxed in Video #1
Duration                    : 17 min 10 s
Bit rate mode               : Constant
Stream size                 : 0.00 Byte (0%)

Menu
ID                          : 4096 (0x1000)
Menu ID                     : 1 (0x1)
Duration                    : 17 min 10 s
List                        : 256 (0x100) (MPEG Video) / 257 (0x101) (AC-3, English) / 258 (0x102) (AC-3, Spanish)
Language                    :  / English / Spanish
Service name                : Service01
Service provider            : FFmpeg
Service type                : digital television
Law rating                  : TV-PG


  1. No.
  2. No.
  3. No.
  4. No.
  5. Plex would have to weigh in on this one.

There are existing feature suggestions for variations on 2 and 3, though none seem to be very popular:

Why even use a RAM disk? I don’t see how it’s even needed. For my Plex DVR I use a PC with a 10th Gen core i3 CPU with 8GB of RAM. I use a 1TB NVMe drive for my Plex install location. Then I also use the 1TB NVMe drive for my News program Folder. And then a 4TB platter drive for my Movies and sports folders. And a 6TB platter drive for my TV show folder.
I can have nine HD shows and one UHD show recording concurrently and I have zero issues. I have no need for a RAM disk,

RAM disk is mostly used to reduce wear and tear on SSD’s which have writes before failure rated at around 100TB. Thats using up all of spare cells on the NAND, meaning cells start failing well before 100TB.

You said 9 HD shows and 1 UHD show, in raw DVR format thats roughly ~100GB per hour. At that rate your SSD’s NAND is getting an insane workout. If you do that every day thats 100000/100 = 1000 days before pretty much guaranteed failure. ~3 years.

Platter drives, not an issue, but they are slow-ish.

RAM disk is the perfect solution, faster than SSD as it sits right on the BUS, and no wear and tear.

If it were configurable Id set my primary transcode location on RAM disk, why not? that RAM is just sitting idle anyways. And secondary transcode location to a platter drive in case more space is needed.

Now, above are rough numbers from back of the napkin, of course you dont do 10 streams per day for an hour each (probably less?), not all streams are transcoded (some play natively?), and some SSDs have a bit higher endurance. But again, remember that endurance accounts for relocating sectors, meaning things start failing well before endurance benchmark. In fact higher endurance drives start failing at the same time as lower ones, they just have more spares to use for relocation. But the point is that its unneeded wear and tear.

Thats my reasoning behind using RAM disk. Not because other means cant cope, they totally can. But that RAM is just sitting there, doing nothing.

Another factor is power, your RAM is using a fraction of what a platter drive at ~10Watts uses.

That is why I use the Samsung drives. In my use, they have always lasted well beyond what they are specified for. I’ve been using an old Sasmung 840 Evo 1TB SSD, since September 2014, in my Blue Iris machine. For my fifteen IP cameras. It has been reading and writing 24/7/365 continuously for almost 7.5 years now. It’s still chugging along with no issues. Constantly writing the streams from the fifteen cameras and constantly reading the files to push onto an auxiliary SSD.

I’ve only been using NVMe drives though since 2018. And those ten concurrent recordings were just a test. That would not be normal. But I am recording forty to fifty shows every day with my Plex DVR. But the 1TB Samsung NVMe(970 Evo Plus) I am using has an endurance rating of 600 TBW. Along with a five year warranty.

1 Like

Every OS is automatically using unused RAM as file read/write cache. The more RAM you are assigning to your RAM drive, the lesser file cache is available.

Its a Plex server (on Linux headless server), OS is just idling outside of Plex. Besides while mounted on tmpfs the OS can still access any RAM that is currently unused by the Ram Disk. So unless Ram Disk actually needs full 10GB of RAM that I have dedicated to RAM disk, the OS can still use as much as it needs. Meaning this is an absolute best move in efficiency. RAM can fulfill both functions, as OS cache and as RAM disk up to the entire size of RAM.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.