Tv and Mencoder on Sabayon

Discussions Regarding Software

Moderator: Moderators

Tv and Mencoder on Sabayon

Postby alexandre3g » Sat Dec 20, 2008 1:19

Hi!

I tried to record the images form TV using this command:

mencoder tv:// -tv driver=v4l2:input=1:normid=4:channel=3:chanlist=us-bcast:width=320:height=240:contrast=-25:saturation=-25:brightness=-0:device=/dev/video0 -vf crop=295:230,scale=320:240 -oac lavc -lavcopts abitrate=128 -ovc lavc -ofps 29.97 -lavcopts vcodec=msmpeg4:vbitrate=800 -o video.avi

And this is what I got in return:

MEncoder dev-SVN-r27458-4.3.1 (C) 2000-2008 MPlayer Team
CPU: Intel(R) Celeron(R) CPU 2.26GHz (Family: 15, Model: 4, Stepping: 1)
CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
success: format: 9 data: 0x0 - 0x0
TV file format detected.
Selected driver: v4l2
name: Video 4 Linux 2 input
author: Martin Olschewski <[email protected]>
comment: first try, more to come ;-)
Selected device: LifeView/Typhoon FlyVIDEO2000
Tuner cap: STEREO LANG1 LANG2
Tuner rxs: MONO
Capabilites: video capture video overlay VBI capture device tuner read/write streaming
supported norms: 0 = PAL; 1 = PAL-M; 2 = PAL-N; 3 = PAL-Nc; 4 = PAL-60; 5 = NTSC; 6 = SECAM;
inputs: 0 = Television; 1 = Composite1; 2 = Composite2; 3 = S-Video;
Current input: 1
Current format: BGR24
v4l2: current audio mode is : MONO
Selected channel: 3 (freq: 61.250)
Unable to open '/dev/dsp': Device or resource busy
Unable to open '/dev/dsp': Device or resource busy
Unable to open '/dev/dsp': Device or resource busy
v4l2: 0 frames successfully processed, 0 frames dropped.
============ Sorry, this file format is not recognized/supported =============
=== If this file is an AVI, ASF or MPEG stream, please contact the author! ===
Cannot open demuxer.

Could anyone please help me with this,

* Why the '/dev/dsp' is busy

* Why demuxer can not be open
alexandre3g
Baby Hen
 
Posts: 3
Joined: Thu Dec 04, 2008 18:03

Re: Tv and Mencoder on Sabayon

Postby thenthenio » Sun Dec 21, 2008 0:24

I did few googling about this and I found some hints: try to run the following commands from a console as normal user:
Code: Select all
$ fuser /dev/dsp
$ lsof /dev/dsp

If they print some output you should know now which is the process locking /dev/dsp.
If they do not print any outputs it is ok, try this now:
Code: Select all
$ cat /dev/urandom > /dev/dsp
bash: /dev/dsp: Device or resource busy

This should be the result as long as mencoder gives the same error.
In this case, given that no process is locking /dev/dsp the problem should be that you do not have the rights to access /dev/dsp.
As root now edit the /etc/group file, simply add your user to the audio group and save.
Now repeat (as normal user):
Code: Select all
$ cat /dev/urandom > /dev/dsp

You should now hear a noise coming out from PC speakers.
Ok, you are done, you can now record your TV stream using mencoder.

Cheers.
Mauro
thenthenio
Old Dear Hen
 
Posts: 522
Joined: Thu Mar 01, 2007 23:11
Location: Melegnano (MI) Italy

Re: Tv and Mencoder on Sabayon

Postby alexandre3g » Mon Dec 22, 2008 0:59

hi Maro!

Thank you for your help. I will try out your tips
alexandre3g
Baby Hen
 
Posts: 3
Joined: Thu Dec 04, 2008 18:03


Return to Software in General

Who is online

Users browsing this forum: No registered users and 2 guests