unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* GNU Emacs: A multimedia editor
@ 2022-01-28  4:49 Anand Tamariya
  2022-01-28  4:57 ` Po Lu
  2022-01-28 21:05 ` Tomas Hlavaty
  0 siblings, 2 replies; 9+ messages in thread
From: Anand Tamariya @ 2022-01-28  4:49 UTC (permalink / raw)
  To: Emacs Devel

[-- Attachment #1: Type: text/plain, Size: 525 bytes --]

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.

*Video*: https://youtu.be/F6HSf5D6TtA
*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

*Details*:
https://lifeofpenguin.blogspot.com/2022/01/gnu-emacs-multimedia-editor.html

[-- Attachment #2: Type: text/html, Size: 951 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GNU Emacs: A multimedia editor
  2022-01-28  4:49 GNU Emacs: A multimedia editor Anand Tamariya
@ 2022-01-28  4:57 ` Po Lu
  2022-01-28 21:05 ` Tomas Hlavaty
  1 sibling, 0 replies; 9+ messages in thread
From: Po Lu @ 2022-01-28  4:57 UTC (permalink / raw)
  To: Anand Tamariya; +Cc: Emacs Devel

Anand Tamariya <atamariya@gmail.com> writes:

> 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.

Would you please rebase your changes onto a recent copy of Emacs, and
send them as a patch?  Without that, it's hard to review or use your
code at all, much less include it with Emacs.

You will also need to sign copyright papers, I think.

Thanks in advance.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GNU Emacs: A multimedia editor
  2022-01-28  4:49 GNU Emacs: A multimedia editor Anand Tamariya
  2022-01-28  4:57 ` Po Lu
@ 2022-01-28 21:05 ` Tomas Hlavaty
  2022-01-28 22:04   ` John Covici
  2022-01-31  5:44   ` Anand Tamariya
  1 sibling, 2 replies; 9+ messages in thread
From: Tomas Hlavaty @ 2022-01-28 21:05 UTC (permalink / raw)
  To: Anand Tamariya; +Cc: Emacs Devel

On Fri 28 Jan 2022 at 10:19, Anand Tamariya <atamariya@gmail.com> wrote:
> 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.

Nice!

What does "simple multimedia editing tasks" mean exactly?

I have been using melt https://mltframework.org/ (with wrapper smelt) to
edit videos using plain text.  Once I figure out how to do something
(sometimes a challenge), editing is much more convenient than using
point and click interface.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GNU Emacs: A multimedia editor
  2022-01-28 21:05 ` Tomas Hlavaty
@ 2022-01-28 22:04   ` John Covici
  2022-01-29 19:25     ` Tomas Hlavaty
  2022-01-31  5:44   ` Anand Tamariya
  1 sibling, 1 reply; 9+ messages in thread
From: John Covici @ 2022-01-28 22:04 UTC (permalink / raw)
  To: Tomas Hlavaty; +Cc: Emacs Devel, Anand Tamariya

Where can I get the smelt wrapper?

On Fri, 28 Jan 2022 16:05:44 -0500,
Tomas Hlavaty wrote:
> 
> On Fri 28 Jan 2022 at 10:19, Anand Tamariya <atamariya@gmail.com> wrote:
> > 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.
> 
> Nice!
> 
> What does "simple multimedia editing tasks" mean exactly?
> 
> I have been using melt https://mltframework.org/ (with wrapper smelt) to
> edit videos using plain text.  Once I figure out how to do something
> (sometimes a challenge), editing is much more convenient than using
> point and click interface.
> 

-- 
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

         John Covici wb2una
         covici@ccs.covici.com



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GNU Emacs: A multimedia editor
  2022-01-28 22:04   ` John Covici
@ 2022-01-29 19:25     ` Tomas Hlavaty
  2022-01-29 22:26       ` John Covici
  0 siblings, 1 reply; 9+ messages in thread
From: Tomas Hlavaty @ 2022-01-29 19:25 UTC (permalink / raw)
  To: covici; +Cc: Emacs Devel, Anand Tamariya

[-- Attachment #1: Type: text/plain, Size: 214 bytes --]

On Fri 28 Jan 2022 at 17:04, John Covici <covici@ccs.covici.com> wrote:
> Where can I get the smelt wrapper?

mlt-devel
message id:3d33cf6c-0b59-c8e4-2c10-ed7739c8984c@gmail.com
see attachment (also this message)


[-- Attachment #2: smelt --]
[-- Type: application/octet-stream, Size: 2557 bytes --]

#!/usr/bin/env perl

$ver=0.01;

#TODO:
#Add recursion loop detection.
#Add option to specify file name of written file via command line?
#Change all print's to send to STDERR?
#See if it works for melt to send to stdout, allowing smelt > filename.mp4 to work?

$ver=0.02;#2016/10/02 07:07PM: Changed it so the command line is melt syntax, added TODOs above.


if($#ARGV<0)
{
	print "\n";
	print "Smelt version $ver - recursive multiple file reader for melt.\n";
	print "By Jesse Gordon. Released as public domain.\n";
	print "Usage:\n";
	print "$0 [--showcommand] <melt argument> [more [and more melt arguments[...]]]\n";
	print "inside of a file:\n";
	print "	melt:<filename> to include another filename (Do not quote),\n";
	print "	# for a comment at any position in a line:\n";
	print "		Everything after the # is ignored.\n";
	print "	--showcommand: Show the melt command instead of running it.\n";
	print "		(Can be anyplace in command line parameters.)\n";
	print "\n";
	exit (0);
}

$deep=0;

sub readfile
{
	$deep++;
	my $filename=shift;
	my $fh;
	if (open($fh,$filename))
	{
		print '  ' x $deep;
		#print "Opened file '$filename' for reading..\n";
		print "Reading '$filename'\n";
		my $line;
		while($line=<$fh>)
		{
			$line=~s/[\r\n]//g;	#Drop all newlines stuff from end of line.
			$line=~s/#.*//g;	#Drop comment symbol and all following
			$line=~s/^[ \t]*//g;	#Drop leading tabs/spaces
			$line=~s/[ \t]*$//g;	#Drop trailing tabs/spaces
			if($line ne "")
			{
			#	print "line='$line'\n";
				if($line=~m/^melt:/i)
				{
					$line=~s/^melt://gi;
				#	print "including '$line'\n";
					readfile($line);
				}else{
					my $word;
					foreach $word (split(/ /,$line))
					{
					#	print "	word='$word'\n";
						push(@args,$word);
					}
				}
			}
		}
		close($fh);
		#print '  ' x $deep;
		#print "Closed file '$filename'\n";
	}else{
		print "ERROR: Unable to open '$filename' for reading!\n";
		print "Recursion level is $deep,\n";
		print "and if that is a high number, you may have an\n";
		print "include loop. (i.e. a file including itself.)\n";
	}
	$deep--;
}

foreach $arg (@ARGV)
{
	if($arg=~m/--showcommand/i)
	{
		$showcmd=1;
#	}
#	elsif($arg=~m/-h/i)	#Don't want to remap too many things, they might be used by melt..
#	{
#		print "For help, run $0 with no parameters.\n";
#		exit(0);
	}else{
		if($arg=~m/^melt:/i)
		{
			$arg=~s/^melt://ig;
			readfile($arg);
		}else{
			push(@args,$arg);
		}
	}
}

$cmd="melt";
foreach $arg (@args)
{
	$cmd="$cmd '$arg'";
}

if($showcmd)
{
	print "\n\n$cmd\n\n";
}else{
	system($cmd);
}

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GNU Emacs: A multimedia editor
  2022-01-29 19:25     ` Tomas Hlavaty
@ 2022-01-29 22:26       ` John Covici
  2022-01-29 22:30         ` Tomas Hlavaty
  0 siblings, 1 reply; 9+ messages in thread
From: John Covici @ 2022-01-29 22:26 UTC (permalink / raw)
  To: Tomas Hlavaty; +Cc: Emacs Devel, Anand Tamariya

I cannot find mltdevel either .com, .net, or .org -- can you te more
specific?

On Sat, 29 Jan 2022 14:25:32 -0500,
Tomas Hlavaty wrote:
> 
> [1  <text/plain (7bit)>]
> On Fri 28 Jan 2022 at 17:04, John Covici <covici@ccs.covici.com> wrote:
> > Where can I get the smelt wrapper?
> 
> mlt-devel
> message id:3d33cf6c-0b59-c8e4-2c10-ed7739c8984c@gmail.com
> see attachment (also this message)
> 
> [2 smelt <application/octet-stream (base64)>]

-- 
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

         John Covici wb2una
         covici@ccs.covici.com



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GNU Emacs: A multimedia editor
  2022-01-29 22:26       ` John Covici
@ 2022-01-29 22:30         ` Tomas Hlavaty
  0 siblings, 0 replies; 9+ messages in thread
From: Tomas Hlavaty @ 2022-01-29 22:30 UTC (permalink / raw)
  To: covici; +Cc: Emacs Devel, Anand Tamariya

On Sat 29 Jan 2022 at 17:26, John Covici <covici@ccs.covici.com> wrote:
> I cannot find mltdevel either .com, .net, or .org -- can you te more
> specific?

It is a mailing list mlt-devel@lists.sourceforge.net

   (eww "? mlt-devel@lists.sourceforge.net")

Anyway, the small script called smelt was attached to the previous
email.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GNU Emacs: A multimedia editor
  2022-01-28 21:05 ` Tomas Hlavaty
  2022-01-28 22:04   ` John Covici
@ 2022-01-31  5:44   ` Anand Tamariya
  2022-01-31 15:16     ` T.V Raman
  1 sibling, 1 reply; 9+ messages in thread
From: Anand Tamariya @ 2022-01-31  5:44 UTC (permalink / raw)
  To: Tomas Hlavaty; +Cc: Emacs Devel

[-- Attachment #1: Type: text/plain, Size: 1402 bytes --]

> What does "simple multimedia editing tasks" mean exactly?
>

These are 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
I'm used to arrow keys for forward/backward movement.

- 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.

- 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
- 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


>
> I have been using melt https://mltframework.org/ (with wrapper smelt) to
> edit videos using plain text.  Once I figure out how to do something
> (sometimes a challenge), editing is much more convenient than using
> point and click interface.
>
Agreed.

[-- Attachment #2: Type: text/html, Size: 2019 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GNU Emacs: A multimedia editor
  2022-01-31  5:44   ` Anand Tamariya
@ 2022-01-31 15:16     ` T.V Raman
  0 siblings, 0 replies; 9+ messages in thread
From: T.V Raman @ 2022-01-31 15:16 UTC (permalink / raw)
  To: Anand Tamariya; +Cc: Tomas Hlavaty, Emacs Devel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=gb18030, Size: 1971 bytes --]

Anand Tamariya <atamariya@gmail.com> writes:


I do all this with mplayer -- via module emacspeak-m-player which has  a
lot of mplayer tricks in it.


See
https://github.com/tvraman/emacspeak/blob/master/lisp/emacspeak-m-player.el#start-of-content
for marking and writing out clips (both audio and video)

>     What does "simple multimedia editing tasks" mean exactly?
>
> These are 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
> I'm used to arrow keys for forward/backward movement.
>
> - 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.
>
> - 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
> - 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
>  
>     
>     I have been using melt https://mltframework.org/ (with wrapper
>     smelt) to
>     edit videos using plain text.  Once I figure out how to do
>     something
>     (sometimes a challenge), editing is much more convenient than
>     using
>     point and click interface.
>
> Agreed. 
>

-- 

Thanks,

--Raman(I Search, I Find, I Misplace, I Research)
7©4 Id: kg:/m/0285kf1  •0Ü8



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-01-31 15:16 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-28  4:49 GNU Emacs: A multimedia editor Anand Tamariya
2022-01-28  4:57 ` Po Lu
2022-01-28 21:05 ` Tomas Hlavaty
2022-01-28 22:04   ` John Covici
2022-01-29 19:25     ` Tomas Hlavaty
2022-01-29 22:26       ` John Covici
2022-01-29 22:30         ` Tomas Hlavaty
2022-01-31  5:44   ` Anand Tamariya
2022-01-31 15:16     ` T.V Raman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).