Pinnacle Hybrid TV Tuner PCTV 330e in Ubuntu 10.10 Maverick

However, on reboot it reverts to original settings, and to make it light up I have to do sudo rmmod and then sudo modprobe (card 68) again.

In the hope that it helps here is a screenshot of what I see when I load kdelive and go into the settings. As you can see it appears to be pretty well detected, both before and after running the command, it may simply be that V4l2 simply doesn’t work. However, I’ll try it with a camcorder connected and let you know what if anything happens.

With the card attached and the driver loaded… can you send the output from:

lsmod

We’ll sort out the script to load the drivers at boot if/when we get it to capture… kinda pointless unless we can make it work :slight_smile:

[EDIT]

I’m no Kdenlive expert, or even user… but are you sure the Default Capture Device should be set to Firewire, I would have thought that should have been Video4Linux.

I’ve been reading that people are having issues with the new ieee1394 (firewire) stack as used in Natty… particularly with Kino looking for the device in the wrong place, and dv4l refusing to compile in Natty:

(amongst others)

I do wish they’d stop messing with things that were working… but I suppose that’s the price we pay for effectively being beta testers of versions between LTS releases.

Oh, and v4l2 must be working in Natty or that would rule out most webcams and it would be all over the web.

Hi

The default capture device for kdenlive is firewire, which incidentally works fine on my natty installation. That is simply it, the default. The screenshots I sent were merely to demonstrate the extent to which the device is detected.

Whatever is the default, you need to select the source device within the record monitor which is in the main application window. You simply make the selection from the list of available devices.

The behaviour I am experiencing (both in kdenlive and VLC) is pointing me in the direction of thinking this may be a V4L problem, rather than the device itself.

I have attached the output of lsmod and thank you for all your help.

Ian

Does:

ffmpeg -f video4linux2 -i /dev/video0 -vcodec mpeg4 -b 6000k -r 25 test.avi

capture anything… this is video only.

I just want to know what happens… and what is returned.

I think I may have made some headway.

In a comment elsewhere about a Hauppage TV card, a PVR card, the lead developer of kdenlive indicated that it did not support that type of card, so I suspect despite its detection it may well not work with it.

On the case of the card it says “USB DVR”.

If within VLC the only way I was ever able to trigger any reaction was as to select PVR. That lit up the light on the card. I never got any video, or audio, but have always at the back of my mind wondered whether it might simply be a config issue.

If I run the v4l control panel I get a whole load of settings to mess about with. If I select preview/start preview an mplayer window opens and the card lights up! No pictures yet but it’s not connected to anything.

A short while ago I discovered this:

http://forums.linuxmint.com/viewtopic.php?f=48&t=55754

I have a funny feeling that the command the author refers to to set the input as composite, which does not produce an error when I run it - in fact it tells me it is set, might just be the magic bullet - hope so! will keep you posted, and if it doesn’t work I’ll run the command you gave me.

Thanks again

From what I gather Kdenlive (since version 0.7) does support v4l devices… but it just runs ffmpeg in the background, which is why I wondered what that command would do.

Don’t quote me on that though ← too late did it myself :wink:

Good luck with your playing and let me know how you get on.

Meanwhile I’ll keep digging and let you know if anything jumps out at me.

Which setup are you testing with ? … the card=19 (auto detected) or card=68 (Terratec AV350) ?

I’ll give it a go with both as the tests so far have produced the same result with each.

With nothing connected (and on the default card) the command you gave me lit up the card and created an avi file in the home directory. It was very similar to my very first attempt at using my camcorder where I used a dvgrab command (before I learned of kino!). Edit - output attached

At the risk of tempting fate, we do appear to be in the right direction. Time to have a play tonight. I’ll advise.

Thanks

PS - If and when I get it going, I promise to do a comprehensive how-to for the site :slight_smile:

An update, and it’s very interesting.

Last night, I tried all the different card settings, and from within the V4L config settings/preview I was able to launch an mplayer window, but with a running camcorder connected nothing of value ensued. Interestingly I got different artefacts in the window - a green screen with 1 setting, stripes with another, but nothing of value. I also installed the software in the virtual machine (I actually got what seems to be a genuine software disk) and on installation the decription changed to a usb 2861 device. Still no go though.

Before doing any of these things I used the following code

ian@ian-MXC051:~$ v4l2-ctl -d /dev/video0 -i 1

This set the card to composite input

Today I discussed it with the IT guy at work who suggested I should try it with a “proper” windows installation to rule out a faulty card (this is actually great advice I think). However I saw a youtube film showing someone getting this working using cheese, using the card/camcorder as a webcam, so tonight sceptically I installed it. I plugged in the card, started the camcorder, and ran the command shown above to go to composite. I started cheese and within a few seconds, to my astonishment, the video output was there in all its glory :o It was crystal clear too. Cheese does give me the opportunity to record the video as an ogv file (ogg video?)

Unfortunately I currently have no sound capture (wonder whether it’s the old pulse/alsa/OSS story) and I would appreciate thoughts on where to go next. I think I’m half-way there at least though :slight_smile:

Thanks

Ian

Is the audio catpure device being registered at all

arecord -l

Just a thought… have you tried starting cheese etc. using the pulse audio OSS wrapper

padsp cheese

or

padsp kino

etc.

http://manpages.ubuntu.com/manpages/natty/man1/padsp.1.html
and

Here is the output :

ian@ian-MXC051:~$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: Intel [HDA Intel], device 0: STAC92xx Analog [STAC92xx Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: U0xeb1a0x2861 [USB Device 0xeb1a:0x2861], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
ian@ian-MXC051:~$

So the device is recognised, it is also shown as an audio device in system settings/multimedia.

Cheese has turned out to be a no-go. Firstly when I hit record it basically freezes - it produces a file with no content in it.

However, progress:

https://help.ubuntu.com/community/Webcam

With the lengthy command shown I was able to launch a vlc session and when it started I changed to composite and I got the picture fine. However, there is no sound. When I run the audio test referred to in the webcam help I get

ian@ian-MXC051:~$ ls /dev/audio*
ls: cannot access /dev/audio*: No such file or directory

Stumped again :frowning:

What modules have you got loaded ?

lsmod

Lsmod file attached

My current thinking is that /dev/dsp relates to OSS whereas with alsa and pulse I should be substituting it with something else

Did you try starting VLC with padsp ? … As I understand it… padsp intercepts an applications calls to an OSS device such as /dev/dsp and redirects them to the Pulseaudio sound server.

see:

man padsp

and here:
http://forum.videolan.org/viewtopic.php?f=13&t=81813

So I’m still thinking padsp may be the answer.

or if you’re using:

vlc v4l2:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/audio2" :v4l-norm=3 :v4l-frequency=-1 :v4l-caching=300 :v4l-chroma="" :v4l-fps=-1.000000 :v4l-samplerate=44100 :v4l-channel=0 :v4l-tuner=-1 :v4l-audio=-1 :v4l-stereo :v4l-width=640 :v4l-height=480 :v4l-brightness=-1 :v4l-colour=-1 :v4l-hue=-1 :v4l-contrast=-1 :no-v4l-mjpeg :v4l-decimation=1 :v4l-quality=100

try changing it to:

[b]padsp[/b] vlc v4l2:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/[b]dsp[/b]" :v4l-norm=3 :v4l-frequency=-1 :v4l-caching=300 :v4l-chroma="" :v4l-fps=-1.000000 :v4l-samplerate=44100 :v4l-channel=0 :v4l-tuner=-1 :v4l-audio=-1 :v4l-stereo :v4l-width=640 :v4l-height=480 :v4l-brightness=-1 :v4l-colour=-1 :v4l-hue=-1 :v4l-contrast=-1 :no-v4l-mjpeg :v4l-decimation=1 :v4l-quality=100

Or maybe leave it “as is” but prefix with padsp:

padsp vlc v4l2:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/audio2" :v4l-norm=3 :v4l-frequency=-1 :v4l-caching=300 :v4l-chroma="" :v4l-fps=-1.000000 :v4l-samplerate=44100 :v4l-channel=0 :v4l-tuner=-1 :v4l-audio=-1 :v4l-stereo :v4l-width=640 :v4l-height=480 :v4l-brightness=-1 :v4l-colour=-1 :v4l-hue=-1 :v4l-contrast=-1 :no-v4l-mjpeg :v4l-decimation=1 :v4l-quality=100

and see if that gets you any further.

The code you suggested did not produce a different effect. However, the 2 suggestions at the link you provided each produced segmentation faults for some reason.

I think it might help to recap where I am up to :

I can now get acceptable video - I do this by running the long command to launch VLC and then a secondary short command to switch to composite video. With the VLC record function I can get a decent copy of the footage saved to HDD.

So, all that is missing now is the audio. , as previously mentioned, the card is detected as

card 1: U0xeb1a0x2861 [USB Device 0xeb1a:0x2861], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

when I run

arecord -l

when I run

arecord-l

It is also detected as an audio capture device in the kde system settings

Because of this I am feeling that this could simply be simply down to the name that is used either by the system or by vlc for the card (or the syntax I am putting in). In that respect I have found this

http://forum.videolan.org/viewtopic.php?f=4&t=90289

Does that seem like the right way to be going? Would I be right is assuming that if I was slotting this into the long command I would simply switch

:v4l-adev="/dev/audio2"

with

v4l2:// :input-slave=alsa://plughw:0,0

or as the card is seen as card 1 device 0 should it be

v4l2:// :input-slave=alsa://plughw:1,0

Or should it be

v4l2:// :input-slave=“alsa://plughw:1,0”



(the reference by the vlc developer to not quoting the command line correctly)

I also note that in the code at the ubuntu help page the only reference to v4l2 is at the start of the command - all other references are simply to v4l. Is that relevant?

Sorry to ramble but this seems so near but yet so far :( I'm beginning to wonder whether I would be better buying a VCR/DVDR combo instead :)

Thanks

OK, try:

vlc v4l2:// :v4l-vdev="/dev/video0" :input-slave="alsa://plughw:1,0" :v4l-norm=3 :v4l-frequency=-1 :v4l-caching=300 :v4l-chroma="" :v4l-fps=-1.000000 :v4l-samplerate=44100 :v4l-channel=0 :v4l-tuner=-1 :v4l-audio=-1 :v4l-stereo :v4l-width=640 :v4l-height=480 :v4l-brightness=-1 :v4l-colour=-1 :v4l-hue=-1 :v4l-contrast=-1 :no-v4l-mjpeg :v4l-decimation=1 :v4l-quality=100

Nope - great video but no sound (again). Don’t know what to do next tbh, seems like we are clutching at straws.

Short of getting a composite to mini jack Y cable, and plugging audio into the audio-in/mic of your onboard soundcard, I don’t know what to suggest… I’ll keep looking though… you never know :o

Thanks

I’m sure it must be a naming convention. I have just abandoned the command altogether and using the gui and typing in /dev/video0 as the video device and setting it to composite I now get pictures. Not given up yet :slight_smile:

From what I gather, this is supposed to work (if the device/subdevice is 1,0)…
Open VLC, go to Media>Open Capture Device

Capture Mode: Video for Linux 2
Video device name: /dev/video0
Audio device name: plughw:1,0

So at the bottom it says:
MRL: v4l2:///dev/video0
Edit options: :input-slave=alsa://plughw:1,0 :v4l2-standard=0 :file-caching=300


Now as that is VERY similar to what we just tried… I’m going to guess there is an issue with either -

  1. The device mappings… which I doubt.

  2. A setting in alsamixer… have you tried making sure the correct “Capture” device and levels are set in alsamixer ?

alsamixer

then hit F4

or

  1. There is a driver issue with your capture device… something to do with this line in your dmesg
[11160.012235] em28xx #0: Unknown AC97 audio processor detected!

Although the cature device seems to be registered ???


You should be able to test the audio capture device is working in VLC (and its hardware address):

Open VLC… click the “Show playlists” button (at the bottom)… in the left hand panel select Devices>Audio Capture… in the right-hand panel, select the Device>Subdevice

If you right-click the subdevice, and select Information… the last line (Location) tells you what the plughw address is.

or

if you right-click the subdevice, and select Play, or Save… you should be able to hear the audio.

Does it capture any audio ? … remember you may need to check the device isn’t muted, and its input levels in alsamixer

Okay, tried them

Started the camcorder playing back

Ran vlc with the options you suggested. It loaded without errors and then upon running the command to change to composite the video was there. No audio.

Alsamixer - Found the usb sound device and the volume levels were well cranked up.

VLC playlist: under audio devices I found empia 2861 and under sub-device it is called device (0). Right clicked and selected play and heard …nothing :cry:

So, the audio bit is faulty or as you say there is an issue with the driver.

On googling the specific error message I have found a couple of possible leads

http://www.mail-archive.com/linux-media@vger.kernel.org/msg16862.html

I’ve not got my laptop with me at the mo but when I get home I’ll check whether it has linux-firmware-nonfree installed. I note from

https://wiki.ubuntu.com/Kernel/Firmware

that it’s not installed by default. I suspect that remains the case as I’ve not done anything too adventurous since installing natty. I believe the need for this is as a result of a bust up between the guy writing the drivers for the card and the rest of the v4l team. Anyway, here’s hoping!