Log in Register FAQ Memberlist Search pcHDTV Forum Index
pcHDTV Forum

pcHDTV Forum Index -> General pcHDTV topics -> How to record from composite/stereo inputs?
Post new topic  Reply to topic View previous topic :: View next topic 
How to record from composite/stereo inputs?
PostPosted: Mon Jul 13, 2009 10:02 am Reply with quote
hobbieman
 
Joined: 31 May 2006
Posts: 11




Hi,

Anyone know how to record from the HD3000's composite and stereo inputs?

I can get video, but no audio using:

mplayer tv:///1

And mencoder works, but again, no audio.
View user's profile Send private message
PostPosted: Tue Jul 14, 2009 6:41 pm Reply with quote
hobbieman
 
Joined: 31 May 2006
Posts: 11




Ok, I figured it out... So here is the solution so the next sucker does not have to search as much...


- connect video source to composite input on HD3000
- connect audio source to line-in input on HD3000
- connect line-out from HD3000 to sound card line-in
- login as root
- modprobe snd_pcm_oss
- alsamixer -c 0
- unmute the LINE input
- raise the volume of the LINE input to about 50%
- exit alsamixer
- begin playback of video/audio source
- mencoder tv:///1 -oac <CHOOSE_CODEC> -ovc <CHOOSE_CODEC> -o test.avi
- When done, make sure to mute the LINE input using alsamixer

For example, the following command creates an MP4 encoded video file with MP3 encoded audio named mytest.avi:

Code:
  mencoder tv:///1 -oac mp3lame -ovc lavc -o mytest.avi

Note: you need to have those THREE slashes, that is not a typo!

Enjoy...
View user's profile Send private message
recording from line in
PostPosted: Sat Mar 27, 2010 1:26 pm Reply with quote
slackmetoday
 
Joined: 28 Mar 2005
Posts: 4




While your instructions do work, I have audio syncronization problems
when watching LIVE-TV from composite input that way you did in your post.
How can I fix it?

Although I'm sure that recording from the command line works as in your
example, when I try to record (using the the remote "record" button), the video comes out fine but not the audio.

If anyone else has any suggestions, feel free to jump in.

hobbieman wrote:
Ok, I figured it out... So here is the solution so the next sucker does not have to search as much...


- connect video source to composite input on HD3000
- connect audio source to line-in input on HD3000
- connect line-out from HD3000 to sound card line-in
- login as root
- modprobe snd_pcm_oss
- alsamixer -c 0
- unmute the LINE input
- raise the volume of the LINE input to about 50%
- exit alsamixer
- begin playback of video/audio source
- mencoder tv:///1 -oac <CHOOSE_CODEC> -ovc <CHOOSE_CODEC> -o test.avi
- When done, make sure to mute the LINE input using alsamixer

For example, the following command creates an MP4 encoded video file with MP3 encoded audio named mytest.avi:

Code:
  mencoder tv:///1 -oac mp3lame -ovc lavc -o mytest.avi

Note: you need to have those THREE slashes, that is not a typo!

Enjoy...
View user's profile Send private message
Re: recording from line in
PostPosted: Tue Jun 15, 2010 5:36 pm Reply with quote
slackmetoday
 
Joined: 28 Mar 2005
Posts: 4




FYI

I just added these lines to the /etc/runit/1.local file:
/usr/bin/amixer set Line,0 75%,75% mute captur

and now it works flawlessly - I can record from the TV using CARD 1 or can switch to CARD 2 to record from the Satellite via the analog line inputs.


slackmetoday wrote:
While your instructions do work, I have audio syncronization problems
when watching LIVE-TV from composite input that way you did in your post.
How can I fix it?

Although I'm sure that recording from the command line works as in your
example, when I try to record (using the the remote "record" button), the video comes out fine but not the audio.

If anyone else has any suggestions, feel free to jump in.

hobbieman wrote:
Ok, I figured it out... So here is the solution so the next sucker does not have to search as much...


- connect video source to composite input on HD3000
- connect audio source to line-in input on HD3000
- connect line-out from HD3000 to sound card line-in
- login as root
- modprobe snd_pcm_oss
- alsamixer -c 0
- unmute the LINE input
- raise the volume of the LINE input to about 50%
- exit alsamixer
- begin playback of video/audio source
- mencoder tv:///1 -oac <CHOOSE_CODEC> -ovc <CHOOSE_CODEC> -o test.avi
- When done, make sure to mute the LINE input using alsamixer

For example, the following command creates an MP4 encoded video file with MP3 encoded audio named mytest.avi:

Code:
  mencoder tv:///1 -oac mp3lame -ovc lavc -o mytest.avi

Note: you need to have those THREE slashes, that is not a typo!

Enjoy...
View user's profile Send private message
PostPosted: Wed Aug 18, 2010 7:38 pm Reply with quote
adamOfDc949
 
Joined: 18 Aug 2010
Posts: 3




I'm having this same problem but didn't have so much luck with hobbieman's solution. I can play the video without any problem using this command:
Code:

mplayer tv:///1 -tv driver=v4l2:device=/dev/video0:input=1:width=640:height=480:amode=1:volume=100:quality=90:forceaudio:outfmt=yuy2:norm=0


However mplayer says "Audio: no sound". There's noise coming out of my speakers on account of the hardwire going to the sound card, but it's not getting to mplayer. Consequently, when I switch to mencoder, I get video, but no audio. Here's the command I am using:
Code:

mencoder tv:// -tv driver=v4l2:device=/dev/video0:input=1:width=640:height=480:amode=1:volume=100:quality=90:forceaudio:outfmt=yuy2:norm=0 -oac mp3lame -ovc lavc -o test.avi


I've also tried adding "adevice=/dev/dsp2" to the -tv arguments with no luck. Does the audio come from /dev/video0? If not, how does mplayer know where to pull the audio from? I played around with the -tv options a lot, adding/removing/changing things, but I can't seem to figure this one out.

I also tried following this guide http://www.mythtv.org/wiki/PCI_TV_audio (specifically the " CX88 with HD-3000 / HD-5500" section) and I updated the prom which is why I now have /dev/dsp2. I'm using the HD-3000, 2.6.32-24-generic (Ubuntu), and MPlayer SVN-r1.0~rc3+svn20090426-4.4.3.

I'd like to not have to have the patch cord between the capture card and the sound card, but I'll take any solution that works at this point.
View user's profile Send private message
PostPosted: Wed Aug 25, 2010 8:32 pm Reply with quote
adamOfDc949
 
Joined: 18 Aug 2010
Posts: 3




using the "alsa:adevice=hw.2,0" options to the -tv arguments was a slight help... now I get static instead of nothing. The static starts and stops with mplayer, which is much nicer than having it play even when I'm not watching anything (until muted via alsamixer).

To view sound devices you have which are capable of recording, run:
Code:
arecord -l


I used hw.2,0 because the capture card is my second device, card #0. I'll post back if I actually solve the problem at some point.
View user's profile Send private message
PostPosted: Fri Aug 27, 2010 11:59 pm Reply with quote
adamOfDc949
 
Joined: 18 Aug 2010
Posts: 3




Finally figured it out (using the patch cable). Here's the final command I used:

Code:
mencoder tv:///1 -tv driver=v4l2:device=/dev/video0:input=1:width=640:height=480:quality=90:alsa:adevice=hw.0,0:amode=1:audiorate=48000:forceaudio:volume=100:outfmt=yuy2:immediatemode=0 -oac mp3lame -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=900 -o test.avi


immediatemode=0 is what causes mplayer/mencoder to record the audio, as it doesn't process the audio by default. I had to switch to audio device 0 because I'm using the patch cable to the main audio device. While 2,0 should work (since the audio is also going into the capture card), it doesn't and I've already spent way too much time on this. Another good debugging tool I found is /usr/bin/record which showed me that the signal could be heard by alsa on the primary sound card.

Hope this helps someone out and saves them over a week of frustration.
View user's profile Send private message
PostPosted: Fri Oct 07, 2011 4:15 am Reply with quote
baDawod
 
Joined: 26 Jul 2011
Posts: 3




This topic is very helpful..


thanks a lot guys..




_____________
Sildenafil | Cheap Levitra
View user's profile Send private message
How to record from composite/stereo inputs?
  pcHDTV Forum Index -> General pcHDTV topics
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 7 Hours  
Page 1 of 1  

  
  
 Post new topic  Reply to topic  


Powered by phpBB © 2001-2003 phpBB Group
Theme created by Vjacheslav Trushkin