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

vidcutter UI froze on failed clip export #111

Closed
ferdnyc opened this issue Nov 25, 2017 · 9 comments
Closed

vidcutter UI froze on failed clip export #111

ferdnyc opened this issue Nov 25, 2017 · 9 comments

Comments

@ferdnyc
Copy link
Contributor

ferdnyc commented Nov 25, 2017

I just tried to export a small (13-second) clip from an also relatively small (22-minute / 836MiB) MKV file (V_MPEG4/ISO/AVC + AAC content), off-keyframe using SmartCut. That failed, but the bigger issue is the fact that it failed silently, and without the interface noticing.

Even though the attempted conversion long since failed, Vidcutter never informed me of that fact, or even noticed it. The UI is stuck in "export-in-progress" mode, with all of the controls ghosted out and inactive. If I attempt to close the application window, I get a "Video is currently being processed" (false!) popup, but closing it appears to be my only option as it doesn't seem like it's planning on coming back from this state.

This is vidcutter-5.0.0 installed on Fedora 26 x86_64 from the suspiria/VidCutter COPR repo, backed with rpmfusion media libraries.

Here's the entire contents of $HOME/.config/vidcutter/vidcutter.log:

2017-11-25 00:40 - vidcutter.libs.videoservice - INFO - smartcut files are MPEG based so join via MPEG-TS
2017-11-25 00:40 - vidcutter.libs.videoservice - ERROR - Exception during MPEG-TS join
Traceback (most recent call last):
  File "/usr/lib64/python3.6/site-packages/vidcutter/libs/videoservice.py", line 522, in mpegtsJoin
    video_bsf, audio_bsf = self.getBSF(inputs[0])
  File "/usr/lib64/python3.6/site-packages/vidcutter/libs/videoservice.py", line 436, in getBSF
    vcodec, acodec = self.codecs(source)
  File "/usr/lib64/python3.6/site-packages/vidcutter/libs/videoservice.py", line 253, in codecs
    vcodec = re.search(r'Stream.*Video:\s(\w+)', result).group(1)
AttributeError: 'NoneType' object has no attribute 'group'
2017-11-25 00:40 - vidcutter.libs.videoservice - INFO - smartcut MPEG-TS join failed, retry with standard concat
2017-11-25 00:40 - vidcutter.videocutter - ERROR - SmartCut failed for /tmp/vidcutter/Vidcutter-test-clip_00.mkv
@BStulic
Copy link

BStulic commented Dec 12, 2017

Also happens to me.

I located the area where the bug is :
it's the new option "Enable SmartCut (frame-accurate mode)" (under "Settings" -> "General") that does it ! Once You disable this option, the program does not freeze or crash any more.

@ferdnyc
Copy link
Contributor Author

ferdnyc commented Dec 14, 2017

Another data point: I noticed in the log above (and reconfirmed with vidcutter --debug just now) that vidcutter is using /tmp/vidcutter/as its working path for video processing. If I'm looking at this right, that path doesn't appear to be configurable?

On Fedora machines, at least, /tmp/ is a virtual tmpfs-mounted filesystem which lives in RAM. The temp space for large working files is /var/tmp/, which is typically located on the root partition. I'm not sure if the use of /tmp/vidcutter/ is causing the SmartCut processing hangs (I have 6GB of RAM so there's usually about 3GB of free space in /tmp/, which should be plenty for the small tests I've attempted) but it will definitely cause problems for larger files which don't fit in memory.

@marcelpaulo
Copy link

This has just happened to me, in a very different environment: Xubuntu 17.10, vidcutter instaled from a clone of the repository (3d7b3aa), updated to today, vidcutter.log is very similar:

2018-02-28 18:17 - vidcutter.libs.videoservice - INFO - smartcut files are MPEG based so join via MPEG-TS
2018-02-28 18:17 - vidcutter.libs.videoservice - ERROR - Exception during MPEG-TS join
Traceback (most recent call last):
  File "/home/paulo/.local/lib/python3.6/site-packages/vidcutter-5.5.0-py3.6-linux-x86_64.egg/vidcutter/libs/videoservice.py", line 551, in mpegtsJoin
    video_bsf, audio_bsf = self.getBSF(inputs[0])
  File "/home/paulo/.local/lib/python3.6/site-packages/vidcutter-5.5.0-py3.6-linux-x86_64.egg/vidcutter/libs/videoservice.py", line 462, in getBSF
    vcodec, acodec = self.codecs(source)
  File "/home/paulo/.local/lib/python3.6/site-packages/vidcutter-5.5.0-py3.6-linux-x86_64.egg/vidcutter/libs/videoservice.py", line 265, in codecs
    vcodec = re.search(r'Stream.*Video:\s(\w+)', result).group(1)
AttributeError: 'NoneType' object has no attribute 'group'
2018-02-28 18:17 - vidcutter.libs.videoservice - INFO - smartcut MPEG-TS join failed, retry with standard concat
2018-02-28 18:17 - vidcutter.videocutter - ERROR - SmartCut failed for /tmp/vidcutter/BBC.The.Genius.of.Bert.Jansch.Folk.Blues.and.Beyond.720p.HDTV.x264.AAC.mkv[eztv]_EDIT_00.mkv

and the symptoms were precisely the same:

The UI is stuck in "export-in-progress" mode, with all of the controls ghosted out and inactive

I installed all the dependencies from the Ubuntu repositories.

@pmhahn
Copy link

pmhahn commented Nov 13, 2018

This happens for me too: If I look at the start part, ffprobe shows it to not contain any audio data, but only video data. The mid and end parts are fine and both contain both video and audio streams.
The start part was generated by the following command:

ffmpeg \
-v 32 \
-i "filename.m4v" \
-ss 181.091 \
-t 0.01999999999998181 \
-c:v libx264 \
-tune film \
-preset ultrafast \
-x264-params crf=23 \
-qp 0 \
-flags +cgop \
-c:a copy \
-c:s copy \
-map 0:0 \
-map 0:1 \
-avoid_negative_ts 1 \
-y "vidcutter/filename_EDIT_00_start_00.m4v"

Please note that very short duration: -t 0.01999999999998181!

Running ffprobe -hide_banner -v error -show_packets -select_streams a -show_entries packet=pts_time,flags -of csv filename.m4v shows this:

packet,181.088000,K_
packet,181.120000,K_

So simply the start part is too short to contain any audio stream and concatenating it with the middle and end part leads to the error, e.g. a file without any audio stream.

Maybe one can tell ffmpeg to explicitly include that empty audio stream?

@EdQ73
Copy link

EdQ73 commented Nov 20, 2018

This seems to be the same issue I am having.

My master media is from a digitized (Mjpeg AVI) 8mm film with no audio.

Vidcutter Save Media always freezes at 50%, but after closing Vidcutter you see that it has successfully made the clip. presumingly, it freezes because its trying to make a copy of a nonexistent sound track.

Ubuntu 16.04 Vidcutter installed by Snapcraft.

@aritorhamo
Copy link

I have the same problem (on LinuxMint 19.3 Cinnamon). SmartCut works on none of the files I have tried it with. I have tried VP9 (webm), and avc (mkv and mp4). The processing just appears to go on forever, but the program doesn't actually do anything (CPU load is 0%).

@binyominzeev
Copy link

Same on Xubuntu 18.04 Flatpak. Nothing happens.

@stuaxo
Copy link

stuaxo commented Jan 25, 2021

Frozen for me on Ubuntu 20.04, no CPU usage and frozen for 5 minutes - smart cut was already disabled.

@arnaud-quiblier
Copy link

Same on KUbuntu 20.04 with snap VidCutter.
Stacktrace from debug :

2021-03-19 13:53 - root - CRITICAL -   File "/snap/vidcutter/14/lib/python3.5/site-packages/vidcutter/videocutter.py", line 1392, in saveMedia
    self.joinMedia(filelist)
  File "/snap/vidcutter/14/lib/python3.5/site-packages/vidcutter/videocutter.py", line 1452, in joinMedia
    self.complete(True, filelist[-1])
  File "/snap/vidcutter/14/lib/python3.5/site-packages/vidcutter/videocutter.py", line 1460, in complete
    self.videoService.finalize(self.finalFilename)
  File "/snap/vidcutter/14/lib/python3.5/site-packages/vidcutter/libs/videoservice.py", line 283, in finalize
    self.checkDiskSpace(source)
  File "/snap/vidcutter/14/lib/python3.5/site-packages/vidcutter/libs/videoservice.py", line 162, in checkDiskSpace
    spacewarn = VCMessageBox('Warning', 'Disk space alert', warnmsg, self.parentWidget())

2021-03-19 13:53 - root - CRITICAL - <class 'AttributeError'>: 'VideoService' object has no attribute 'parentWidget'

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

No branches or pull requests

10 participants