GNU Emacs: A multimedia editor

Ever wondered - what if multimedia editing were as simple as text manipulation? Simple cut, copy and paste operations. Thanks to VLC and FFMPEG, now you can use GNU Emacs for simple multimedia editing tasks.



Code:
https://gitlab.com/atamariya/emacs/-/blob/dev/src/xwidget.c
https://gitlab.com/atamariya/emacs/-/blob/dev/lisp/xwidget.el
https://gitlab.com/atamariya/emacs/-/blob/dev/lisp/media.el


Concepts

- Number denotes a file and an amount of time defined by a scale. e.g. if the scale is 10 seconds, digit 1 denotes 10s clip from file number 1. Corresponding file name is displayed in the dashboard.
- Red coloured digit represents a fraction of scale time. e.g. if scale is 10s, it might represent 0-10 s clip.
- Number denotes the start time of the clip.
- Dot denotes a blank clip for an amount of time defined by a scale.
- Whitespace is only a visual separator.
- In the viewer window, use o for opening a file, e for exporting, SPC for toggling play, and RET for splitting the clip.
- In the track window, all the above commands are available with 'C-c m' prefix.

 

Why you might find it useful?

There are some really simple tasks which are not bothersome for one-off use in GUI interface (eg. in openshot video editor). However, since I was doing it more often, it was getting increasingly infuriating.

- Trim segments from start and end
Most common use-case since I was screen recording using ffmpeg.

- Seek previous/next

After pausing video using SPC, use arrow keys for forward/backward movement to find appropriate extent for a segment.

- Create segments
Press RET in viewer mode or RET/SPC in track mode to create a segment.

- Bookmark
When you have more than two segments, it's useful to bookmark segments for easier recall of their purpose or sequence. And with Emacs bookmarks, jumping to them is easy too.

- Delete segment
- Remove void
When you delete a segment, a void is created. You need to move all subsequent segments to cover up the void. In my implementation, segments follow each other ignoring whitespaces. So no readjustment is required.

- Re-order segments
Sometimes only during editing you realize, a segment should appear before another.

- Export to appropriate format
With ffmpeg, I only need to choose appropriate file extension and it picks up sensible defaults. No information overload with a myriad of options.

- Merge segments from multiple files 


 

 

 

Comments

  1. Is there a way to get it into main emacs? Or is this just for you?

    ReplyDelete
    Replies
    1. Just need enough time to send a patch and follow up with the merge process. At present, I barely have enough time to build what I need. Any help is appreciated.

      Delete
  2. Nice work! I'm a vim user and emacs org-mode user.

    Just wrote a similar vim plugin: https://github.com/scateu/tsv_edl.vim

    Hope some design considerations may be helpful to you.

    Cheers!

    ReplyDelete

Post a Comment

Popular posts from this blog

GNU Emacs as a Comic Book Reader

Tinylisp and Multi-threaded Emacs

Data Visualization with GNU Emacs