Log in

View Full Version : FFMPEG freezing computer help?


GAP
8th September 2021, 23:38
Can anyone help me FFMPEG freezing on me when I use a command? I am not sure why this happens but it happens when I use a command that it seems to hang on me. I think it might be my build but can anyone help me with this? It does not normally do that and I think it might due to my computer not being very powerful.

StainlessS
9th September 2021, 01:05
Very mysterious, I wonder what that command might be.
[I also wonder what build your ffmpeg might be, and also how 'not powerful' your computer might be, basically, we got no info at all to go on.]

GAP
9th September 2021, 03:00
Here is my current FFMPEG build:

ffmpeg version 2021-09-05-git-a947098558-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 10.3.0 (Rev5, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libglslang --enable-vulkan --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
libavutil 57. 4.101 / 57. 4.101
libavcodec 59. 7.100 / 59. 7.100
libavformat 59. 5.100 / 59. 5.100
libavdevice 59. 0.101 / 59. 0.101
libavfilter 8. 7.101 / 8. 7.101
libswscale 6. 0.100 / 6. 0.100
libswresample 4. 0.100 / 4. 0.100
libpostproc 56. 0.100 / 56. 0.100

Here are the commands I used:


ffmpeg -i input.avi -vf scale=iw*4:ih*4:flags=neighbor,scale=iw*4*6/7:ih*4:flags=lanczos,setsar=0 -c:v libx264 -crf 20 -c:a libvorbis -q:a 10 output.mkv

ffmpeg -i input.avi -c:v libx264 -crf 16 -preset veryslow -bf 16 -rc-lookahead 250 -x264-params "no-dct-decimate=1:no-fast-pskip=1" -me_range 32 -deblock -3:-3 -threads 16 -vf zscale=1920:1080:f=spline36 -c:a copy output.mp4


ffmpeg -i input.avi -c:v libx264 -crf 16 -preset veryslow - rc-lookahead 250 -x264-opts "no-dct-decimate=1:no-fast-pskip=1" -me_range 32 -deblock - 3:-3 -threads 16 -vf zscale=1920:1080:f=spline36 -c:a copy output.mp4

Emulgator
9th September 2021, 07:19
You enabled everything in your build.
Incompatible patches ? System specs ?
If you want someone to test your build, you may want to upload your binaries.
Or start new from vanilla and start from there, enabling only one patch at a time.

GAP
9th September 2021, 16:48
I think got the build the from Gyan dev to replace my old one: https://www.gyan.dev/ffmpeg/builds/packages/ffmpeg-2021-09-05-git-a947098558-full_build.7z

I will try to get a new one from the site and see if I get a different result.

System specs:

Device name *****
Processor Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz 1.80 GHz
Installed RAM 8.00 GB
Device ID 53D6784B-E04E-405E-90BC-FD5A73AE2EBE
Product ID 00325-80136-65388-AAOEM
System type 64-bit operating system, x64-based processor
Pen and touch No pen or touch input is available for this display

Edition Windows 10 Home
Version 21H1
Installed on ‎7/‎28/‎2020
OS build 19043.1165
Experience Windows Feature Experience Pack 120.2212.3530.0

therube
29th September 2021, 20:02
freezing ... hang on me
Does it always freeze or only sometimes?
Is there high CPU usage during this freeze/hang time?

Does it freeze with a more basic copy (or encode) command?

ffmpeg -i test.mp4 -acodec copy -vcodec copy testout.mkv

ffmpeg -i input.avi -c:v libx264 -crf 20 -c:a libvorbis -q:a 10 testout.mkv

Anything "special" with your source files?

Does it freeze with a 1 MB test file?

GAP
7th October 2021, 02:37
Does it always freeze or only sometimes?
Is there high CPU usage during this freeze/hang time?

Does it freeze with a more basic copy (or encode) command?

ffmpeg -i test.mp4 -acodec copy -vcodec copy testout.mkv

ffmpeg -i input.avi -c:v libx264 -crf 20 -c:a libvorbis -q:a 10 testout.mkv

Anything "special" with your source files?

Does it freeze with a 1 MB test file?

It didn't appear to freeze when I used a simpler command for another file. The command I used nearly used all the memory on my computer but I think it was also my build or my laptop needing to be fully operational. I didn't try those commands but I will give those a shot to give you the results.

sp4ce_c0wb0y
10th October 2021, 02:08
Can you define what you mean by "freezing"? Do you have to hard shut off your computer? Is it just unresponsive for a few minutes or while the command is running? Additionally, what are the specs of your computer?

For something you can test right now, download prime95 and run it for benchmarking. If your computer "freezes" in the same way it's probably a hardware issue, not a ffmpeg issue.

GAP
13th October 2021, 02:53
Can you define what you mean by "freezing"? Do you have to hard shut off your computer? Is it just unresponsive for a few minutes or while the command is running? Additionally, what are the specs of your computer?

System specs:

Device name *****
Processor Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz 1.80 GHz
Installed RAM 8.00 GB
Device ID 53D6784B-E04E-405E-90BC-FD5A73AE2EBE
Product ID 00325-80136-65388-AAOEM
System type 64-bit operating system, x64-based processor
Pen and touch No pen or touch input is available for this display

Edition Windows 10 Home
Version 21H1
Installed on ‎7/‎28/‎2020
OS build 19043.1165
Experience Windows Feature Experience Pack 120.2212.3530.0

It seemed to hang when I put it that command although some people told me that the command itself might be flawed. It might because I had kept it on without properly shutting it down for a long time as it seemed to work better when I restart it. When I put in that command, it seemed to "freeze" the computer in place although it might due to the command and not restarting the computer for a long time.

For something you can test right now, download prime95 and run it for benchmarking. If your computer "freezes" in the same way it's probably a hardware issue, not a ffmpeg issue.

I will try that to see if what you suggested is true.

Asmodian
13th October 2021, 10:30
It sounds like you simply ran out of memory and your system basically stopped responding. If you press ctrl-alt-del when it is "locked up" what happens?

-threads 16 is too many for your CPU, try 4 or 8.

GAP
19th October 2021, 01:41
It sounds like you simply ran out of memory and your system basically stopped responding. If you press ctrl-alt-del when it is "locked up" what happens?

-threads 16 is too many for your CPU, try 4 or 8.
Okay. As for the other script with two resizes?

Asmodian
19th October 2021, 04:44
It likely just gets too big and you run out of memory. Is that 16x upscale intentional?!

How much memory is being used when you run it? Task Manager performance tab would show it (ctrl-shift-esc).

sp4ce_c0wb0y
20th October 2021, 17:54
So looking at your specs (sorry I missed them being posted earlier) it seems like you've got a laptop. That's not great and could be overheating.

Additionally as others have said 16 threads is too high (8 would be your max, as your CPU only has 8 threads, but I wouldn't use that flag at all on your machine).

You still haven't really said what you had to do after it froze. Did you just wait some minutes and then it was fine or Did you have to hold the power button down to shut it off? Did it freeze immediately when you started the commands or was it okay for the first few minutes?

GAP
22nd October 2021, 22:36
You still haven't really said what you had to do after it froze. Did you just wait some minutes and then it was fine or Did you have to hold the power button down to shut it off? Did it freeze immediately when you started the commands or was it okay for the first few minutes?

At first I tried to use CTRL+ALT+DELETE to get the Task Manager before I could get it open and even then I couldn't really do anything. I eventually restarted my computer via pressing the power button my machine and I stopped using the script after awhile.

sp4ce_c0wb0y
2nd November 2021, 06:46
At first I tried to use CTRL+ALT+DELETE to get the Task Manager before I could get it open and even then I couldn't really do anything. I eventually restarted my computer via pressing the power button my machine and I stopped using the script after awhile.

If it froze completely like that I'm inclined to say it's a hardware issue. Since I think you're using a laptop (mobile CPU in your specs) I would make sure it's adequately cleaned and cooled (air vents/intake aren't blocked). Maybe run memtest. Did prime95 freeze your computer?

GAP
25th November 2021, 18:52
If it froze completely like that I'm inclined to say it's a hardware issue. Since I think you're using a laptop (mobile CPU in your specs) I would make sure it's adequately cleaned and cooled (air vents/intake aren't blocked). Maybe run memtest. Did prime95 freeze your computer?

No it did not. It did not freeze my computer and you were right it was a hardware issue.

therube
3rd December 2021, 20:10
and you were right it was a hardware issue
The cause?

GAP
6th December 2021, 13:03
The cause?

It looks the problem was with the command I used as someone pointed out int he thread. It seems like the command I used froze up the computer.

Edit: I did not restart my computer as it was on for a very long time and I had not restarted it properly to make the programs function well.