Encode uncompressed avi from webcam

761 Views Asked by At

I have to record videos for a project I'm doing. Two of these are USB cameras and another is a n IP overhead camera.All three are connected to a laptop computer. After recording the videos I need to be able to open them in an editor (not for editing particularly but for modeling stuff in them for which I need a timeline). I have chosen Sony Vegas Pro for my editor. I have been able to record the uncompressed avi using gstreamer with this command:

gst-launch v4l2src device=/dev/video0 ! 'video/x-rawyuv,width=640,height=480,framerate=10/1' ! mux. avimux name=mux ! filesink location=temp.avi

I had to set the framerate to 10 because I was using two USB cameras and a framerate of 30 on both could not be accomodated in the bandwidth of the USB controller. I do not care about audio in my file so I don't grab audio. Similary, while encoding I wouldn't care about audio as well. This is raw uncompressed avi. I was not able to open this in Sony Vegas Pro. I believe I need to encode this uncompressed avi using a codec that will be opened by Sony Vegas Pro (I don't know which codecs Sony likes, so I'll probably try different ones until one of them opens).

For encoding this video, I have several options: mencoder, ffmpeg, gstreamer. But I am not able to figure out how to use these tools to get what I want. Ideally, I would like just to sort of "insert" a codec with other settings remaining the same. I don't really care about the how much space the resulting video takes since the length of the videos are not going to be more than 3 minutes and I have space available, so lossless codecs also work. I believe Sony reads mpeg avi's so if I can get that, it'll be great.

Thanks for reading and I appreciate all the help.

1

There are 1 best solutions below

0
On

I was able to figure this out after some searching. It is based on the information here. I found that Sony Vegas pro seems to open avi videos encoded with the xvid codec.