Closed Kris00007 closed 3 years ago
Same thing happens in Linux. Vidcutter 5.5.0 and Fedora Linux 28 x64. Vidcutter hangs at 66% if more than one clip is selected. Also, before the hang, vidcutter slams all CPU cores at 100%. The following error appears when running with --debug flag:
2018-05-26 20:43 - root - CRITICAL - File "/usr/lib64/python3.6/site-packages/vidcutter/videocutter.py", line 1242, in saveMedia self.joinMedia(filelist) File "/usr/lib64/python3.6/site-packages/vidcutter/videocutter.py", line 1280, in joinMedia if self.videoService.isMPEGcodec(filelist[0]): File "/usr/lib64/python3.6/site-packages/vidcutter/libs/videoservice.py", line 539, in isMPEGcodec codec = self.codecs(source)[0].lower() File "/usr/lib64/python3.6/site-packages/vidcutter/libs/videoservice.py", line 265, in codecs vcodec = re.search(r'Stream.*Video:\s(\w+)', result).group(1)
2018-05-26 20:43 - root - CRITICAL - <class 'AttributeError'>: 'NoneType' object has no attribute 'group'
I have the same problem. For me it stuck at 20% at 5.5.0 and at 40% for 6.0.0 when I'm trying to cut one clip using smartcut:
2018-06-19 09:21 - vidcutter.libs.videoservice - INFO - /app/bin/ffprobe -hide_banner -v error -show_packets -select_streams v -show_entries packet=pts_time,flags -of csv "/home/the-scrabi/Schreibtisch/ScreenRecord-2018-06-18-21-33-47.mp4"
2018-06-19 09:21 - vidcutter.libs.videoservice - INFO - -v 32 -i "/home/the-scrabi/Schreibtisch/ScreenRecord-2018-06-18-21-33-47.mp4" -ss 2.0030000000000001 -t 4.5114559999999999 -c:v libx264 -tune film -preset ultrafast -x264-params crf=23 -qp 0 -flags +cgop -c:a copy -c:s copy -map 0:0 -avoid_negative_ts 1 -y "/tmp/vidcutter/asdf_00_start_00.mp4"
2018-06-19 09:21 - root - CRITICAL - File "/app/lib/python3.5/site-packages/vidcutter/videocutter.py", line 1344, in saveMedia
self.smartcutter(file, source_file, source_ext)
File "/app/lib/python3.5/site-packages/vidcutter/videocutter.py", line 1394, in smartcutter
allstreams=True)
File "/app/lib/python3.5/site-packages/vidcutter/libs/videoservice.py", line 355, in smartcut
duration=bisections['end'][1] - bisections['start'][2],
2018-06-19 09:21 - root - CRITICAL - <class 'TypeError'>: unsupported operand type(s) for -: 'float' and 'str'
2018-06-19 09:21 - vidcutter.libs.videoservice - INFO - SmartCut progress: {'start': True}
2018-06-19 09:21 - vidcutter.libs.videoservice - INFO - /app/bin/ffmpeg -hide_banner -i "/tmp/vidcutter/asdf_00_middle_00.mp4"
2018-06-19 09:21 - root - CRITICAL - File "/app/lib/python3.5/site-packages/vidcutter/libs/videoservice.py", line 409, in smartcheck
self.smartjoin(index)
File "/app/lib/python3.5/site-packages/vidcutter/libs/videoservice.py", line 431, in smartjoin
if self.isMPEGcodec(joinlist[1]):
File "/app/lib/python3.5/site-packages/vidcutter/libs/videoservice.py", line 599, in isMPEGcodec
codec = self.codecs(source)[0].lower()
File "/app/lib/python3.5/site-packages/vidcutter/libs/videoservice.py", line 269, in codecs
vcodec = re.search(r'Stream.*Video:\s(\w+)', result).group(1)
2018-06-19 09:21 - root - CRITICAL - <class 'AttributeError'>: 'NoneType' object has no attribute 'group'
I use the flatpak packages.
@ozmartian I really love this program, since it became a daily driver for my android QA, however 6.0.0 has so many bugs that it's unusable for me :(. Please tell me how I can support you so the quality improves again.
Still the same issue with mine... works fine is 1 segment... 2 segments will get stuck at 66% ...
@emdeex Still got the same issue. After applying the patch above https://github.com/scrool/vidcutter/commit/a25984fd32662c2446956f5c3affa8a313b30289 the error went away and export works fine.
@OliPelz can we get a compiled version out with this patch? I'm on Win 64bit...
@emdeex Sorry, I don't have a Windows machine and don't know how to compile it for this architecture. Maybe you can try the DEV version, I guess this patch is already in it? Or you can ask the developers if they can provide you a patched compiled version.
Tried the Dev version at: https://ci.appveyor.com/project/ozmartian/vidcutter/build/artifacts
Same issue - freezes at 66% completion when saving multiple edits.
Same problem here on Ubuntu 18.04. Hangs at 66% write of the file.
For Linux users: before the next official update you can use this command to install the fix:
sudo pip install --upgrade git+https://github.com/ozmartian/vidcutter.git
linux not supported?
sudo pip install --upgrade git+https://github.com/ozmartian/vidcutter.git
-->
Collecting git+https://github.com/ozmartian/vidcutter.git
Cloning https://github.com/ozmartian/vidcutter.git to /tmp/pip-req-build-xQD9a9
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "
Problem still present in latest git version (6.0.0-9) on Arch Linux. @MaxMatti's fix also does not seem to work.
I have the same issue. Stuck at 80% forever.
Problem still present in latest git version (6.0.0-9) on Arch Linux. @MaxMatti's fix also does not seem to work.
For me it fixed this particular bug, but then other bugs occured, leading to still not being able to use VidCutter. I did not create separate issues for those nor did I check for existing ones as I have found other tools for this task.
I had exactly the same problem. The program hanged at either 33% or 66%. But I managed to find the problem in my case.
Problem: In new versions (5.0 and higher), the temp video clips are stored in the OS Temp director, which in my case is '/tmp/vidcutter/' (I am using Fedora 29). This means the program is using RAM instead of hard drive to store temp files. Once RAM is full, e.g. in the case of multiple long clips, the program hangs at whatever percentage.
Simple solution:
Create a folder in the hard drive, e.g. '/home/USER/Downloads/vidcutter' and make a symbolic link of this directory to '/tmp/vidcutter/' with
ln -s /home/USER/Downloads/vidcutter /tmp/vidcutter/
.
Then the temp files will not be stored in the hard drive. However, the symbolic link will be cleared whenever the system is shutdown, and you will have to make the symbolic link every time.
A slightly more complicated but more robust solution:
After going through the codes, I found the directory of temp files is defined in 'WORKING_FOLDER', and it is initialized in main.py:
WORKING_FOLDER = os.path.join(QDir.tempPath(), 'vidcutter')
.
Here 'QDir.tempPath()' is the OS temp directory. So long story short, by replacing ALL 'QDir.tempPath()' with a directory in hard drive, e.g. '/home/USER/Downloads/vidcutter', in main.py, the problem can be permanently solved. The main.py file is in '/lib64/python3.7/site-packages/vidcutter' in my system.
Hope this helps.
@zhihongyou nice thx. Could you try to create a pull request out of this?
I had a similar issue on OSX (Mojave) running 6.0.0 & 6.0.2. A comment in the console logs suggested a zero length segment and this correlated with one or more clips starting on a keyframe. By adjusting the offending clips' start frames by a single frame so that none started on a keyframe, I was able to save the file successfully. Typically, clips that started on a keyframe would never progress beyond 16%.
One of my videos had 5 clips, 3 starting on keyframes. Adjusting 1 clip at a time saw an improvement in the overall progress, but I had to have no clips starting on a keyframe before each clip reached 100% and the whole video was successfully exported.
The timecode for keyframes can be found in Media Information -> View Keyframes
I tried both methods described by zhihongyou and neither worked for my manjaro Linux system. Freezes at 66%. I gave up, uninstalled vidcutter and have good success by (1) splitting up the mp4 using LossLessCut and the (2) Joining them into a new mp4 using mp4joiner. Both are in AUR. $ cat /proc/version Linux version 5.1.16-1-MANJARO (builduser@development) (gcc version 9.1.0 (GCC)) #1 SMP PREEMPT Thu Jul 4 20:32:22 UTC 2019
I have the same issue. However, @zhihongyou's solution won't work for me. Ram use is at 6.1GB out of 32GB. Swap at 256KiB. CPU on all 16 cores at <2% +/-. Total mem used by vidcutter 101.3MB.
I've tried LossLessCut and didn't cut correctly so moved on to try VidCutter. I would define 15sec segments (for Instagram Story) but app would clip 2nd/3rd/4th, etc segments by pulling from previous segment adding 2sec to said segment thereby clipping a 17sec segment. So watching successive clips would repeat last 2sec of previous segment.
Reproduced this issue with 6.0.0 on Ubuntu 20.04 (focal) and verified that 6.0.5 fixes the issue.
Reproduced this issue with 6.0.0 on Ubuntu 20.04 (focal) and verified that 6.0.5 fixes the issue.
@brannonb How did you install 6.0.5 on ubuntu 20.04?
Reproduced a similar issue in version 6.0.0.0 flatpak - turning off 'smartcut' solved the issue Linux Mint 20.1 Ulyssa base: Ubuntu 20.04 focal
Reproduced a similar issue in version 6.0.0.0 flatpak - turning off 'smartcut' solved the issue Linux Mint 20.1 Ulyssa base: Ubuntu 20.04 focal
@sebbyr123 Thanks bro! I'll try it.
How did you install 6.0.5 on ubuntu 20.04?
@vitorrcunhaa see https://github.com/ozmartian/vidcutter/issues/295
clone the repo: git clone https://github.com/ozmartian/vidcutter.git install deps: sudo apt-get install libmpv-dev python3-pyqt5 sommore deps: sudo pip install -U pyopengl build time: cd vidcutter; python setup.py build setup: sudo pip install .
@brannonb wrote
verified that 6.0.5 fixes the issue.
not for me, just pulled the latest master
I had the same issue when I installed this on my Ubuntu using Snap. I uninstalled it and tried installing it using Flatpak and it works alright now. The instructions to installing using Flatpak are in the home page of this repository.
Installing from the launchpad PPA in Ubuntu 20+ is working now for a proper native install if you prefer that over Flatpak or Snap (the snap is not as stable as the Flatpak for now) and new version for Windows users on Releases page or from Chocolatey (once 6.0.5.1 is approved in the next day or so)
@ozmartian I felt that when I used Flatpak to install and when the smart cut is enabled, it still gets stuck in the middle of processing. But when I install it using PPA, both modes work as expected. Thank you.
Installing from the launchpad PPA in Ubuntu 20+ is working now for a proper native install if you prefer that over Flatpak or Snap (the snap is not as stable as the Flatpak for now) and new version for Windows users on Releases page or from Chocolatey (once 6.0.5.1 is approved in the next day or so)
Tested 6.0.5.1 on snap install, ubuntu 20.10 and it works like a charm. Ty
Thx for the feedback guys!
Still has the 66% problem with 22.04 UBUNTU and 2 clips.
I too use Ubunto 20.04. default snap-pack. VidCutter 6.0.5.1. Save stucks at 20% if smartcut is used. Without smartcut, it works fine.
__Let's Try To Define The Root-Cause__ Issue
OS: Ubuntu 22.04 LTS VidCutter Version? 6.0.5.1 Type of Install? Snap VidCutter Settings? What ever is out-of-the-box: SmartCut, Create chapter per clip, Allow only one instance, Hardware encoding, Enable use of PBOs, Keep aspect ration, no zoom, light theme, clips on right, use native dialogs, Problem file (Information as reported by VLC-player): 4k video from action camera Akaso Brave 7 LE, H.264 - MPEG-4 AVC (part 10) (avc 1), 3840 x 2160, buffer 3840 x 2178, 30 fps, Planar 4:2:0 YUV. Sound: codex sowt, channels: stereo, sample freq: 48 kHz, bits per sample: 16 File size: 294,3 MB
Problems description: Saving clip Freeses on about 20%. Disabling smartcut resolves the issue. Clip is about 30 seconds of length (201,2 MB).
Laptop: oldish Dell XPS 13, 8GB Ram, 512 GB ssd, i5 with integrated graphics.
Windows 10-64. If I select more than 1 segment, it gets stuck at 66% forever.