-
Notifications
You must be signed in to change notification settings - Fork 137
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
Kubuntu: Can't save media anymore #257
Comments
Finally found the vidcutter.log: 2019-12-02 19:39 - root - CRITICAL - File "/usr/lib/python3/dist-packages/vidcutter/videocutter.py", line 1363, in saveMedia 2019-12-02 19:39 - root - CRITICAL - <class 'TypeError'>: '<' not supported between instances of 'str' and 'float' Wrong Python version? Works with Python2 only? |
very similar for me.
|
@ratcashdev @umbertones I modified the function I also saw that the last time stamp of the keyframes is a My modified |
This dts_time and pts_time stuff is interesting. I did a couple of fixes yesterday, building on the work fork of https://github.com/pmhahn/vidcutter (fixed project load). |
@ratcashdev
The args With these changes it still crashes, but later in the process with the following message:
|
@pikim |
including the csv output format argument changed a lot, certainly. However, still not ideal, as the output is on every second line only, so that will have to be handled as well.
PS: Would that condition for 'N/A' get actually triggered, like ever? |
This should already work and is the expected behaviour. Not every frame is a key frame and therefore the corresponding flag is not set for every frame.
This already works as expected, at least in my version. The original version has the problem that the timestamp remains 0 when I only get
Note that |
Thanks! I'll check that on my system when I'll get back to it next year. :-) |
I have updated the snippet in my previous post. See the
exception. To fix, I had to add something like this:
|
I don't know why your ffprobe output looks different than mine. Do you call ffprobe manually from the console? Could you copy&paste my call from above and only exchange the movie file? |
That's exactly what I did. For an MPEG4 stream it produced expected output on every single line, just like yours. For my MPEG2TS stream it only produced output on every second line though. So something with the video itself.
|
Strange. There seems to be a problem with the video stream, as the two lines that appear come from the audio stream. Did you also try another video (from another source)? |
@pikim Initially the file was a DVB-T recorded stream with 2 audio streams, 1 video stream and 1 SUBTITLE stream. This I later losslessly 'copied' into a new file with only 2 stream (1 video, 1 audio), as the SUBTITLE stream was making problems for ffmpeg during the smart encode process (error: no codec). So I checked the original file to see if the csv output also generates empty lines. Check out this output - some lines are empty, other are not:
Worse, yet, it seems that different streams have keyframes at different positions. Wouldn't this make the smart-cut feature practically impossible? At a minimum, we'd need to use a more exact output of ffprobe to identify VIDEO stream keyframes (not just look for the The empty lines seem to come from empty SIDE_DATA segments, based on this output here (last 6 entries copied, not using the
So whenever the csv contains the |
You could try to change to loop into
This should ignore empty lines. Or the following alternative if you like it more:
EDIT: I see the same when I ffprobe a ts stream recorded via DVB-S. Up to now I always cut those with DVBcut. |
@pikim Yes, my fix for the empty lines work just OK. Yours will catch the empty lines sooner though, but then again, does the split multiple times. EDIT: the join does not work, if the MPEG2-TS source file has a .ts extension, since the output file in the merge process also produces a .ts and thus tries to overwrite an existing file, in-place. |
@pikim Got past the JOIN bugs. The result:
gets converted/cut to
This apparently applies not just around the cut points, but overall to the whole file. Even the MIDDLE segment is re-encoded. |
I noticed that it doesn't cut h264 frame accurate at all. I didn't test other formats, yet. |
@pikim do you plan to try to fix it? Seems like the number of bugs and media incompatibilities are far too numerous given my own limited time and experience with ffmpeg/media/python. But I still need a smart-cut solution for mpeg2-ts :) |
Just wondering. Wouldn't it be easier to simply first FORCE keyframes at the desidered cut points and then simply cut/merge without ANY re-encode? Idea comes from https://video.stackexchange.com/questions/27513/encoding-insert-keyframes-at-certain-positions |
Could you tell me why?
To be honest I thought about extending DVBcut. But then it still could only be used for DVB files. VidCutter is more versatile, so maybe I'll try to fix it there. |
I am on Manjaro. Building https://aur.archlinux.org/packages/dvbcut fails. Same with the QT4 port of it.
I had some success in fixing the terrible quality (again look in my commit-log), but yet to fix the frame-accuracy. |
Just for completeness: I'm using Arch and was able to compile and use https://github.com/bernhardu/dvbcut-deb |
...
This is FFMPEG issue 7153 |
By accident - fixed in my internal version already. |
@pmhahn you may be interested in reviewing my own fixes (master branch) for the same (and many other) bugs.
|
I run VidCutter 6.0.0 on a fully patched Kubuntu 18.04 LTS with Kernel 5.0.0.37
VidCutter stopped to save the media. It runs fine (load media, create clips) until I click "Save media".
The progress bar stays at 0%, the Icon in the Taskbar is filled about 66% (looks like two third of the work is done) but this goes on forever. Tried saving on local and network drives, no difference.
I clicked on verboose logging in the settings, but I can't find any log. Any hints?
When I click on "Close" in the upper right corner it says that "Media is currently processed"...unfortunately it is not. The file to save does not appear on disk not even with 0 bytes length.
Any idea? I had it working but maybe there was an update that killed any function?
ffmpeg is installed and works when called solo.
Many thanks in advance.
The text was updated successfully, but these errors were encountered: