LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-20-2008, 05:13 PM   #1
JoeyAdams
Member
 
Registered: Jun 2006
Distribution: Kubuntu Hardy
Posts: 94

Rep: Reputation: 15
Unix-style video editing (i.e. with pipes, etc.)


Is there a video-editing package available that is similar to something like this?:

Code:
vopen initial.ogg | vcrop -rect 10,10,300,400 | \
  vfilter -brightness +10 | vclose > final.ogg
The purpose of this type of video editing toolchain would be to have a simple and consistent backend upon which graphical video editors could be built in addition to being able to use shell scripting techniques to perform complex video editing tasks.

In my implementation of the idea, vopen decompresses the video and makes it suitable for passing through pipes. vclose recompresses it into ogg. What should happen is that `vopen initial.ogg > initial.yuv' will create a huge file if the initial.ogg is long, but the above code chain won't create such a large memory footprint because data is handled in small amounts at a time due to the nature of pipes. This is similar to the advantage of doing `dd if=/dev/sda1 | gzip > sda1.gz' rather than `dd if=/dev/sda1 of=sda1.img ; gzip sda1.img'.

If such a system hasn't been created yet, what do you suppose the pros and cons of it would be?

Last edited by JoeyAdams; 03-20-2008 at 05:16 PM. Reason: Made code 2 lines instead of 1; changed initial.vid to initial.yuv based on research of Theora.
 
Old 03-21-2008, 12:00 AM   #2
JoeyAdams
Member
 
Registered: Jun 2006
Distribution: Kubuntu Hardy
Posts: 94

Original Poster
Rep: Reputation: 15
Actually, I've rethought my idea. My new idea is that the intermediary data from vopen to vclose (now called vsave) will be references to original video files that will take up a very small amount of space. The previous system would be terrible for complex actions, as it would require a lot of waiting and would have the overhead of piping all that data by-value. Therefore, in something like this:

Code:
vopen in.ogg > v #opens video and stores it to clip file v
cat v | vclip 0.3s 2s > a #clips out seconds 0.3 to 2 of v into a
cat v | vclip 3s 4.001s > b #clips out seconds 3 to 4.001 of v into a
cat a b | vsave > out.ogg #combines the clips of a and b and saves them to out.ogg
It will create tiny reference files that can be operated on quickly before the save.
 
Old 03-21-2008, 10:04 AM   #3
simplicissimus
Registered User
 
Registered: Mar 2008
Posts: 104

Rep: Reputation: 15
mplayer

Tools like mplayer, mencoder, ffmpeg, tovid are those you might want to check first. Mplayer has options to cut out slices from video files and/or separating or replacing audio channels. I'm not sure if it does cropping and zooming as well, but if you really want to go into video editing, then mplayer surely is a good place to start or at least to see how they have implemented the core functionality.

For some reason video editing is not very strong on Linux. Any development you do in this area is welcome. Give feedback on your proceedings.

Regards,
SIMP

Fedora Development

Last edited by simplicissimus; 04-02-2008 at 04:54 AM.
 
Old 03-21-2008, 02:17 PM   #4
JoeyAdams
Member
 
Registered: Jun 2006
Distribution: Kubuntu Hardy
Posts: 94

Original Poster
Rep: Reputation: 15
Indeed, those programs do have a lot of the core functionality, and they would be excellent resources for the code needed for the project I'm talking about. However, the biggest weakness (in my opinion) is that you have to explicitly state the -ovc, -oac, and options (no automatic determination for, e.g., -wmv, -ogg, -flv). Also, I think the biggest weakness of video editing in Linux in general is that the only viable solutions seem to be weakly-coded GUIs, well-developed ones with poor backends, and/or confusing interfaces. By having a straightforward video editing backend, it could encourage the creation of a wide variety of open source video editing utilities.

Thanks for the input. I'm still developing my ideas. I'll try to post a design document soon and maybe even restart this thread in the Programming section.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: CLI tricks: UNIX Pipes, Streams and Redirections LXer Syndicated Linux News 0 09-16-2007 03:10 PM
Editing favorite in SUSE Style Menu shadowdancer SUSE / openSUSE 1 06-07-2007 02:15 PM
editing configs in woody - newbie style! trpost Debian 1 09-24-2004 01:30 PM
vi style command line editing in gnuplot 3.7 sirclif Linux - Software 0 09-20-2004 12:47 PM
The Elements Of Style: UNIX As Literature m0rl0ck General 7 10-03-2003 05:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration