LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-21-2007, 12:46 PM   #1
patrick295767
Member
 
Registered: Feb 2006
Distribution: FreeBSD, Linux, Slackware, LFS, Gparted
Posts: 664

Rep: Reputation: 138Reputation: 138
mencoder for the tv://


I get no sound afterwards when playing with mpalyer with all these:


Code:
/usr/bin/mencoder tv:// -tv driver=v4l2:input=0:norm=pal:chanlist=switzerland:width=320:height=240:outfmt=yuy2:device=/dev/video0:alsa:adevice=hw.0:amode=1:audiorate=32000:forceaudio:forcechan=1:buffersize=64 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1200:keyint=30 -oac mp3lame -lameopts br=128:cbr:mode=3 -ffourcc divx -endpos 1819mb  -o "tvchannel.avi"

Code:
mencoder tv:// -tv driver=v4l:input=0:width=320:height=240:amode=1:norm=PAL:channel=E5:chanlist=europe-west:immediatemode=0:adevice=/dev/dsp1:outfmt=yv12 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=3000:vhq:keyint=300 -oac mp3lame -lameopts cbr:br=192: mode=0 -vf pp=lb,crop=480:360:16:12 -ofps 25 -endpos 00:02:00 -o "tvchannel-temp.avi"
Code:
mencoder tv:// -tv driver=v4l2:input=0:norm=PAL:channel=E5:chanlist=europe-west:width=320:height=240:outfmt=yv12:device=/dev/video0:adevice=/dev/dsp:audiorate=44100:forceaudio:forcechan=2:buffersize=64 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1500:keyint=30 -oac mp3lame -lameopts br=128:cbr:mode=3 -ffourcc divx -o "tvchannel-temp.avi"

Code:
/usr/bin/mencoder tv:// -tv driver=v4l2:input=0:norm=pal:chanlist=europe-west:width=320:height=240:outfmt=yuy2:device=/dev/video0:adevice=/dev/dsp1:amode=1:audiorate=32000:forceaudio:forcechan=1:buffersize=64 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1200:keyint=30 -oac mp3lame -lameopts br=128:cbr:mode=3 -ffourcc divx -endpos 1819mb  -o "tvchannel-temp.avi"
I tried this too :
no sound still
ffmpeg

ffmpeg -threads 2 -vd /dev/video$DEV -r 29.97 -b 800 -s 640x480 -vcodec h264 -qmax 51 \
-me epzs -deinterlace -g 300 -async 1 -ac 2 -acodec mp3 -ab 96 -ar 32000 \
-ad /dev/dsp$DEV -t $TIM -f avi -y $DIR/$FIL.avi

* a/v sync drifts a bit -- not reliable
* encoding efficiency is high, but frames are dropped silently

mencoder

mencoder -tv driver=v4l2:device=/dev/video$DEV:fps=30000/1001:chanlist=us-bcast:\
audiorate=32000:adevice=/dev/dsp$DEV:input=0:amode=1:normid=4:width=512:height=384 \
-ovc x264 -x264encopts threads=2:bitrate=800:subq=2:me=2:frameref=4:8x8dct \
-oac mp3lame -lameopts cbr:br=96 -endpos $TIM -o $DIR/$FIL.avi tv:// > /dev/null

* creates files that don't stream correctly in VLC -- we've not got to the bottom of this
* encoding efficiency is somewhat below ffmpeg and transcode -- cannot capture to full 640x480 size without dropping frames
* superior to the others in its ability to accept a much fuller set of x264 encoding parameters

transcode

transcode -x v4l2=resync_margin=1:resync_interval=250,v4l2 -M 2 \
-i /dev/video$DEV -p /dev/dsp$DEV -y ffmpeg -F h264 -c 00:$TIM \
-g 640x480 -f 29.970,4 -u 1024,2 -w 800 -b 96 -Q 5 -e 32000,16,2 \
--lame_preset medium -o $DIR/$FIL.avi


my dsp1 is the sound card that makes sound when playing tvtime
I tried to play too with alsa

mplayer gives:
Code:
~$ mplayer tvchannel-temp.avi 
MPlayer 1.0rc1-4.1.2 (C) 2000-2006 MPlayer Team
CPU: AMD Athlon(tm) Processor (Family: 6, Model: 6, Stepping: 2)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled with runtime CPU detection.
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing tvchannel-temp.avi.
AVI file format detected.
AVI_NI: No audio stream found -> no sound.
AVI: No audio stream found -> no sound.
VIDEO:  [FMP4]  320x240  24bpp  25.000 fps  2891.0 kbps (352.9 kbyte/s)
Clip info:
 Software: MEncoder 1.0rc1-4.1.2
open: No such file or directory
[MGA] Couldn't open: /dev/mga_vid
open: No such file or directory
[MGA] Couldn't open: /dev/mga_vid
[VO_TDFXFB] Can't open /dev/fb0: No such file or directory.
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
Audio: no sound
Starting playback...
VDec: vo config request - 320 x 240 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
VO: [xv] 320x240 => 320x240 Planar YV12 
No bind found for key 'c'.                         
V:   2.8  71/ 71  7%  1%  0.0% 0 0 
Exiting... (Quit)

Last edited by patrick295767; 01-21-2007 at 01:12 PM.
 
Old 01-22-2007, 11:37 PM   #2
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
What video capture card are you using?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using mencoder masand Linux - Software 10 05-27-2007 01:12 PM
mencoder problem masand Linux - Software 1 10-29-2005 02:39 PM
mencoder jackstoage Linux - Software 9 04-22-2005 10:02 PM
How to get MEncoder ? zahoo Linux - Software 1 04-08-2005 07:27 AM
mencoder KL2001 Linux - Software 10 12-23-2002 04:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration