Difference between revisions of "Video Editing"

From Freephile Wiki
Jump to navigation Jump to search
m (additional packages added)
m (formatting)
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
I have a video camera and several tapes with movies on them.  I have always intended to take the movies off the tapes as they were recorded, and transfer them to my PC.  Once on the PC, I want to edit the movies (delete scenes, add transitions, etc.) I also want to use the PC for either permanent archival (since disk is relatively cheap), or transfer the movies to CD / DVD for permanent storage.  Actually, this is the biggest goal of all: turning my home movies into something on CD or DVD that I can easily watch and share.  Starting the New Year off right, I decided I would take the plunge and finally do it.  Here then is my tale.
+
== Applications ==
  
Let's face it, watching home movies using your video camera and a collection of tapes is not too easy, nor too fun.  It should be a lot easier, like popping in a CD or DVD into the DVD player, then sitting back on the sofa with the remote control. 
 
  
The equipment: 
 
*Panasonic MiniDV camcorder with 1394 (firewire) port
 
*IEEE 1394 (firewire) card for PC
 
*IEEE 1394 cable
 
*PC with over 68 GB of free space and 756MB of RAM (On my Debian system running the KDE desktop, I can get this information through the KDE Info Center)
 
  
 +
There are several fully professional "Non-Linear Video Editing" applications in the free software realm.  I've only briefly toyed with them so I can't tell you from personal experience how easy it might be to do a quick project.  But Blender, OpenShot and KDENLiVE are amazing free software applications.
  
==Debian packages added==
 
  
#coriander (version 1.0.0-pre3-2)
 
#dvgrab (version 1.6deb-1)
 
#ftplib3 (version 3.1-1-5)
 
#gscanbus (version 0.7.1-5)
 
#libdc1394-10 (version 0.9.5-1)
 
#bootcd (version 2.45)
 
#bootcd-dvdplus (version 2.45)
 
#bootcd-i386 (version 2.45)
 
#dvdauthor (version 0.6.10-4)
 
#dvdbackup (version 0.1.1-2)
 
#gstreamer0.8-dvd (version 0.8.6-1)
 
#liba52-0.7.4 (version 0.7.4-1)
 
#libdvdnav4 (version 0.1.9-3)
 
#libdvdread3 (version 0.9.4-5)
 
#syslinux (version 2.11-0.1)
 
#vdr (version 1.2.6-5)
 
#vdr-kbd (version 1.2.6-5)
 
#vdr-plugin-dvd (version 0.3.4-rc10-1)
 
  
'''Coriander''' control IEEE1394 digital camera
+
=== Editing ===
 +
These are some of the free editing tools.  More can be found at https://directory.fsf.org/wiki/Category/Video
 +
; [https://www.blender.org/ Blender]
 +
: {{#ev:youtube|https://www.youtube.com/watch?v=pznQweUD9x0|300|right|Basic Video Editing in Blender|frame}}
 +
: is simply an awesome program. 
 +
: It is used mostly for 3-d design and modelling, but it also is quite capable at video editing.
 +
: Blender works on both Windows and Linux. Lots of tutorials on YouTube (see right for example) 
 +
; [http://www.openshot.org/features/ OpenShot]
 +
: {{#ev:youtube|https://www.youtube.com/watch?v=_0nEHxtTjk4|300|right|OpenShot 2.0 reaches beta|frame}}
 +
: is another Linux only NLVE, and might be more 'beginner friendly'
 +
; [http://ffmpeg.org/ FFmpeg] [[wp:FFmpeg]]
 +
: One of, if not ''the'' most useful tool in the land of multimedia is FFMPEG.
 +
; [http://www.transcoding.org/cgi-bin/transcode Transcode] [[wp:Transcode_(software)]]
 +
: tool is built using the libavcodec library of FFmpeg.
 +
; [http://www.avidemux.org/ Avidemux] [[wp:Avidemux]] ([http://www.avidemux.org/admWiki/index.php?title=Main_Page wiki])
 +
: Available in three user interfaces (GTK+, QT4 and cli) for all major operating systems. 
 +
: Avidemux is a free video editor designed for simple cutting, filtering and encoding tasks. It's graphical user interface looks pretty similar to VirtualDub and most features known from VirtualDub are available too.
 +
: Avidemux natively supports a great number of file types, such as AVI, MPEG, VOB, TS, MP4, ASF, OGM, MKV and FLV. At the same time Avidemux natively supports a wide range of Video/Audio formats, including MPEG-1, MPEG-2, MPEG-4 ASP, H.264/AVC, DV, HuffYUV, MP3, AAC, AC-3 and Vorbis. Tasks can be automated using projects, job queue and powerful scripting capabilities. Video-DVD or (S)VCD compliant streams can be created with easy-to-use "Auto" wizards. Multi-threading is supported! See also: [http://forum.doom9.org/showthread.php?t=126164 FAQ] at doom9
 +
; [http://www.pitivi.org/ PiTiVi]
 +
: is a video editor designed to be user-friendly and powerful
 +
; [http://www.gopchop.org GOPchop]
 +
: is a "Graphical MPEG Clipper" - a Linux-based GUI program for removing sections from a video file with the minimum amount of disturbance to the stream.  It does this by writing specific "Group of Pictures" (GOP) sections to a new video file.  The GOPs will decode correctly and the gaps won't be noticed.
 +
; [http://handbrake.fr/ HandBrake] [[mw:HandBrake]]
 +
: is a software application that can convert MPEG video (including DVD-Video) into a MPEG-4 video file in .mp4, .avi, .ogm, or .mkv containers.
 +
; [http://kinodv.org/ kino] [[wp:Kino_(software)]]
 +
: Kino is great for working with the DV format and IEEE 1394 (firewire) interfaces
 +
; [http://kdenlive.org/ kdenlive]  [[wp:Kdenlive]]
 +
: A nice "pro-sumer" (hobbyist, close to professional needs)  tool.  Kdenlive has instructions on how to make and add a tutorial to their site, including how to create and upload desktop recordings onto vimeo.com  http://kdenlive.org/contribution-manual/how-make-video-tutorial {{#ev:youtube|https://www.youtube.com/watch?v=9kkaUd7nBKo|300|right|KDENLiVE|frame}} Currently only runs on Linux (but there are efforts to port it to Mac and Windows).
 +
; [http://www.heroinewarrior.com/cinelerra.php cinelerra] [[wp:Cinelerra]] https://cinelerra-cv.org/
 +
: is a significant project, aimed at the professional user.  It's both a NLVE and a compositing application.  There is a friendly fork called the Community Version (CV) as compared to the original Heroine Warrior (HW) version.
  
Coriander is a GUI that lets you control all the features of an
+
=== Video Slideshows ===
IEEE-1394 Digital Camera complying with the DC Specifications v1.04 or
+
; [http://ffdiaporama.tuxfamily.org/ ffDiaporama] : for making a slideshow video, and it's not bad. However, it simply refused to render my project with a 'encode error'. It is also outdated (last release in 2014) and doesn't install properly on newer Ubuntu.  The project itself is a fork of the even less maintained Diaporama
later (see [http://www.1394ta.org]).
+
; [http://imagination.sourceforge.net/ Imagination] : is a simple tool.  Last released in 2011, there is at least a note in 2017 that contributions are welcome.  The results weren't bad either.  But, I still like the power of OpenShot.
  
'''dvgrab''' Grab digital video data via IEEE1394 links
+
=== Players ===
 +
; [http://www.mplayerhq.hu/design7/info.html MPlayer] [[wp:MPlayer]]
 +
: is one of the most essential players in the Free Software world.  The project works in tandem with FFmpeg.  MPlayer software includes the '''Mencoder''' commandline tool
 +
; VLC
 +
: vlc is cross-platform and wonderful.  It even works on your phone.
  
dvgrab receives audio and video data from a digital camcorder via an
 
IEEE1394 (widely known as FireWire) link and stores them into one of
 
several file formats. It features autosplit of long video sequences,
 
and supports saving the data as raw frames, AVI type 1, AVI type 2,
 
Quicktime DV, or a series of JPEG stills.
 
  
'''gscanbus''' scan IEEE1394 (firewire/i.link) bus
+
=== Transcoding ===
 +
http://programmer-art.org/projects/arista-transcoder
  
gscanbus is a little bus scanning, testing and topology visualizing
+
== Mencoder and ffmpeg examples ==
tool for the Linux IEEE1394 subsystem, with some AV/C support,
 
especially for controlling Camcorders and VCRs. It is intended as a
 
debugging tool for IEEE1394 development, but can also be used to
 
simply check your IEEE1394 setup on Linux. (see [http://gscanbus.berlios.de/])
 
  
'''libdc1394''' high level programming interface for IEEE1394 digital camera
+
If you only want a 5-minute clip, the first thing to do would probably
 +
be to throw away the other 55 minutes of video.  That should make all
 +
your files load much faster. :)
  
libdc1394 is a library that is intended to provide a high level
+
You can extract the part you want with mplayer like this:
programming interface for application developers who wish to control
+
<source lang="bash">
IEEE 1394 based cameras that conform to the 1394-based Digital Camera
+
$ mencoder -ovc copy -oac copy infile -ss 00:10:09.5 -endpos 00:05:00 -o outfile
Specification (found at [http://www.1394ta.org/]). This package contains shared libraries.
+
</source>
 +
"-ovc" means "output video codec", "-oac" means "output audio codec",
 +
the "-ss" argument skips ahead to 10 minutes 9.5 seconds into the
 +
video, and "-endpos" tells mencoder to transcode exactly 5 minutes.
 +
"copy" is a special codec name that tells mplayer to just streamcopy
 +
the audio and video streams to output... essentially cutting out the
 +
5-minute segment that you want.
  
'''libraw1394''' library for direct access to IEEE 1394 bus (aka FireWire)
+
This can also be done with ffmpeg:
 +
<source lang="bash">
 +
$ ffmpeg -acodec copy -vcodec copy -itsoffset -00:10:09.5 -i infile -ss 00:10:09.5 -t 00:05:00 outfile
 +
</source>
 +
Note that the "-itsoffset" option must be specified to make sure that
 +
A/V timestamps synchronize, and that its value must be the negative of
 +
the "-ss" argument.
  
libraw1394 is the only supported interface to the kernel side raw1394
+
Note that, for BOTH mencoder and ffmpeg, the order of command-line
of the Linux IEEE-1394 subsystem, which provides direct access to the
+
options and arguments is not just significant, it's HIGHLY significant.
connected 1394 buses to user space.  Through libraw1394/raw1394,
 
applications can directly send to and receive from other nodes without
 
requiring a kernel driver for the protocol in question.
 
  
'''libavc1394''' control IEEE1394 audio/video devices
+
To transcode the video, specify the output codecs as the "vcodec" and
 +
"acodec" sub-options to the libavcodec option (-lavcopts):
 +
<source lang="bash">
 +
$ mencoder -ovc lavc -oac lavc -lavcopts vcodec=mpeg4:acodec=ac3 infile -o outfile
 +
</source>
 +
Here, "lavc" means to use one of the libavcodec codecs, specified by
 +
the "vcodec" and "acodec" suboptions to the "-lavcopts" option (which
 +
specifies options for libavcodec).  mencoder has about a bazillion^2
 +
command line options, sub options, sub sub options, and can get quite
 +
confusing.  ffmpeg can also transcode audio and video streams from one
 +
codec to another.
  
libavc1394 is a programming interface for the 1394 Trade Association AV/C
+
If you want to change the framerate of the video, you can use
(Audio/Video Control) Digital Interface Command Set. It allows you to
+
something like this:
remote control camcorders and similar devices connected to your computer
+
<source lang="bash">
via an IEEE1394 (aka Firewire) link. This package includes the libraries needed to run executables using
+
$ mencoder -ofps 25 -oac copy -ovc copy -o outfile infile
libavc1394.
+
</source>
 +
Note that, whenever you use "copy" as the codec, mplayer will copy the
 +
corresponding stream to the output unmodified.  That means it will ignore
 +
any filters set up to modify the copied stream.  This is a BIG gotcha.
 +
 
 +
For example:
 +
<source lang="bash">
 +
$ mencoder -oac copy -ovc copy -af volume=10 -o outfile infile
 +
</source>
 +
WILL NOT DO what you probably want, because with "-oac copy" the
 +
"volume" audio filters (specified with "-af") will be ignored, and the
 +
audio in outfile will be at the SAME volume as the audio in infile.
 +
 
 +
When capturing video in the US, you may also run into problems with
 +
video interlacing. Fortunately, mencoder has deinterlacing video
 +
filters, for example "-vf pp=lb".
 +
 
 +
 
 +
== See Also ==
 +
[[Video Editing/My Story]]
 +
 
 +
[[Category:Video]]
 +
[[Category:Multimedia]]
 +
[[Category:Howto]]
 +
[[Category:Applications]]

Latest revision as of 14:56, 17 June 2017

Applications[edit | edit source]

There are several fully professional "Non-Linear Video Editing" applications in the free software realm. I've only briefly toyed with them so I can't tell you from personal experience how easy it might be to do a quick project. But Blender, OpenShot and KDENLiVE are amazing free software applications.


Editing[edit | edit source]

These are some of the free editing tools. More can be found at https://directory.fsf.org/wiki/Category/Video

Blender
Basic Video Editing in Blender
is simply an awesome program.
It is used mostly for 3-d design and modelling, but it also is quite capable at video editing.
Blender works on both Windows and Linux. Lots of tutorials on YouTube (see right for example)
OpenShot
OpenShot 2.0 reaches beta
is another Linux only NLVE, and might be more 'beginner friendly'
FFmpeg wp:FFmpeg
One of, if not the most useful tool in the land of multimedia is FFMPEG.
Transcode wp:Transcode_(software)
tool is built using the libavcodec library of FFmpeg.
Avidemux wp:Avidemux (wiki)
Available in three user interfaces (GTK+, QT4 and cli) for all major operating systems.
Avidemux is a free video editor designed for simple cutting, filtering and encoding tasks. It's graphical user interface looks pretty similar to VirtualDub and most features known from VirtualDub are available too.
Avidemux natively supports a great number of file types, such as AVI, MPEG, VOB, TS, MP4, ASF, OGM, MKV and FLV. At the same time Avidemux natively supports a wide range of Video/Audio formats, including MPEG-1, MPEG-2, MPEG-4 ASP, H.264/AVC, DV, HuffYUV, MP3, AAC, AC-3 and Vorbis. Tasks can be automated using projects, job queue and powerful scripting capabilities. Video-DVD or (S)VCD compliant streams can be created with easy-to-use "Auto" wizards. Multi-threading is supported! See also: FAQ at doom9
PiTiVi
is a video editor designed to be user-friendly and powerful
GOPchop
is a "Graphical MPEG Clipper" - a Linux-based GUI program for removing sections from a video file with the minimum amount of disturbance to the stream. It does this by writing specific "Group of Pictures" (GOP) sections to a new video file. The GOPs will decode correctly and the gaps won't be noticed.
HandBrake mw:HandBrake
is a software application that can convert MPEG video (including DVD-Video) into a MPEG-4 video file in .mp4, .avi, .ogm, or .mkv containers.
kino wp:Kino_(software)
Kino is great for working with the DV format and IEEE 1394 (firewire) interfaces
kdenlive wp:Kdenlive
A nice "pro-sumer" (hobbyist, close to professional needs) tool. Kdenlive has instructions on how to make and add a tutorial to their site, including how to create and upload desktop recordings onto vimeo.com http://kdenlive.org/contribution-manual/how-make-video-tutorial
KDENLiVE
Currently only runs on Linux (but there are efforts to port it to Mac and Windows).
cinelerra wp:Cinelerra https://cinelerra-cv.org/
is a significant project, aimed at the professional user. It's both a NLVE and a compositing application. There is a friendly fork called the Community Version (CV) as compared to the original Heroine Warrior (HW) version.

Video Slideshows[edit | edit source]

ffDiaporama 
for making a slideshow video, and it's not bad. However, it simply refused to render my project with a 'encode error'. It is also outdated (last release in 2014) and doesn't install properly on newer Ubuntu. The project itself is a fork of the even less maintained Diaporama
Imagination 
is a simple tool. Last released in 2011, there is at least a note in 2017 that contributions are welcome. The results weren't bad either. But, I still like the power of OpenShot.

Players[edit | edit source]

MPlayer wp:MPlayer
is one of the most essential players in the Free Software world. The project works in tandem with FFmpeg. MPlayer software includes the Mencoder commandline tool
VLC
vlc is cross-platform and wonderful. It even works on your phone.


Transcoding[edit | edit source]

http://programmer-art.org/projects/arista-transcoder

Mencoder and ffmpeg examples[edit | edit source]

If you only want a 5-minute clip, the first thing to do would probably be to throw away the other 55 minutes of video. That should make all your files load much faster. :)

You can extract the part you want with mplayer like this:

$ mencoder -ovc copy -oac copy infile -ss 00:10:09.5 -endpos 00:05:00 -o outfile

"-ovc" means "output video codec", "-oac" means "output audio codec", the "-ss" argument skips ahead to 10 minutes 9.5 seconds into the video, and "-endpos" tells mencoder to transcode exactly 5 minutes. "copy" is a special codec name that tells mplayer to just streamcopy the audio and video streams to output... essentially cutting out the 5-minute segment that you want.

This can also be done with ffmpeg:

$ ffmpeg -acodec copy -vcodec copy -itsoffset -00:10:09.5 -i infile -ss 00:10:09.5 -t 00:05:00 outfile

Note that the "-itsoffset" option must be specified to make sure that A/V timestamps synchronize, and that its value must be the negative of the "-ss" argument.

Note that, for BOTH mencoder and ffmpeg, the order of command-line options and arguments is not just significant, it's HIGHLY significant.

To transcode the video, specify the output codecs as the "vcodec" and "acodec" sub-options to the libavcodec option (-lavcopts):

$ mencoder -ovc lavc -oac lavc -lavcopts vcodec=mpeg4:acodec=ac3 infile -o outfile

Here, "lavc" means to use one of the libavcodec codecs, specified by the "vcodec" and "acodec" suboptions to the "-lavcopts" option (which specifies options for libavcodec). mencoder has about a bazillion^2 command line options, sub options, sub sub options, and can get quite confusing. ffmpeg can also transcode audio and video streams from one codec to another.

If you want to change the framerate of the video, you can use something like this:

$ mencoder -ofps 25 -oac copy -ovc copy -o outfile infile

Note that, whenever you use "copy" as the codec, mplayer will copy the corresponding stream to the output unmodified. That means it will ignore any filters set up to modify the copied stream. This is a BIG gotcha.

For example:

$ mencoder -oac copy -ovc copy -af volume=10 -o outfile infile

WILL NOT DO what you probably want, because with "-oac copy" the "volume" audio filters (specified with "-af") will be ignored, and the audio in outfile will be at the SAME volume as the audio in infile.

When capturing video in the US, you may also run into problems with video interlacing. Fortunately, mencoder has deinterlacing video filters, for example "-vf pp=lb".


See Also[edit | edit source]

Video Editing/My Story