View Full Version : Edit digital camera video in linux ??
oldcpu
11th September 2005, 18:50
Has anyone successfully editted the video output of a digital camera with Linux?
I know, I know, ... a digital camera is NOT the optimal device for recording video, but out of curiousity I took the 640x480, 30fps output of my Canon camera, and tried to see if I could edit it with Kino and KDEnlive. Neither package would open the raw .avi file from my Canon.
Do I have to convert the video to some intermediary format, before it can be opened by Kino or by KDEnlive? Has any one else tried, and been successful at this?
As a side note, AVIDEMUX can open the raw Canon video (640x480, 30fps) files, as can the script "tovid". "tovid" will also convert the clips to NTSC-film, NTSC-tv, and PAL, for replay on my DVD player (for I tried and succeeded).
But I would like to edit the clips before putting on a DVD (or VCD/SVCD).
KpeX
12th September 2005, 04:18
Assuming you're talking about a digital still camera....
Do you know what video codec your camera uses? Try checking the fourcc with avinfo or mplayer. Most DSC's are either MJPEG or some variant of mpeg-4 video. Once you've identified the format it'll be either to investigate your editing options.
If mplayer can play the file, you can convert it to huffyuv with mencoder, which is lossless and supported in most editors.
oldcpu
12th September 2005, 07:46
Assuming you're talking about a digital still camera....
Do you know what video codec your camera uses? Try checking the fourcc with avinfo or mplayer. Most DSC's are either MJPEG or some variant of mpeg-4 video. Once you've identified the format it'll be either to investigate your editing options.
If mplayer can play the file, you can convert it to huffyuv with mencoder, which is lossless and supported in most editors.
Yes, I am talking about a digital still camera. I could not find in the Canon manual documentation, mention of the codec used by Canon. But "tcprobe -i canon-s700.avi" (where "canon-s700.avi" is the name of the avi file) gives:
[tcprobe] RIFF data, AVI video
[avilib] V: 30.000 fps, codec=MJPG, frames=1104, width=640, height=480
[avilib] A: 11024 Hz, format=0x01, bits=8, channels=1, bitrate=88 kbps,
[avilib] 37 chunks, 405684 bytes, CBR
[tcprobe] summary for canon-s700.avi, (*) = not default, 0 = not detected
import frame size: -g 640x480 [720x576] (*)
frame rate: -f 30.000 [25.000] frc=0 (*)
audio track: -a 0 [0] -e 11024,8,1 [48000,16,2] -n 0x1 [0x2000] (*)
bitrate=88 kbps
length: 1104 frames, frame_time=33 msec, duration=0:00:36.799
I will try converting it to huffyuv and see if that helps. Thanks for the suggestion.
oldcpu
12th September 2005, 20:47
If mplayer can play the file, you can convert it to huffyuv with mencoder, which is lossless and supported in most editors.
I'm beginning to think the "audio" format of the Canon avi file may be the problem with "KDEnlive" and "kino". I used mencode to convert the video (keeping the audio the same) to huffyuv, and I had the same error message. Mencode command line I used was:
mencoder canonfile.avi -o outputfile.avi -ovc lavc -oac copy audiomuxer 17 -lavcopts vcodec=huffyuv:format=422p
I suspect the above line could be improved upon, but the "outputfile.avi" was not acceptable to "kino" nor "KDEnlive" (but could be played by mplayer and xine).
"avidemux" information on the original "canonfile.avi" tells me it is a PCM audio format (8 bit). I can extract the audio to mp3 with "avidemux", and also can extract the audio file to a wav format with mplayer:
mplayer -vo null pcm canonfile.avi (creates a audiodump.wav file).
I'm now considering stripping out the audio, and remuxing the audio (in a different format) back to the video, for input to "KDEnlive" and "kino". I still haven't figured out what program I should use to remux.
The learning curve here is rather steep and fraught with frustration. This is a lot of work to make the file useable.
mean
13th September 2005, 08:11
just out of curiosity, what is avidemux lacking so that you cannot use it to do the whole processing with it ?
oldcpu
13th September 2005, 12:53
just out of curiosity, what is avidemux lacking so that you cannot use it to do the whole processing with it ?
What is "avidemux" missing ? ... err....well.... err... possibly missing a "batch mode" that I understand? .... Also, avidemux's video editting is not as good as dedicated video editting software packages, which have special tools for fading from one clip to another, merging parts of clips, etc ...
My goal is to go on holiday, take many dozen short video clips with my still digital camera, download to my computer and then edit out the bad parts, and keep the good (for burning to a DVD). I can now easily take an avi (or mpeg) and author a DVD, but creating a decent avi (from home video shots) is the problem.
All of this video "stuff" takes time, so if I can automate any part of the process, its important.
My not being able to import my Canon's avi files directly to "video editors" Kino and KDEnlive was a bit of a disappointment, but I am hoping I can come up with a way to convert all the clips directly via a script/batch job (to a format where Kino/KDEnlive will accept). I don't think (I could be wrong) avidemux will handle many dozen files in one automatic format conversion.
This has probably been done before by someone (as there must be 1000's of Linux users with Canon cameras), but its probably such a trivial job to most, that it never occured to them it would stump others (like me).
mean
13th September 2005, 13:16
Latest versions of avidemux use spidermonkey as scripting engine
so that you can process a full directory in one go
I often use it to re-encode whole season of stuff
oldcpu
13th September 2005, 17:13
Latest versions of avidemux use spidermonkey as scripting engine
so that you can process a full directory in one go
I often use it to re-encode whole season of stuff
Thank you for pointing that out that avidemux capability:
http://avidemux.berlios.de/doc/en/script.xml.html
I see (from the above URL) that there is some scripting documentation/guidance on the avidemux home page. I'll follow your suggestions and check this out.
mean
13th September 2005, 20:41
Better to use this :
http://fixounet.free.fr/avidemux/doc/en/spidermonkey.xml.html
It is more in line with the actual syntax
(with more infos here
http://www.avidemux.org/phpBB2/viewforum.php?f=10
)
oldcpu
15th September 2005, 20:21
Better to use this :
http://fixounet.free.fr/avidemux/doc/en/spidermonkey.xml.html
It is more in line with the actual syntax
(with more infos here
http://www.avidemux.org/phpBB2/viewforum.php?f=10
)
Thanks for the updated suggestion. I played around a bit with avidemux, and I exported a number of different formats, trying to get either "kino" or "kdenlive" to accept the format. I had no luck. .... I even posted a querry on the "kino" forum, but got no response.
I have ended up installing "LiVES" which will accept a number of different file imports, including the one from my Canon. I'm now in the experimental stage, trying to determine if I should convert the file first (with avidemux) prior to opening in "LiVES" for editing, or whether I should go straight to "LiVES". My first impression is "LiVES" is incredibly slow to open the Canon Video file, but that may have been because of the relatively strange Canon avi format.
mean
15th September 2005, 21:52
Avi + mjpeg is one of the simplest format, that's weird it is slow to load
oldcpu
1st October 2007, 13:37
This is a note to an old thread that I started, about kdenlive. It was recently updated (in mid-August-2007) and I was quite pleased with the behaviour of kdenlive-0.5 on my openSUSE-10.3 RC1 system (athlon-1100+ with 1GB RAM). So I wrote this mini-review (... and as a disclaimer, I am by no means associated with the kdenlive project).
===========================================
KDENLIVE v.0.5 REVIEW
The latest release of the Linux program kdenlive (v.0.5) is a SIGNIFICANT improvement over the older v.0.4. SIGNIFICANT.
My wife and I like to take the still images, and movie clips we take from our Canon Ixus digital camera, and make a "home movie", with various/selected clips mixed, and good sound in the back ground, as a way to remember a vacation.
Until now, I have been grudgingly forced to admit that the MS-Windows Video NLE tools are significantly superior in this task (note - I do not include the great Linux tool avidemux (nor dvbcut) in this consideration, as they are NOT NLE). Specifically, its the Linux Video NLE that I believe were mostly substandard (compared the Windoze Video NLE). In fact, the Linux tools were so bad, so utterly horrible, that I simply refused to use them. And I say that as a BIG Linux fan.
Well, v.0.5 of kdenlive (released 11-Aug-2007) has changed that. While I will NOT go as far to say it is superior to the even basic (free) Microsoft WinXP Windows Movie Maker, I will say that it is better in some areas, and not quite as good in others. But I am beginning to think it might be good enough to meet my requirements.
Its web site is here: http://kdenlive.org/
My rather basic non-linear video editing (NLE) requirements are:
a. user friendly gui (which challenges some Linux NLE apps, such as cinelerra),
b. reasonably stable application (this challenges Linux & Windoze NLE apps alike),
c. time line display,
d. accept both short video clips and still images,
e. capability to edit short video clips, and modify duration in which still images are shown,
f. reasonable selection of transition video effects between clips and between images/clips,
g. capability to add and mix in separate audio track (such as from a song), and be able to play only song, or play only video audio, or play both (mixed),
h. capability to fade start/end of audio,
i. capability to edit the above, as one changes one's mind (and not have to start all over again),
j. capability to save one's work session,
k. capability to selective output either PAL or NTSC video
v.0.4 of kdenlive could not do all the above. IMHO it was neither stable enough, nor did it handle still images well. Its audio fade did not function well. Its transition selections were very limited.
However kdenlive v.0.5 can do the above reasonably well ! :) :)
Some disadvantages of kdenlive (although it could be these are just my unfamiliarity, and not disadvantages):
a. it does not appear to accept mp3 audio (accepts wav, so one must convert mp3 to wav before trying to import),
b. it has not yet implemented a compressed video out. So the final product is a raw video that the rendering produced. A one minute video clip was 400 MBytes in size !! BUT that is not a problem for me, as I typically keep my video clips down to 10 minutes in size, and the 400 MBytes (or 4GBytes for 10 minutes) can easily be reduced to 1/15th that size, with a Linux program such as "xvidenc".
Anyway, I am going to continue to use kdenlive some more, and I am now definitely helping my wife now (where my wife uses WinXP), with her creation of our home made videos, except I am using Linux. :)
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.