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

huge memory consumption #104

Closed
msaintauret opened this issue Oct 26, 2020 · 7 comments
Closed

huge memory consumption #104

msaintauret opened this issue Oct 26, 2020 · 7 comments
Labels
question Further information is requested

Comments

@msaintauret
Copy link

since v3.3.0

i got this command :
"C:\Users\X\AppData\Roaming\FFmpeg\bin\ffmpeg.exe" -y -i "E:/tmp/file.mkv" -max_muxing_queue_size 4096 -filter_complex "[0:1][0:4]overlay[subbed];[subbed]scale=1920:-1:flags=lanczos[v]" -map "[v]" -c:v libx265 -pix_fmt yuv420p10le -profile main10 -x265-params ":hdr=1:hdr10=1:hdr-opt=1:hdr10-opt=1:repeat-headers=1:colorprim=bt2020:transfer=smpte2084:colormatrix=bt2020nc:master-display=G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,50):max-cll=1000,530" -crf 20 -preset medium -map_chapters 0 -map 0:0 -metadata:s:1 title="" -metadata:s:1 handler="" -metadata:s:1 language=fre -c:1 copy -map 0:2 -metadata:s:2 title="" -metadata:s:2 handler="" -metadata:s:2 language=eng -c:2 copy -map 0:3 -c:3 copy -disposition:s:3 0 -metadata:s:3 language=fre "E:/tmp/file-fastflix-682f.mkv"

instead of (with v3.0.2) :
"C:\Users\X\AppData\Roaming\FFmpeg\bin\ffmpeg.exe" -y -i "E:/tmp/file.mkv" -max_muxing_queue_size 4096 -map 0:0 -c:v:0 libx265 -pix_fmt yuv420p10le -vf scale=1920:1080:flags=lanczos -profile main10 -x265-params "hdr-opt=1:repeat-headers=1:colorprim=bt2020:transfer=smpte2084:colormatrix=bt2020nc:master-display=G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(40000000,50):max-cll=4897,653" -crf 20 -preset medium -map_chapters 0 -map 0:1 -metadata:s:1 title="VO TrueHD 7.1☺" -metadata:s:1 handler="VO TrueHD 7.1☺" -metadata:s:1 language=eng -c:1 copy -map 0:2 -metadata:s:2 title="VFF AC3" -metadata:s:2 handler="VFF AC3" -metadata:s:2 language=fre -c:2 copy -map 0:3 -c:3 copy -disposition:s:3 0 -metadata:s:3 language=fre -map 0:4 -c:4 copy -disposition:s:4 default -metadata:s:4 language=fre "E:\tmp\file-fastflix-2020-10-26T17.56.10.mkv"

with commands like the first one ffmpeg take about 12 or 13gb of ram (i have 16), and the v3.0.2 commands only use about 1.5gb of ram.

encoding movie 1 failed after 8h, on the last minute (:'() error message was about ram problem
encoding movie 2 failed always at frame 40. with same error message.
both files are around 50 or 60gb

i tried ffmpeg nightly or release but it's same result.

so i'm still using v3.0.2

@cdgriffith cdgriffith added the enhancement Improve existing feature label Oct 26, 2020
@cdgriffith
Copy link
Owner

So I think the issue is now the hdr10-opt is actually taking affect (because x265 changed the name recently from hdr-opt so it wasn't taking affect and being ignored). I will need to add a option to disable that on the quality page.

@msaintauret
Copy link
Author

msaintauret commented Oct 26, 2020

hmm, so i tried that :
"C:\Users\X\AppData\Roaming\FFmpeg\bin\ffmpeg.exe" -y -i "E:/file.mkv" -max_muxing_queue_size 4096 -filter_complex "[0:0][0:6]overlay[subbed];[subbed]scale=1920:-1:flags=lanczos[v]" -map "[v]" -c:v libx265 -pix_fmt yuv420p10le -profile main10 -x265-params "hdr=1:hdr10=1:hdr-opt=1:repeat-headers=1:colorprim=bt2020:transfer=smpte2084:colormatrix=bt2020nc:master-display=G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(40000000,50):max-cll=2105,1007" -crf 20 -preset medium -map_chapters 0 -map 0:1 -metadata:s:1 title="VO TrueHD 7.1" -metadata:s:1 handler="VO TrueHD 7.1" -metadata:s:1 language=eng -c:1 copy -map 0:2 -metadata:s:2 title="VO DTS-HDMA" -metadata:s:2 handler="VO DTS-HDMA" -metadata:s:2 language=eng -c:2 copy -map 0:3 -metadata:s:3 title="VFQ AC3" -metadata:s:3 handler="VFQ AC3" -metadata:s:3 language=fre -c:3 copy -map 0:4 -metadata:s:4 title="VFF AC3" -metadata:s:4 handler="VFF AC3" -metadata:s:4 language=fre -c:4 copy -map 0:5 -c:5 copy -disposition:s:5 0 -metadata:s:5 language=fre "E:/file-fastflix-f1c3.mkv"

but it still use more thant 10gb
and still crash very quickly :

Error while filtering: Cannot allocate memoryme=00:02:03.04 bitrate=7414.3kbits/s speed=0.542x
Failed to inject frame into filter network: Cannot allocate memory
Error while processing the decoded data for stream #0:0
x265 [info]: frame I: 1, Avg QP:24.41 kb/s: 131.39
x265 [info]: frame P: 2, Avg QP:25.00 kb/s: 22.15
x265 [info]: frame B: 8, Avg QP:27.50 kb/s: 17.05
x265 [info]: Weighted P-Frames: Y:0.0% UV:0.0%
x265 [info]: consecutive B-frames: 20.0% 0.0% 0.0% 20.0% 60.0%

encoded 11 frames in 235.25s (0.05 fps), 28.37 kb/s, Avg QP:26.76
Conversion failed!

@cdgriffith
Copy link
Owner

Aha, I think I found the issue. With 3.2.0+ FastFlix will automatically "Burn-in" (aka overlay) forced / default subtitle track which seems to have huge memory impact with some quick testing.

@cdgriffith
Copy link
Owner

Should add, you can go to the "subtitle" panel and make sure there are no tracks with the "Burn In" checkbox selected to test that theory.

@cdgriffith cdgriffith added question Further information is requested and removed enhancement Improve existing feature labels Oct 27, 2020
@msaintauret
Copy link
Author

yes you were right
two subtitles tracks and one with burn in enabled
if i disable it, no crash and no 10gb used

@cdgriffith
Copy link
Owner

Thanks for testing!

This is definitely something outside my realm of control, but I can at least create a FAQ section in the wiki and have details about this, so will keep this ticket open until that is done.

@cdgriffith
Copy link
Owner

Added FAQ section to wiki with reference to this ticket, closing for now. https://github.com/cdgriffith/FastFlix/wiki/Common-questions-and-problems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants