Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Trying to get Terratec G1 work on Debian

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
Repesorsa
Posts: 22
Joined: 2018-03-24 10:21

Trying to get Terratec G1 work on Debian

#1 Post by Repesorsa »

Hi,

I've installed debian-9.3.0-amd64 on my pc. And I'm a beginner with Debian. For VHS-capture I bought Terratec G1 - capturer. These links I've found touching the subject:

https://www.linuxtv.org/wiki/index.php/TerraTec_Grabby

https://patchwork.linuxtv.org/patch/8128/

Could someone help me and teach me how to understand patches and capture device drivers? How to get capturer working?
What does mean:

Should be supported under linux when commit
"[media] em28xx: fix Terratec Grabby AC97 codec detection"
gets mainlined.
?

Segfault
Posts: 993
Joined: 2005-09-24 12:24
Has thanked: 5 times
Been thanked: 17 times

Re: Trying to get Terratec G1 work on Debian

#2 Post by Segfault »

You forgot to mention what is the USB ID of your device.

Repesorsa
Posts: 22
Joined: 2018-03-24 10:21

Re: Trying to get Terratec G1 work on Debian

#3 Post by Repesorsa »

This is what lsusb gave me:

Bus 001 Device 003: ID 0ccd:10af TerraTec Electronic GmbH

Segfault
Posts: 993
Joined: 2005-09-24 12:24
Has thanked: 5 times
Been thanked: 17 times

Re: Trying to get Terratec G1 work on Debian

#4 Post by Segfault »

According to this: https://cateee.net/lkddb/web-lkddb/VIDEO_EM28XX.html the driver for 0ccd:10af is in kernel since kernel version 3.7, no hacking required.

Repesorsa
Posts: 22
Joined: 2018-03-24 10:21

Re: Trying to get Terratec G1 work on Debian

#5 Post by Repesorsa »

Thank for your advice. Still hard to get work with VLC. Maybe I'll try ffmpeg.

Segfault
Posts: 993
Joined: 2005-09-24 12:24
Has thanked: 5 times
Been thanked: 17 times

Re: Trying to get Terratec G1 work on Debian

#6 Post by Segfault »

Generally, if you see device nodes appear in /dev/ then the driver is loaded and the device is ready to use. For instance, analog (two devices):

Code: Select all

ls /dev/video*
/dev/video0  /dev/video1
or digital (six devices):

Code: Select all

ls /dev/dvb/
adapter0  adapter1  adapter2  adapter3  adapter4  adapter5

Repesorsa
Posts: 22
Joined: 2018-03-24 10:21

Re: Trying to get Terratec G1 work on Debian

#7 Post by Repesorsa »

I finally got visible video stream with mplayer entering this line in Konsole:

mplayer tv:// driver=v4ls:width=720:height576:device/dev/video0:input=0:fps=25:norm=SECAM-L:alsa:adevice=hw.2:audiorate=48000

But no sound. And recording not to mention.

Any advice?

Repesorsa
Posts: 22
Joined: 2018-03-24 10:21

Re: Trying to get Terratec G1 work on Debian

#8 Post by Repesorsa »

Detecting the audio issue of TerraTec G1. According to this website:

https://en.wikibooks.org/wiki/Configuri ... HW_Address

With this command I get all the audio devices listed:

$ cat /proc/asound/cards

it outputs:
0 [NVidia ]: HDA-Intel - HDA NVidia
HDA NVidia at 0xfd080000 irq 61
1 [Generic ]: HDA-Intel - HD-Audio Generic
HD-Audio Generic at 0xfd700000 irq 63
2 [G1 ]: USB-Audio - Terratec G1
TerraTec Electronic GmbH Terratec G1 at usb-0000:03:00.0-9, high speed

So TerraTec G1's card is card2.
With tree package installed I get the following. The command:

$ tree /proc/asound/card2/

outputs:

/proc/asound/card2
├── id
├── pcm0c
│   ├── info
│   └── sub0
│   ├── hw_params
│   ├── info
│   ├── status
│   └── sw_params
├── stream0
├── usbbus
├── usbid
└── usbmixer

2 directories, 10 files

The important file is pcm0c/info. The command for reading the file:

$ cat /proc/asound/card2/pcm0c/info

outputs:

card: 2
device: 0
subdevice: 0
stream: CAPTURE
id: USB Audio
name: USB Audio
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1

because card number is 2 and the devices number is 0 then the hw address is hw:2,0

now, trying to get sound from the device:

cat /dev/urandom | aplay -D hw:2,0 ## Where 2,0 is my hardware's coordinates

unfortunately this outputs:
aplay: main:788: audio open error: File or directory doesn't exist

What would be the next attempt with my grabber?

Segfault
Posts: 993
Joined: 2005-09-24 12:24
Has thanked: 5 times
Been thanked: 17 times

Re: Trying to get Terratec G1 work on Debian

#9 Post by Segfault »

Look, I do not have this hardware, but I can share my experience with other DVB cards. Usually they require more than one kernel module (driver). You may miss USB sound module for instance. Remember, your device is audio source, not output.

Repesorsa
Posts: 22
Joined: 2018-03-24 10:21

Re: Trying to get Terratec G1 work on Debian

#10 Post by Repesorsa »

With this line I finally got the sound:

mplayer tv:// -tv driver=v4l2:width=720:height=576:outfmt=uyvy:device=/dev/video0:input=0:fps=25:alsa:adevice=plughw.2,0:audiorate=48000:forceaudio:amode=1:immediatemode=0 -ao sdl, alsa

Still don't know which is the determinative part :roll:

Segfault
Posts: 993
Joined: 2005-09-24 12:24
Has thanked: 5 times
Been thanked: 17 times

Re: Trying to get Terratec G1 work on Debian

#11 Post by Segfault »

Well, you do have the working command, right? Who forbids you to experiment with it, mplayer man page is full of information.

Repesorsa
Posts: 22
Joined: 2018-03-24 10:21

Re: Trying to get Terratec G1 work on Debian

#12 Post by Repesorsa »

Now huge progress with VLC too! :D

Maybe installation of some v4l2 -packages and VLC extra -packages helped it or maybe not... I'm not sure. But here is what I did with VLC -player and I even recorded the VHS-stream!
1. I chose media from top of the player
2. I did open capture device
3. capture mode -> choose Video Camera ( I think that this was determinative choose)
4. In Device Selection I chose /dev/video0 to Video device (correct directory and file names depends on devices)
5. hw:2,0 to audio device (correct hw coordinates depends on devices specs)
6. In options I let the Videostandard be indefinable or sthng like that
7. then on the below right was available Advanced options button(it's not available if you choose something else to Capture mode, step 3.)
8. on advanced options I just defined width and height of the screen(720x580), Speed of frames (29) and that's it! Tadaa, sound and vision!
9. After this all recording was easiest part of the whole process, from the playback menu I chose record.

I think this long fight with my crabber was worth of it. I learned lots of new stuff about Linux and video devices and I even got the crabber working!

Post Reply