Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER for Video Editing/Mangling

Reply
 
Thread Tools Display Modes
Old 11-27-2019, 04:22 PM   #1
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 9,186
Default VLC decoder uses considerably more RAM than ffmpeg

I noticed that with the project I'm currently working on which contains only video items and jpg's, when I use ffmpeg as decoder it (according to Task Manager) consumes ~1GB, while with VLC it consumes ~4.7GB.

Is this whopping difference normal/expected?

using ffmpeg:


same project using VLC:


Video info (same item):
using ffmpeg:


using VLC:


(I only have 8 GB installed, so Windows warned me about running low on RAM when using VLC, that's how I noticed.)

Last edited by nofish; 11-27-2019 at 04:32 PM.
nofish is offline   Reply With Quote
Old 11-27-2019, 10:04 PM   #2
JamesPeters
Human being with feelings
 
JamesPeters's Avatar
 
Join Date: Aug 2011
Location: Near a big lake
Posts: 2,762
Default

When I used Windows I noticed sometimes using VLC as the decoder would make Reaper unresponsive after loading a video until things "settled", but I didn't think about RAM use being the culprit. I switched to FFMPEG at that time. (I'm using Linux now and just settled on FFMPEG as the decoder for Reaper since VLC didn't work as a decoder when I first got Linux set up.)

There is a preference in VLC player which I wonder about: "preload MKV files in the same directory" (under "input/codecs", "files"). If this setting also applies when using VLC as a decoder in Reaper, and you have MKV files in the same directory as whatever video you're loading, that might explain the extra RAM use.
__________________
http://petersamplification.com
Using REAPER for Linux
JamesPeters is offline   Reply With Quote
Old 11-28-2019, 05:44 AM   #3
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 9,186
Default

Thanks for the reply.
No MKV files in use (neither in that project nor in the same directory as the other videos), only using h264/mp4 and png's, but I've disabled the "preload MKV files in the same directory" nonetheless just in case.

The issue I have (and why I posted in the first place) with these videos it only runs smoothly when using VLC as decoder unfortunately, using ffmpeg it's stuttery.
While I can work on that project currently, RAM use is really on the edge, as soon as I open another application (e.g. Firefox) Windows gives me a warning about RAM maxing out and loosing data. And that's not even having all videos for the project imported.

So the question boils down to:
Is there any way to reduce the 'hefty' RAM usage with VLC?
nofish is offline   Reply With Quote
Old 11-29-2019, 12:00 PM   #4
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 12,578
Default

Try using ffmpeg, and right clicking in the video window, experimental performance options, and enabling video pre-fetch, that might help ffmpeg perform better
Justin is online now   Reply With Quote
Old 11-30-2019, 05:29 AM   #5
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 9,186
Default

Thanks Justin, but no luck so far with ffmpeg (still stuttery also with pre-fetch).
I've noticed that the render timings are also largely different.

VLC:


ffmpeg (same video item):


Specs (admittedly not the newest..):
Intel DP43BF/Q9550/8GB RAM/Win 8.1/R6rc8 x64/VLC x64 latest/ffmpeg x64 latest Zeranoe build

edit:
Here's one of the used videos, if it helps.. (~190MB)
https://www.dropbox.com/s/4bv9di5ixr...C0040.MP4?dl=1

Last edited by nofish; 11-30-2019 at 06:03 AM.
nofish is offline   Reply With Quote
Old 11-30-2019, 01:24 PM   #6
JamesPeters
Human being with feelings
 
JamesPeters's Avatar
 
Join Date: Aug 2011
Location: Near a big lake
Posts: 2,762
Default

That CPU is probably borderline acceptable for video editing when you're not using GPU for it at all (Reaper doesn't use GPU for video or any of its own functionality). And your chosen video resolution is pretty high.

That being said...

On my main computer running Xubuntu: with that one video file (with a file size of 188 MB) in a project by itself as a test, Reaper uses approximately 700 MB RAM with VLC (3.0.8) as the decoder and it plays smoothly with "video load" around 45% (max 200%). Using FFMPEG however (ffmpeg/libav DLL decoder v58.35.100), it uses about half that amount of RAM (around 350 MB) and it plays glitchy (video CPU spiking way too high, average 200% and max around 1000%) no matter what I try to help it (the settings Justin mentioned, plus "ignore audio", plus changing audio buffer size, setting frame rate to 25 fps to match the item's frame rate, etc.)

Considering my system has a Ryzen 7 3700X CPU, I'm a bit surprised at the performance of FFMPEG in this case.
__________________
http://petersamplification.com
Using REAPER for Linux

Last edited by JamesPeters; 11-30-2019 at 01:32 PM.
JamesPeters is offline   Reply With Quote
Old 11-30-2019, 05:27 PM   #7
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 9,186
Default

Thanks for testing on your system and reporting back.
So it more or less confirms my findings, VLC higher RAM usage, ffmpeg not useable, even on your much higher spec'ed system which surprises me as well.

Yeah, video resolution is pretty high, but that's how I got these files from a 'client'/friend for editing, so it wasn't my choice. And I tried working with the original video files and not converting them to something smaller for editing since the resolution of the final video isn't clear yet so I want to avoid converting aother time for rendering.

Thinking of it, something like 'render video item to new take' (with different resolution/codec) so we could make temporary smaller versions for editing and than switch back to original take for rendering would be nice maybe.
Or is there some way to do this already?
nofish is offline   Reply With Quote
Old 11-30-2019, 11:34 PM   #8
JamesPeters
Human being with feelings
 
JamesPeters's Avatar
 
Join Date: Aug 2011
Location: Near a big lake
Posts: 2,762
Default

FFMPEG usually works well on my system, but not for this video file. I don't use files over 1080p though, so maybe that's a contributing factor in this situation.

Quote:
Originally Posted by nofish View Post
Thinking of it, something like 'render video item to new take' (with different resolution/codec) so we could make temporary smaller versions for editing and than switch back to original take for rendering would be nice maybe.
Or is there some way to do this already?
I've never had the need to do that, so you could probably find out just as quickly as I could if this exists.
__________________
http://petersamplification.com
Using REAPER for Linux
JamesPeters is offline   Reply With Quote
Old 12-01-2019, 08:44 AM   #9
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 9,186
Default

Well, of course I did look around before asking (a bit at least), glue/render to new take seems to only produce audio files when done on video items so I don't see how it would be possible currently.

Made a FR
https://forum.cockos.com/showthread.php?t=227805
nofish is offline   Reply With Quote
Old 12-01-2019, 08:49 AM   #10
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 25,068
Default

Yea, glue et al doesn't take video into account - tested that last year. While you wait for the cache/proxy file feature, you could almost as quickly render a low-res version in handbrake or ffmpeg, then just F2 > item source and swap between high and low res files - this makes more sense when your editing phase takes some time to complete. In reality, proxy files are an automated version of the same process aka both methods require the render time of the low-res file.

If you edit and have lots of splits in the video item, then renaming the video files themselves is probably faster than changing all those item sources if those have to be changed 1 by 1 in reaper.

EDIT: Looks like changing item source will do all items at once.
__________________
Clever is not the same as good, clever is from the head, good is from the heart. -Benmont Tench
karbomusic is offline   Reply With Quote
Old 12-03-2019, 03:57 PM   #11
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 9,186
Default

Thanks Karbo and sorry for the delayed follow up.
Your proposed workaround with temporary rendering a low res version is rather difficult at this point for various reasons (e.g. there are like 20 of the original video files already imported in the project and tagged with comments which I would loose then etc.)

Anyway, since my problem is actually only RAM usage I tried to resort to setting items temporarily offline but ran into another issue (see licecap):

Setting videos items offline 'normally' doesn't work here for some reason (why?). Forcing setting video items offline (action: 'Item: Force media offline') does work (and does reduce RAM usage considerably) but I'm stumped how to set them online again? Normal 'set online' doesn't seem to work and there's no 'force set online' (I can see).
Any idea?

edit:
Nevermind, solved.
'Preferences > Media > Allow videos to go offline' must be enabled.



Last edited by nofish; 12-03-2019 at 04:04 PM.
nofish is offline   Reply With Quote
Old 12-03-2019, 04:04 PM   #12
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 25,068
Default

Looks like a Sony cam by the file name, I have a couple A6400s. I don't understand the tag losing thing but I trust you as I only tested an audio file and I don't use Reaper for my video much as of late. Glad you got it partially sorted.
__________________
Clever is not the same as good, clever is from the head, good is from the heart. -Benmont Tench
karbomusic is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 05:40 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.