Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transcoding is not working on Edge and Chrome, on FF works but - with lots of macroblocking #1288

Open
galandilias opened this issue Sep 11, 2024 · 1 comment
Labels
needs triage To be triaged

Comments

@galandilias
Copy link

galandilias commented Sep 11, 2024

Describe the bug

I am playing with transcoding in my setup, and results are somewhat disturbing. Depending on the client I get proper results or definitely not...

All tests I run are on local network.

  • Android memories app - works - I get proper streaming, rather no macroblocking artifacts
  • Windows 11 FireFox (latest version) - starts properly the stream, then most likely runs into macroblocking artifacts, however happens that whole video gets played fine
  • Windows 11 Chrome (latest version) - starts properly the stream then stops after couple of seconds, but in the logs I see complete cycle of transcoding executed:
2024/09/11 20:32:27 3wdlf58ivep0-1080p: /usr/bin/ffmpeg -loglevel warning -hwaccel cuda -i /somepath/nextcloud/userx/files/somevid.mp4 -copyts -fflags +genpts -vf "format=nv12|cuda,hwupload,scale_cuda=force_original_aspect_ratio=decrease:passthrough=0:w=1920:h=1920" -map "0:v:0" "-c:v" h264_nvenc -preset p6 -tune ll -rc vbr -rc-lookahead 30 -cq 24 -map "0:a:0?" "-c:a" aac -ac 1 -start_number 0 -avoid_negative_ts disabled -f hls -hls_flags split_by_time -hls_time 3 -hls_segment_type mpegts -hls_segment_filename /tmp/go-vod/ocp1guza5guk/3wdlf58ivep0-1086897133/1080p-%06d.ts -force_key_frames "expr:gte(t,n_forced*3)" -
2024/09/11 20:32:27 3wdlf58ivep0-480p: recv 480p-000001.ts
2024/09/11 20:32:28 3wdlf58ivep0-480p: recv 480p-000002.ts
2024/09/11 20:32:29 3wdlf58ivep0-1080p: recv 1080p-000000.ts
2024/09/11 20:32:29 3wdlf58ivep0-480p: recv 480p-000003.ts
2024/09/11 20:32:30 3wdlf58ivep0-1080p: recv 1080p-000001.ts
2024/09/11 20:32:30 3wdlf58ivep0-480p: recv 480p-000004.ts
2024/09/11 20:32:30 3wdlf58ivep0-480p: goal satisfied: 4
2024/09/11 20:32:31 3wdlf58ivep0-1080p: recv 1080p-000002.ts
2024/09/11 20:32:32 3wdlf58ivep0-1080p: recv 1080p-000003.ts
2024/09/11 20:32:33 3wdlf58ivep0-1080p: recv 1080p-000004.ts
2024/09/11 20:32:33 3wdlf58ivep0-1080p: goal satisfied: 4
2024/09/11 20:32:39 3wdlf58ivep0-1080p: resuming transcoding
2024/09/11 20:32:40 3wdlf58ivep0-1080p: recv 1080p-000005.ts
2024/09/11 20:32:41 3wdlf58ivep0-1080p: recv 1080p-000006.ts
2024/09/11 20:32:42 3wdlf58ivep0-1080p: recv 1080p-000007.ts
2024/09/11 20:32:42 3wdlf58ivep0-1080p: recv 1080p-000008.ts
2024/09/11 20:32:42 3wdlf58ivep0-1080p: goal satisfied: 8
2024/09/11 20:32:47 3wdlf58ivep0-1080p: resuming transcoding
2024/09/11 20:32:47 3wdlf58ivep0-1080p: recv 1080p-000009.ts
2024/09/11 20:32:48 3wdlf58ivep0-1080p: recv 1080p-000010.ts
2024/09/11 20:32:49 3wdlf58ivep0-1080p: recv 1080p-000011.ts
2024/09/11 20:32:49 3wdlf58ivep0-1080p: recv 1080p-000012.ts
2024/09/11 20:32:49 3wdlf58ivep0-1080p: goal satisfied: 12
2024/09/11 20:33:00 3wdlf58ivep0-1080p: resuming transcoding
2024/09/11 20:33:00 3wdlf58ivep0-1080p: recv 1080p-000013.ts
2024/09/11 20:33:01 3wdlf58ivep0-1080p: recv 1080p-000014.ts
2024/09/11 20:33:01 3wdlf58ivep0-1080p: recv 1080p-000015.ts
2024/09/11 20:33:24 3wdlf58ivep0-480p: stopping stream
2024/09/11 20:33:59 3wdlf58ivep0-1080p: stopping stream
2024/09/11 20:34:59 3wdlf58ivep0: destroying manager
2024/09/11 20:34:59 3wdlf58ivep0-480p: stopping stream
2024/09/11 20:34:59 3wdlf58ivep0-720p: stopping stream
2024/09/11 20:34:59 3wdlf58ivep0-1440p: stopping stream
2024/09/11 20:34:59 3wdlf58ivep0-1080p: stopping stream
2024/09/11 20:34:59 3wdlf58ivep0-max: stopping stream
  • Windows 11 Edge (latest version) - starts the stream, then stops after couple of seconds and in the logs I get CUDA_ERROR_OUT_OF_MEMORY
2024/09/11 20:25:34 9ca61zat7y60-max: /usr/bin/ffmpeg -loglevel warning -ss 33.000000 -hwaccel cuda -i /somepath/nextcloud/userx/files/somevid.mp4 -copyts -fflags +genpts -vf "format=nv12|cuda,hwupload,scale_cuda=force_original_aspect_ratio=decrease:passthrough=0" -map "0:v:0" "-c:v" h264_nvenc -preset p6 -tune ll -rc vbr -rc-lookahead 30 -cq 24 -map "0:a:0?" "-c:a" aac -ac 1 -start_number 11 -avoid_negative_ts disabled -f hls -hls_flags split_by_time -hls_time 3 -hls_segment_type mpegts -hls_segment_filename /tmp/go-vod/ocp1guza5guk/9ca61zat7y60-1086897133/max-%06d.ts -force_key_frames "expr:gte(t,n_forced*3)" -
2024/09/11 20:25:35 ffmpeg-error: [AVHWDeviceContext @ 0x5595eb7b5440] cu->cuMemAlloc(&data, size) failed -> CUDA_ERROR_OUT_OF_MEMORY: out of memory
2024/09/11 20:25:35 ffmpeg-error: [vf#0:0 @ 0x5595eb758f40] Error while filtering: Cannot allocate memory
2024/09/11 20:25:35 ffmpeg-error: Failed to inject frame into filter network: Cannot allocate memory
2024/09/11 20:25:35 ffmpeg-error: Error while filtering: Cannot allocate memory
2024/09/11 20:25:35 ffmpeg-error: [h264_nvenc @ 0x5595eb78e2c0] Failed locking bitstream buffer: invalid param (8):
2024/09/11 20:25:35 ffmpeg-error: [vost#0:0/h264_nvenc @ 0x5595eb7b5080] Error submitting video frame to the encoder

ffmpeg commands from the log file executed by hand directly in the terminal of course lead to no error at all.

Any ideas?

Steps To Reproduce

Just play the videos back.

Platform

- OS: Windows 11 (client), Android 10 (client), Gentoo (server)
- Browser: Chrome, Edge, Firefox - all latest versions
- Memories Version: 7.3.1
- built-in go-vod
- Nextcloud Version: 29.0.6
- PHP Version: 8.1
- ffmpeg-6.1.1-r8

Nvidia P620

+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.107.02             Driver Version: 550.107.02     CUDA Version: 12.4     |
+-----------------------------------------+------------------------+----------------------+

Screenshots

No response

Additional context

  • Any errors in the JS console?
  • Any errors in the Nextcloud server logs?
@galandilias galandilias added the needs triage To be triaged label Sep 11, 2024
@galandilias
Copy link
Author

I have just tried same playback on jellyfin (also nvenc) and there no problems on any browser - gotta be sth with go-vod

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage To be triaged
Projects
None yet
Development

No branches or pull requests

1 participant