Git Product home page Git Product logo

videocut's People

Contributors

kanehekili avatar redfraction avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

videocut's Issues

Make it easier to package this to GNU/Linux distributions other then Arch Linux & Debian

Hello,

This application seems interesting, though I have no idea how to install it. I have packaged ~85 packages for NixOS, many of which are Python packages, and this repository, seems to be written in Python, doesn't adhere to any standard, and I have no idea where to start when building it - there is no setup.py, no pyproject.toml etc.. I found some Makefiles in non-standard locations, but I didn't understand what they are for...

I may be able to help with that after I'll put my mind to it, but in the meantime it'd be great if you'll show interest in fixing this.

Error while clicking on the "include from here" button

Traceback (most recent call last):

  • File "/usr/bin/videocut", line 1407, in addStartMarker
    self._createVideoCutEntry(pos,VideoCutEntry.MODE_START)
  • File "/usr/bin/videocut", line 1418, in _createVideoCutEntry
    VideoPlugin.setCutEntry(cutEntry)
  • File "/opt/videocut/MpvPlayer.py", line 602, in setCutEntry
    cutEntry.pix = self._makeThumbnail(pilImage)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  • File "/opt/videocut/MpvPlayer.py", line 612, in _makeThumbnail
    pix = QtGui.QPixmap.fromImage(qImage)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    *TypeError: fromImage(image: QImage, flags: Union[Qt.ImageConversionFlags, Qt.ImageConversionFlag] = Qt.AutoColor): argument 1 has unexpected type 'ImageQt'

Arch linux, version videocut-2.2.0-1

no video saved

If more than 2 cutting marks are present, the movie is not saved.

License

Please declare the license.

language error

Bonjour,

I'm french and like original version movies with original language and french subtitles but, when editing a m2t file (kaffeine dvt-tv one) with videocut, I get this error and no selection of language and subtitle when playing back :
Traceback (most recent call last):

  • File "/usr/local/bin/VideoCut", line 806, in openLanguageSettings
    dlg = LanguageSettingsDialog(self, lang, langMap, self._videoController.getLanguages())
  • File "/usr/local/bin/VideoCut", line 1176, in init
    self.setupLanguages(defCodes,available3LetterCodes)
  • File "/usr/local/bin/VideoCut", line 1349, in setupLanguages
    self.avail.append(codeToLang[code])
    *KeyError: 'qaa'

cordialement,

[enhancement] Change speed

Just found your app and its amazing.
i have a suggestion :
i dont want to delete some parts.just want to speed up some un-wanted parts.

may you please add this option ?

thanks.

Editing subtitles with video - mkv container

Hi,

I read your post here:
https://askubuntu.com/questions/1304004/how-to-edit-mkv-with-subtitles-and-keep-the-subs

I would find it useful to be able to edit video and subtitles at the same time, for occasional films.

It is a little time consuming to using a video editor to make cuts, then a subtitle editor to make all the same cuts to the subtitles.

However, when I tried to edit a video with soft subtitles (.srt) within an mkv container. VideoCut did not seem to import them.

I have uploaded sample video files below, from before and after trimming with VideoCut. The subtitles do not make it into the output file.

Are subtitles supported for the mkv container?

Input:
https://github.com/lxs602/Test/blob/main/DEFA%20-%20East%20German%20trailer%20subs.mkv

Output:
https://github.com/lxs602/Test/blob/main/DEFA%20-%20East%20German%20trailer%20subs-cut.mkv

Log from terminal:

user@user-pc:~/Downloads/videocut$ VideoCut
using CV3
qt5ct: using qt5ct plugin
libpng warning: iCCP: known incorrect sRGB profile
qt5ct: D-Bus global menu: no
4.2
['/opt/videocut/ffmpeg/bin/V4/remux5', '-i', '/home/user/Videos/DEFA - East German trailer subs.mkv', '-s', '00.000,20.720', >'/home/user/Videos/DEFA - East German trailer subs-cut.mkv']
<Input #0, matroska,webm, from '/home/luke/Videos/DEFA - East German trailer subs.mkv':
< Metadata:
< ENCODER : Lavf58.29.100
< Duration: 00:00:30.98, start: 0.000000, bitrate: 6462 kb/s
< Stream #0:0: Video: mpeg2video (Main), yuv420p(tv, top first), 720x576 [SAR 16:15 DAR 4:3], SAR 1:1 DAR 5:4, 25 fps, >>25 tbr, 1k tbn, 50 tbc (default)
< Metadata:
< DURATION : 00:00:30.640000000
< Stream #0:1: Audio: mp2, 48000 Hz, stereo, s16p, 192 kb/s (default)
< Metadata:
< DURATION : 00:00:30.744000000
< Stream #0:2: Subtitle: subrip
< Metadata:
< DURATION : 00:00:30.979000000
<Registered 4 decoding threads
<MPEG2 set to PS-stream
.<Video bitrate: 6462640
<Audio: sample rate: 48000 bitrate: 192000
<Output #0, matroska, to '/home/user/Videos/DEFA - East German trailer subs-cut.mkv':
< Stream #0:0: Video: mpeg2video (Main), yuv420p(tv, top first), 720x576 [SAR 16:15 DAR 4:3], q=2-31, 25 fps
< Side data:
< cpb: bitrate max/min/avg: 96939600/4308426/6462640 buffer size: 2072576 vbv_delay: -1
< Stream #0:1: Audio: mp2, 48000 Hz, stereo, s16p, 192 kb/s
<Video length is about 20.72 seconds
<Mux video - Offset: 0 (0.000) fps: 25.000 audio -offset 240 (0.240) delta:-240 (-0.240)
<First IFrame DTS found: 0, normalized: 0 (0.000) mainOffset: 240 (0.24000) voutDelta:40.000
<Video tbi: 1000 tbo: 1000 ; Audio tbi: 1000 tbo: 1000
<Video IN: matroska,webm long:Matroska / WebM
<Video OUT: matroska long:Matroska
<Done
<Args: /home/user/Videos/DEFA - East German trailer subs.mkv -> /home/user/Videos/DEFA - East German trailer subs-cut.mkv

Additionally, in the documentation it mentions that Videocut may not cut to exact frames.

I think, though, that it would be useful to know exactly where you are cutting...

For example, I know that some video editors cut to keyframes, so this is just a suggestion for something which I think would be beneficial.

Best wishes,

L

remux5 and DVCHD mov

So, just for kicks I tried to remux this file

./remux5 -i ~/tsMuxer/DVCPROHD_1080i50.qt -s 000.000,002.000 -l eng dvcpro_cut.mov

file itself from

http://samples.mplayerhq.hu/mov/FCP/DVCPROHD_1080i50.mov

for some reason if i cut from 0.0 to 1 sec I see no audio in output, but if I cut to two seconds I see audio, but just 1 sec long )

remux5 was compiled on aarch64/termux against ffmpeg 5.1.2 libs ...

I also wonder if you might like to hack same feature into our ffmpeg-based NLE called Cinelerra-GG, but this is loooong shot.

Problems with output errors while saving files.

As in the previous version, still report errors when saving files。Here the logs
Traceback (most recent call last):
File "C:/Users/Bugs/Desktop/VideoCut-master/src/VideoCut.py", line 2020, in run
self.function(*self.arguments)
File "C:/Users/Bugs/Desktop/VideoCut-master/src/VideoCut.py", line 1801, in __directCut
if self.cutter.setupBinary():
File "C:\Users\Bugs\Desktop\VideoCut-master\src\FFMPEGTools.py", line 1491, in setupBinary
fv = FFmpegVersion()
File "C:\Users\Bugs\Desktop\VideoCut-master\src\FFMPEGTools.py", line 1620, in init
self.figureItOut()
File "C:\Users\Bugs\Desktop\VideoCut-master\src\FFMPEGTools.py", line 1623, in figureItOut
result = subprocess.Popen(["/usr/bin/ffmpeg", "-version"], stdout=subprocess.PIPE).communicate()
File "C:\Users\Bugs\anaconda3\lib\subprocess.py", line 858, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\Bugs\anaconda3\lib\subprocess.py", line 1311, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified.
Like 1.3.2, I found that the error aslo was caused by the Class 'cutter' in 1.3.3, my platform is win11,anaconda , I tried to write a function ‘cut' in the Class 'Cutter' to solve the error. It works on my computer.Here is, in VCCuter.

       def myCut(self, cutlist):
    for index, cutmark in enumerate(cutlist):
        t1 = cutmark[0].timePos
        t2 = cutmark[1].timePos
        cmd = ["ffmpeg","-i", self.config.srcfilePath, "-codec", "copy", "-ss", timedeltaToString2(t1), "-to", timedeltaToString2(t2), self.config.targetPath]
        print(cmd)
        log("cut file:", cmd)
        try:
            executeCmd(cmd)
        except Exception as error:
            self.warn("Remux failed: %s" % (error))
            log("Remux failed", error)
            self.runningProcess = None
            return False
    self.say("Cutting done")
    self.runningProcess = None
    return True

then, in videocut line 1820 Called this function. it works.

Error while trying to save video.

Error while trying to save video with other from ".mp4" file extesion. Original video format .mov. But program automaticly add ".mp4". Make extension of saving video be like in source video.

[FEATURE] - Intervals

Greetings, it may be worth adding "intervals" for cutting video. I will explain what is it -
The interval has a beginning and an end, everything that includes into it - is included in the final file. One project can have one or more than one intervals. So It replace current start/stop points system, 'cause it will group one start and one stop together. So later we can add some "processors" per selected interval, like: video speed control, any sound tunnings(for example like I requested in my last issue), and etc. I think this feature will get new LEVEL_UP for VideoCut. Also would be nice to have some previews of start/stop (or of start only).

If You don't like this idea, please close/cancel/reject this issue.

[FEATURE] - Change encoding using FFMPEG

Since I have a hobby of filming on RC planes / quadcopters, I often get footage in H.265 encoding, but unfortunately when using Davinci Resolve for color grading and etc, in Linux there is a problem with this encoding, since it is proprietary. It would be very cool if VideoCut could transcode videos to other formats. For example "lossless" mjpeg. Very often I have to use the following one-liner -
ffmpeg -i $1 -vcodec mjpeg -q:v 2 -an -f mov $2. I haven't yet been able to understand the code of the FFMPEGTools.py, to do this my self.

Cut Video without audio stream

Hi, great tool! :-)

Just one minor issue: if I want to save a video that has no audio stream, it fails, see below.

I created a video just as a screen capture from my desktop for educational purposes, without the need for audio.
Here is what I used:
ffmpeg -video_size 1024x768 -framerate 25 -f x11grab -i :0.0+100,200 output.mp4
from https://trac.ffmpeg.org/wiki/Capture/Desktop

Log:

generate file: my.mp4
video: h264
Traceback (most recent call last):
  File "VideoCut.py", line 1255, in run
    self.function(*self.arguments)
  File "VideoCut.py", line 1088, in __makeCuts
    hasSucess = cutter.cutPart(t1, t2, index,slices)
  File "/home/ssi/dev/VideoCut/VideoCutter/build/videocut/FFMPEGTools.py", line 632, in cutPart
    audioMode = self._audioMode(self.MODE_CUT)
  File "/home/ssi/dev/VideoCut/VideoCutter/build/videocut/FFMPEGTools.py", line 664, in _audioMode
    log("audio:",self._config.streamData.getAudioStream().getCodec())
AttributeError: 'NoneType' object has no attribute 'getCodec'

I could simply resolve that by checking, if there is no audio stream, in which case I returned an empty array. This way, my cut video was saved perfectly!

in FFMPEGTools.py, line 664, in _audioMode
I added right at the beginning:

        if not self._config.streamData.getAudioStream():
            log("audio:","None")
            return []

[Feature] - Strict / Not strict timeline

It is worth adding the possibility that the pieces of the video could be assembled in a different order, for example, at the beginning a piece from the end, and at the end a piece from the beginning. For those moments when you need a mandatory sequence of frames (Ascending), you can add the STRICT mode.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.