fvisagie
26th May 2014, 12:03
Hi All,
I'm running into what seems to be a memory problem when cutting and splicing together AVCHD camera files. The behaviour is the same as when previous versions of L-SMASH WORKS leaked out of memory. I'm using AvsPmod 2.5.1 with Avisynth 2.6.0 Alpha 4 and L-SMASH WORKS r725's LWLibavAudio/VideoSource() on Windows 7 Pro SP1 32-bit.
Because the camera creates one file per scene, I want to first open all files assigning each to a unique variable, and then use the variable names to more conveniently reorder and Trim() them. As it stands the script therefore looks like this (just for now, later I plan to use more meaningful clip variable names ;)):
# ===================
# Files
# ===================
c20140510154014 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510154014.mts")
c20140510154111 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510154111.mts")
c20140510154135 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510154135.mts")
c20140510154151 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510154151.mts")
c20140510154217 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510154217.mts")
c20140510154243 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510154243.mts")
c20140510154322 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510154322.mts")
c20140510154429 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510154429.mts")
c20140510154445 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510154445.mts")
c20140510154458 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510154458.mts")
c20140510154521 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510154521.mts")
c20140510154558 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510154558.mts")
c20140510154744 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510154744.mts")
c20140510154854 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510154854.mts")
c20140510155012 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510155012.mts")
c20140510155050 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510155050.mts")
c20140510155133 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510155133.mts")
c20140510155144 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510155144.mts")
c20140510155152 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510155152.mts")
c20140510155207 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510155207.mts")
c20140510155218 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510155218.mts")
c20140510155231 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510155231.mts")
c20140510155252 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510155252.mts")
c20140510155338 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510155338.mts")
c20140510155412 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510155412.mts")
c20140510155427 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510155427.mts")
c20140510155451 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510155451.mts")
c20140510155550 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510155550.mts")
c20140510155634 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510155634.mts")
c20140510155703 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510155703.mts")
c20140510155732 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510155732.mts")
c20140510155848 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510155848.mts")
c20140510155931 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510155931.mts")
c20140510160017 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510160017.mts")
c20140510160100 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510160100.mts")
c20140510160129 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510160129.mts")
c20140510160226 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510160226.mts")
c20140510160437 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510160437.mts")
c20140510160606 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510160606.mts")
c20140510160721 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510160721.mts")
c20140510160729 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510160729.mts")
c20140510160916 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510160916.mts")
c20140525171805 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140525171805.mts")
# ===================
# Timeline editing
# ===================
# ...
# ===================
# Final output
# ===================
MessageClip("No edited output available yet")
LWOpen() is defined in the auto-include utility script below as:
function LWOpen(string source) {
return(AudioDub(LWLibavVideoSource(source), LWLibavAudioSource(source)))
}
When I run my script, I get:
LWLibavAudioSource: failed to get the audio track.
(FV_utils-1.9.0.avsi, line 116)
(C:\Users\fvisagie\Videos\Home Videos\20140510 Collene & Kallie Pre-shoot\1. Footage.avs, line 38)
This error would occur anywhere from line 38 to line 41, whenever AvsPmod's memory usage reaches around 1666 MB RAM. At that point total physical memory utilisation across all processes is only ~75%. The machine has 4 GB.
Setting higher-than-default values with SetMemoryMax() makes no difference I could notice. When I use FFVideo/AudioSource() instead of LWLibavAudio/Source(), I get similar behaviour:
FFVideoSource: Insanity detected: decoder returned an empty frame
(FV_utils-1.9.0.avsi, line 184)
(C:\Users\fvisagie\Videos\Home Videos\20140510 Collene & Kallie Pre-shoot\1. Footage.avs, line 45)
This happens at about 1620 MB memory usage.
When I do NOT assign variables to the opened clips e.g.
LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510154014.mts")
LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510154111.mts")
...
I do not get this problem. I know the filtergraph etc. probably look different in this case, but even so I confirmed that each file is still opened and indexed.
This suggests I would be able to complete this task by opening the files and editing the timeline in-line, e.g. LWOpen("file1").Trim(a, b) ++ LWOpen("file2").Trim(c, d). However I find this way of working without variables much less convenient.
Am I doing something wrong, or is this a bug? Is there a way to get around this memory problem so I can use my preferred approach, i.e. assigning a variable to each opened clip?
Many thanks,
Francois
I'm running into what seems to be a memory problem when cutting and splicing together AVCHD camera files. The behaviour is the same as when previous versions of L-SMASH WORKS leaked out of memory. I'm using AvsPmod 2.5.1 with Avisynth 2.6.0 Alpha 4 and L-SMASH WORKS r725's LWLibavAudio/VideoSource() on Windows 7 Pro SP1 32-bit.
Because the camera creates one file per scene, I want to first open all files assigning each to a unique variable, and then use the variable names to more conveniently reorder and Trim() them. As it stands the script therefore looks like this (just for now, later I plan to use more meaningful clip variable names ;)):
# ===================
# Files
# ===================
c20140510154014 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510154014.mts")
c20140510154111 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510154111.mts")
c20140510154135 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510154135.mts")
c20140510154151 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510154151.mts")
c20140510154217 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510154217.mts")
c20140510154243 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510154243.mts")
c20140510154322 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510154322.mts")
c20140510154429 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510154429.mts")
c20140510154445 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510154445.mts")
c20140510154458 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510154458.mts")
c20140510154521 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510154521.mts")
c20140510154558 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510154558.mts")
c20140510154744 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510154744.mts")
c20140510154854 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510154854.mts")
c20140510155012 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510155012.mts")
c20140510155050 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510155050.mts")
c20140510155133 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510155133.mts")
c20140510155144 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510155144.mts")
c20140510155152 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510155152.mts")
c20140510155207 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510155207.mts")
c20140510155218 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510155218.mts")
c20140510155231 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510155231.mts")
c20140510155252 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510155252.mts")
c20140510155338 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510155338.mts")
c20140510155412 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510155412.mts")
c20140510155427 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510155427.mts")
c20140510155451 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510155451.mts")
c20140510155550 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510155550.mts")
c20140510155634 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510155634.mts")
c20140510155703 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510155703.mts")
c20140510155732 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510155732.mts")
c20140510155848 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510155848.mts")
c20140510155931 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510155931.mts")
c20140510160017 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510160017.mts")
c20140510160100 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510160100.mts")
c20140510160129 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510160129.mts")
c20140510160226 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510160226.mts")
c20140510160437 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510160437.mts")
c20140510160606 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510160606.mts")
c20140510160721 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510160721.mts")
c20140510160729 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510160729.mts")
c20140510160916 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510160916.mts")
c20140525171805 = LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140525171805.mts")
# ===================
# Timeline editing
# ===================
# ...
# ===================
# Final output
# ===================
MessageClip("No edited output available yet")
LWOpen() is defined in the auto-include utility script below as:
function LWOpen(string source) {
return(AudioDub(LWLibavVideoSource(source), LWLibavAudioSource(source)))
}
When I run my script, I get:
LWLibavAudioSource: failed to get the audio track.
(FV_utils-1.9.0.avsi, line 116)
(C:\Users\fvisagie\Videos\Home Videos\20140510 Collene & Kallie Pre-shoot\1. Footage.avs, line 38)
This error would occur anywhere from line 38 to line 41, whenever AvsPmod's memory usage reaches around 1666 MB RAM. At that point total physical memory utilisation across all processes is only ~75%. The machine has 4 GB.
Setting higher-than-default values with SetMemoryMax() makes no difference I could notice. When I use FFVideo/AudioSource() instead of LWLibavAudio/Source(), I get similar behaviour:
FFVideoSource: Insanity detected: decoder returned an empty frame
(FV_utils-1.9.0.avsi, line 184)
(C:\Users\fvisagie\Videos\Home Videos\20140510 Collene & Kallie Pre-shoot\1. Footage.avs, line 45)
This happens at about 1620 MB memory usage.
When I do NOT assign variables to the opened clips e.g.
LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510154014.mts")
LWOpen("C:\Users\fvisagie\Videos\Home Videos\Camera Tapes\20140510 Collene & Kallie Pre-shoot\20140510154111.mts")
...
I do not get this problem. I know the filtergraph etc. probably look different in this case, but even so I confirmed that each file is still opened and indexed.
This suggests I would be able to complete this task by opening the files and editing the timeline in-line, e.g. LWOpen("file1").Trim(a, b) ++ LWOpen("file2").Trim(c, d). However I find this way of working without variables much less convenient.
Am I doing something wrong, or is this a bug? Is there a way to get around this memory problem so I can use my preferred approach, i.e. assigning a variable to each opened clip?
Many thanks,
Francois