EasyCap.co.uk
February 07, 2012, 07:43:36 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
French German Italian Dutch Spanish Portuguese Korean Chinese Simplified Japanese Greek Arabic Russian
News: Welcome to EasyCap.co.uk forum
 
   Home   Help Search Login Register  
Del.icio.us Digg FURL FaceBook Stumble Upon Reddit SlashDot

Pages: [1]
  Print  
Author Topic: easyCAP on Linux  (Read 10464 times)
Jake007g
Newbie
*
Posts: 1


« on: June 01, 2010, 08:53:32 AM »

Hey all, I've spent the past week of my spare time trying to get my easyCAP DC60+ to work on Linux (Ubuntu 10.04 Lucid Lynx). I know that easyCAP "Doesn't Support Linux" according to the manufacturer, but as always with Linux, there was a way, and I worked it out.

It is a relatively short process to get it up and running, it just took me a while to figure out.

You will need to install the drivers for your easyCAP model first, do a quick google search for "easyCAP Linux Drivers"  and follow some tutorials on getting the drivers installed. After you've installed the drivers, install KMPlayer (Which includes mencoder, which is what we need) you'll find it in the Ubuntu software centre or in the synaptic package manager. You'll also need to install ffmpeg which you an find in the same places.

Once the drivers are installed, create two new empty files, rename on of them to record.sh and the other to deinterlace.sh

Open up record.sh with your favourite open source text editor and paste this into it:
Quote
mencoder tv:// -tv device=/dev/video0:input=1:norm=PAL-60:width=1280: height=720 -vf pp=md -o Recording -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=8000


Make sure you replace all of the values for whatever you need, here's a rough guideline:

input=1 (Composite input, input=0 is s-video)

norm=PAL-60 (Used in europe, change it to norm=NTSC if that's you're countries television standard)

-o Recording (This means it will output the video to a file named Recording in the same folder as where the sh script is located, you could change it to /home/yourusername/Desktop/Recording and so on).

-tv device=/dev/video0 (This might be different depending which video input your easyCAP is using. Here are some of the common inputs for your easyCAP: /dev/video0 | /dev/video1 | /dev/video2 | /dev/easycap |)

width=1280: height=720 (These are the recording dimensions, I find these to be the best personally, but just play around with them)

vcodec=mpeg4 (Obviously the video codec, change it whatever you want or just leave it as mpeg4 as it is a great codec to record with)

vbitrate=8000 (Video bit rate, there isn't much reason to go above 8000 as the easyCAP quality wont get much better)

If you wanted to get audio working, you change it a bit to something like this: height=720:forceaudio:adevice=/dev/dsp (Obviously change /dev/dsp to your easyCAP audio device, common ones are /dev/dsp | /dev/dsp1 | /dev/dsp2 | /dev/easysnd |)

So once you've configured your script, save it. Now right click the record.sh script, and enable it to be run as an executable. Now all you need to do to record is double click record.sh, and run in terminal. To stop the recording simply close down the terminal. The only problem with the recording is that it is highly interlace (Lines appear on motion), here is a video of my easyCAP before I deinterlaced it:

<a href="http://www.youtube.com/v/wudyQS_ZqGU&rel=0" target="_blank">http://www.youtube.com/v/wudyQS_ZqGU&rel=0</a>

It is a major pain, especially when running around in a game. So to deinterlace your recorded video, open up deinterlace.sh in your favourite text editor and paste in the following:
Quote
ffmpeg -i Recording -target pal-dv -deinterlace -sameq DeInterlaced.avi


The isn't much configuring to be done, but here is some help understanding it:

-i Recording (This is the input file, it looks for a file named Recording in the same folder as the script, you could point it to wherever you saved your original recording by doing something like this -i /home/yourusername/Videos/youroriginalrecordingname)

-sameq DeInterlaced.avi (This is your output file, it will output to the same folder as the script, to a file called DeInterlaced.avi, it will also keep the original dimensions and aspect ratio that you recorded in)

Now, save and close your text editor. Now right click deinterlace.sh and mark it to be ran as an executable as well. Now, you just run that script when you want to deinterlace your videos, for much nicer looking gameplay. Here is an example of some deinterlaced gameplay:

<a href="http://www.youtube.com/v/H3CWb5TXQW8&rel=0" target="_blank">http://www.youtube.com/v/H3CWb5TXQW8&rel=0</a>


Hope I helped, for future tutorials and guides subscribe to my YouTube channel: http://www.youtube.com/FwdFx

See you soon

-Jake
Logged
bigweeal
Global Moderator
Sr. Member
*****
Posts: 341


WWW
« Reply #1 on: June 03, 2010, 12:45:18 AM »

kudos to you, Sir. I will make this sticky.

Logged

http://www.ezcap.tv .... ezcap116 Full retail, boxed with 12 months warranty & full support. XP/Vista and Windows 7 32/64 bit compatible.
xpowerfulxx
Newbie
*
Posts: 1


« Reply #2 on: June 12, 2010, 02:15:34 PM »

Sorry but I can't find the drivers anywhere! Can you please give a link to it?

Logged
rmt1947
Newbie
*
Posts: 7


« Reply #3 on: June 13, 2010, 09:26:21 AM »

There are (at least) two different types of EasyCAP, and they require distinct Linux drivers.  To find out which one you have, plug in the EasyCAP and then in a terminal window type the command

lsusb

You will get several lines of output, one of which will describe your EasyCAP.  Either this line will say

Bus XXX Device XXX: ID 05e1:0408 Syntek Semiconductor Co., Ltd

or it will say

Bus XXX Device XXX: ID eb1a:2861 eMPIA Technology, Inc.


If you have an EasyCAP of the Syntek type, there is a Linux driver available at

http://sourceforge.net/projects/easycapdc60/

You will need to download and install this driver manually, but it is a reasonably painless procedure.

If you have an EasyCAP of the Empia type, the driver is already present in recent Linux kernels, which means that on distributions such as Ubuntu 10.04 LTS the EasyCAP should Just Work without the need to install a driver manually.

Mike
Logged
usbeasycap
Newbie
*
Posts: 24



WWW
« Reply #4 on: July 28, 2010, 06:29:00 AM »

We are developing the model that support Linux, keep us contacted please.
This is big market for security.
Logged

Email: usbeasycap@gmail.com
http://www.usbeasycap.info
--china factory original easycap dC60+, real support Vista, best 2861 solutions, Ezcap DC60++ ---
sirlancer
Newbie
*
Posts: 3


« Reply #5 on: August 03, 2010, 09:02:28 PM »

Thanks heaps op, I saw used EasyCap on sale and before buying made sure that it would work with my Ubuntu. These instructions helped most by far, I also read some old nabble on the Ubuntu Forum. I got this device because I wanted to transfer video from my DV camera to my laptop lacking a firewire port.

After installing the driver (Reply #3) MPlayer worked out of the box to some extent, but I had some problems getting mencoder to work properly. But it works now... mostly!

I don't know whether the problem is in v4l2 or EasyCap but it cuts about 22 pixels from the top (when capturing 640x480, so about 4,5% pixels) Huh and the same from the right Huh My workaround is to use widescreen mode in the camera, which actually just shoots 4:3 with black bars on top and bottom, and cut them just right with a separate cropping script: 22 pixels from the top, 46 from below. Not optimal I admit, as it won't work with TV or other devices (or so I presume, haven't tried), and the right side can't be fixed, but it will suffice.

capture script:
Code:
mencoder tv:// -tv device=/dev/easycap0:driver=v4l2:adevice=/dev/easysnd1:forceaudio:immediatemode=0 -oac copy -ovc copy -o easy.avi

crop script:
Code:
mencoder easy.avi -vf crop=640:412:0:22,scale=720:405 -oac copy -ovc x264 -o easycr.avi

I realise these could be in the same script but this allows me to try different codecs, bitrates and scaling on the "raw" data I capture from the camera. In addition, I'm able to prioritise capturing over encoding, minimising skipped frames etc.
« Last Edit: August 04, 2010, 09:51:23 AM by sirlancer » Logged
rmt1947
Newbie
*
Posts: 7


« Reply #6 on: August 04, 2010, 08:07:42 PM »

If I understand things correctly, Jake has an EasyCAP DC60+ (USB ID eb1a:2861) requiring driver em28xx, which is included automatically in recent Linux kernels (in particular in Ubuntu 10.04), whereas sirlancer has an EasyCAP DC60 (USB ID 05e1:0408) requiring the easycapdc60 driver to be downloaded from SourceForge and installed manually.

Both the DC60 and the DC60+ use the SAA7113H chip (or equivalent) for front-end video digitizing, and this chip has a native resolution of 720x576.  To avoid any undesired cropping during recording one option might be to specify 720x576 as the resolution in the mencoder command line.  This is what is recommended by the useful website

http://easycap.blogspot.com/p/recording.html

(Note that this website relates specifically to the EasyCAP DC60, not the DC60+.)

Mike

Logged
sirlancer
Newbie
*
Posts: 3


« Reply #7 on: August 06, 2010, 10:33:32 AM »

Both the DC60 and the DC60+ use the SAA7113H chip (or equivalent) for front-end video digitizing, and this chip has a native resolution of 720x576.  To avoid any undesired cropping during recording one option might be to specify 720x576 as the resolution in the mencoder command line.  This is what is recommended by the useful website


I had no idea there was a "native resolution", though it makes perfect sense. And that fixed the problem, great! Grin It even shows more than my cameras lcd display from top and bottom, which is common I think.

Well, there's another problem now... There are grayish bars on the left and right side of the video, about 10-20 pixels on each side (now in 720x576, so 2,5% -- better than before! Cheesy). This is so small and only on the sides that it might really be the cameras fault. And I don't think I'm losing information and this is just a matter of cropping and stretching. Although strecthing does mean losing detail I guess.

Another thing: video and audio seems to start off in sync, but video is severely lagging by the end of a 10 minute clip. Could 'audiorate' option be the solution? At least it was in the options in the suggested website.

new capture script
Code:
mencoder tv:// -tv width=720:height=576:device=/dev/easycap0:driver=v4l2:adevice=/dev/easysnd1:forceaudio:immediatemode=0 -oac copy -ovc copy -o easy.avi

crop script
Code:
mencoder easy.avi -vf crop=660:404:30:86,scale=720:404,pp=lb -oac pcm -ovc x264 subq=5:8x8dct:frameref=2:bframes=3:b_pyramid:weight_b -o easycr.avi

(Anyway, here is the output. The camera is an old mini-dv camcorder so quality is not the main point but rather that it works. Grin Audio is from a external recorder, synced and dubbed with Kino.)

<a href="http://www.youtube.com/v/BAuAAIlP9QY&rel=0" target="_blank">http://www.youtube.com/v/BAuAAIlP9QY&rel=0</a>

(I actually did see DC60+ for sale as well, but quick googling suggested that the only difference was that it works better with macs, so I opted for the cheaper one.)
« Last Edit: August 06, 2010, 10:45:15 AM by sirlancer » Logged
sirlancer
Newbie
*
Posts: 3


« Reply #8 on: August 11, 2010, 07:31:07 PM »

Another thing: video and audio seems to start off in sync, but video is severely lagging by the end of a 10 minute clip. Could 'audiorate' option be the solution? At least it was in the options in the suggested website.

False alarm, re-installing the driver fixed this problem. I think I'll getting in the habit of re-installing the driver every time I start importing.
Logged
theothercliff
Newbie
*
Posts: 14


« Reply #9 on: August 29, 2010, 05:16:33 PM »

For EasyCap DC60 (works with both the 1 video and 4 video versions) download the Linux drivers from:
http://sourceforge.net/projects/easycapdc60/
Read the README file and follow the directions.

I have been following EasyCap drivers for Linux for a long time now.  I am doing some programming with them.  I am running driver version 0.8.2 on Ubuntu 10.04 and they work well.  I see there is a new 0.8.3 version out that I will have to download and install.  Woohoo!

Cliff
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2006-2008, Simple Machines Valid XHTML 1.0! Valid CSS!