#Reliable distortion after X frames (h265), smaller portions work

1 messages · Page 1 of 1 (latest)

tough mango
#

Hey all. Love this thing. I render my YouTube outros using this, works great. However: after 250 frames, I get horrible distortion. Here's a sequence rendered with remotion render OutroBasics out/BASICS/ --sequence --image-format=png --frames=0-449

If I instead render < 250 frames at a time, it works fine, using remotion render OutroBasics out/BASICS/ --sequence --image-format=png --frames=250-449 to fill in the gaps.

This is also remedied entierly by using h264 videos instead of h265. Maybe I'm rendering something weird that's upsetting remotion

The distortion appears in

const frame = useCurrentFrame();
  const backgroundBloom = interpolate(
    frame,
    [0, 291, 301, 331, 336, 370, 449],
    [1, 1, 3, 1, 1, 2.2, 1],
  );

...

<OffthreadVideo
        src={staticFile("Particles-190.mp4")}
        style={{
          position: "absolute",
          zIndex: 0,
          top: 0,
          left: 0,
          width: 2560,
          height: 1440,
          filter: `saturate(${backgroundBloom})`,
          opacity: backgroundFade,
        }}
      />

This only seems to happen with h265 videos.

I've attached both the h264 and h265 versions labelled accordingly

#

1 is problem h265 video, 2 is h264 video

#

Reliable distortion after X frames (h265), smaller portions work

odd hinge
#

I see yes it is

tough mango
#

I do also see the bottom 1/3 of the background video is black, but rerendering just that frame, or frames around it fixes it. Super weird behaviour. I get this using the x264 video. I'm not sure what I should render as for maximum compatability. This is also past the 250 frame mark.

I have the same original video I downloaded from pixabay a while ago, and it's in AVC format. I have consistently had no issues with this video, so it's strange to see such ewird inconsistencies happen

odd hinge
#

@tough mango can I use the h265 and commit it to our testbed for regression testing?

tough mango
#

absolutely. I'm pushing the code minus api keys and stuff in a moment. Will link :)

odd hinge
tough mango
#

Cool. Just didn't know if you could get the issue on your side too

odd hinge
tough mango
#

Sounds good. I did render using NVENC in Premiere Pro, using the plugin Voukoder. It essentially gives me FFMPEG level of control over renders. Would not be surprised if the issue is with my settings there.

odd hinge
tough mango
#

That's fantastic news. Thanks for the quick work :)

tough mango
#

I just swapped the ffmpeg.exe for mine, which doesn't have enable-small and I'm getting the same issue. I assume everything will hopefully be fixed next update :)

However - The black bottom 1/3 which just needs the frame to be rerendered with --frames=23-23 for example, the same way as fixing the pixel glitches, do you know if this should be fixed as well?

This also happens > 250 frames into rendering

odd hinge
tough mango
#

Using the normal x264 video I still get some 1/3 missing, just with no massive corruption
Still need to rerender these frames individually

#

Do I just add --verbose? I'm adding and testing with --log=verbose now

#

h264 (only the black 1/3 issue)

Normal frames:

Rendered 46/450
Rendered 47/450
 compositor  Got packet dts = Some(24000) pts = Some(24000) key = false
 compositor  received frame true
 compositor  Got packet dts = Some(25000) pts = Some(25000) key = false
 compositor  received frame true
 compositor  Got packet dts = Some(26000) pts = Some(26000) key = false
 compositor  received frame true
 compositor  Got packet dts = Some(27000) pts = Some(27000) key = false
 compositor  received frame true
 compositor  [FFmpeg] w:2560 h:1440 pixfmt:yuv420p tb:1/30000 fr:0/1 sar:1/1 csp:unknown range:unknown

Rendered 48/450
Rendered 49/450
 compositor  [FFmpeg] w:2560 h:1440 pixfmt:yuv420p tb:1/30000 fr:0/1 sar:1/1 csp:unknown range:unknown

After 250, with issues:

Rendered 326/450
Rendered 327/450
 compositor  Got packet dts = Some(164000) pts = Some(164000) key = false
 compositor  received frame true
 compositor  Got packet dts = Some(165000) pts = Some(165000) key = false
 compositor  received frame true
 compositor  Got packet dts = Some(166000) pts = Some(166000) key = false
 compositor  received frame true
 compositor  Got packet dts = Some(167000) pts = Some(167000) key = false
 compositor  received frame true
 compositor  [FFmpeg] w:2560 h:1440 pixfmt:yuv420p tb:1/30000 fr:0/1 sar:1/1 csp:unknown range:unknown

 chrome  [0121/164851.713:ERROR:tile_manager.cc(980)] WARNING: tile memory limits exceeded, some content may not draw
 chrome  [0121/164851.714:ERROR:tile_manager.cc(980)] WARNING: tile memory limits exceeded, some content may not draw
 chrome  [0121/164851.825:ERROR:tile_manager.cc(980)] WARNING: tile memory limits exceeded, some content may not draw
 chrome  [0121/164851.825:ERROR:tile_manager.cc(980)] WARNING: tile memory limits exceeded, some content may not draw
Rendered 328/450
 chrome  [0121/164851.930:ERROR:tile_manager.cc(980)] WARNING: tile memory limits exceeded, some content may not draw
 chrome  [0121/164851.931:ERROR:tile_manager.cc(980)] WARNING: tile memory limits exceeded, some content may not draw
 chrome  [0121/164852.030:ERROR:tile_manager.cc(980)] WARNING: tile memory limits exceeded, some content may not draw
 chrome  [0121/164852.030:ERROR:tile_manager.cc(980)] WARNING: tile memory limits exceeded, some content may not draw
Rendered 329/450
 compositor  [FFmpeg] w:2560 h:1440 pixfmt:yuv420p tb:1/30000 fr:0/1 sar:1/1 csp:unknown range:unknown

 chrome  [0121/164852.246:ERROR:tile_manager.cc(980)] WARNING: tile memory limits exceeded, some content may not draw
 chrome  [0121/164852.246:ERROR:tile_manager.cc(980)] WARNING: tile memory limits exceeded, some content may not draw
 chrome  [0121/164852.359:ERROR:tile_manager.cc(980)] WARNING: tile memory limits exceeded, some content may not draw
 chrome  [0121/164852.359:ERROR:tile_manager.cc(980)] WARNING: tile memory limits exceeded, some content may not draw
Rendered 330/450
 chrome  [0121/164852.464:ERROR:tile_manager.cc(980)] WARNING: tile memory limits exceeded, some content may not draw
 chrome  [0121/164852.464:ERROR:tile_manager.cc(980)] WARNING: tile memory limits exceeded, some content may not draw
 chrome  [0121/164852.563:ERROR:tile_manager.cc(980)] WARNING: tile memory limits exceeded, some content may not draw
 chrome  [0121/164852.564:ERROR:tile_manager.cc(980)] WARNING: tile memory limits exceeded, some content may not draw
Rendered 331/450
 compositor  [FFmpeg] w:2560 h:1440 pixfmt:yuv420p tb:1/30000 fr:0/1 sar:1/1 csp:unknown range:unknown
#

So it seems the 1/3 black issue is causesd by [0121/164851.713:ERROR:tile_manager.cc(980)] WARNING: tile memory limits exceeded, some content may not draw after 250-300 frames
I have 128GB RAM in my system so this should not at all be an issue with hardware

#

The above was with --concurrency=1
Removing this I still get the same WARNING: tile memory limits exceeded, some content may not draw above frame 327

#

As for the broken h265 video. I get the following (Frame 251 is where the issue reliably start):

odd hinge
#

@tough mango

for the h.265, my investigation is ongoing, will post updates in the issue
unfortunately I cannot seem to build ffmpeg anymore, might have to downgrade to resolve the issue

#

@tough mango for the tile memory issue, thanks for bringing that up, that sounds indeed like we should handle it

we could restart the browser tab if it occurs

could you try something for me? in node_modules/@remotion/renderer/dist/open-browser.js, could you try adding --force-gpu-mem-available-mb=4096 to the long list of browser flags?

I am considering adding this flag to remotion

tough mango
#

I found the same argument but searching through the code myself I couldn't find a place a to put it. Looks like it was right under my nose. Testing now.

#

At most the chrome-headless-shell used 450MB during the render, but it worked perfectly. No more missing parts of frames and no more error spam. Tested with concurrency=1

#

Without concurrency=1 it still works without errors now. This fixed the issue.