Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!
Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.
Witam
mam problem z nagrywaniem dzwieku za pomoca komendy:
mencoder -ovc raw -oac pcm -tv driver=v4l:norm=pal:input=3:adevice=hw.0.0:width=640:height=480 -af volume=-10 -o a.avi tv://
obraz nagrywa sie ladnie zas nie ma dzwieku.
w Tvtime jest audio+video gdy program jest wlaczony moge nagrac dzwiek komenda:
arecord -f dat -t wav -D hw:0,0 foobar.wav
co robie nie tak?
alsa info:
http://www.alsa-project.org/db/?f=0b343febc756d1dc6 … 7a01106d5682d
Ostatnio edytowany przez olo321a (2011-03-19 15:53:25)
Offline
Co mplayer pisze przy nagrywaniu ?
Offline
tom@Wheezy:~/zapas/video$ mencoder -ovc raw -oac pcm -tv driver=v4l:norm=pal:input=3:adevice=hw.0.0:width=640:height=480 -af volume=-10 -o a.avi tv:// MEncoder 1.0rc4-4.4.5 (C) 2000-2010 MPlayer Team success: format: 9 data: 0x0 - 0x0 TV file format detected. Selected driver: v4l name: Video 4 Linux input author: Alex Beregszaszi comment: under development ================================================================= WARNING: YOU ARE USING V4L DEMUXER WITH V4L2 DRIVERS!!! As the V4L1 compatibility layer is broken, this may not work. If you encounter any problems, use driver=v4l2 instead. Bugreports on driver=v4l with v4l2 drivers will be ignored. ================================================================= Selected device: BT878 video (AVerMedia TVPhone Capabilites: capture tuner teletext overlay clipping Device type: 47 Supported sizes: 48x32 => 924x576 Inputs: 3 0: Television: tuner tv (tuner:1, norm:pal) 1: Composite1: (tuner:0, norm:pal) 2: S-Video: (tuner:0, norm:pal) Invalid input requested: 3, valid: 0-2 [V] filefmt:9 fourcc:0x32315659 size:640x480 fps:25.000 ftime:=0.0400 Opening video filter: [expand osd=1] Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1 ========================================================================== Opening video decoder: [raw] RAW Uncompressed Video Movie-Aspect is undefined - no prescaling applied. Selected video codec: [rawyv12] vfm: raw (RAW YV12) ========================================================================== Forcing audio preload to 0, max pts correction to 0. Writing header... ODML: vprp aspect is 4:3. Writing header... ODML: vprp aspect is 4:3. Pos: 0.3s 7f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] 1 duplicate frame(s)! ^CPos: 3.2s 78f ( 0%) 23.89fps Trem: 0min 0mb A-V:0.000 [90993:0] Flushing video frames. Writing index... Writing header... ODML: vprp aspect is 4:3. Video stream: 90993.414 kbit/s (11374177 B/s) size: 35942400 bytes 3.160 secs 78 frames MJP: returning! tom@Wheezy:~/zapas/video$
gdy zaladuje snd-mixer-oss , snd-pcm-oss i zmianie w tvtime.xml na <option name="MixerDevice" value="/dev/dsp"/>
moge sterowac poziomem dzwieku z tvtima
ale jak w mencoder ustawie adevice=/dev/dsp to dalej cisza
Ostatnio edytowany przez olo321a (2011-03-19 16:17:32)
Offline
Zacznijmy od błędnej składni
driver=v4l raczej v4l2
input=3 nie ma takiego wejścia
0: Television: tuner tv (tuner:1, norm:pal) 1: Composite1: (tuner:0, norm:pal) 2: S-Video: (tuner:0, norm:pal)
Wogóle to zerknij tutaj
http://forum.dug.net.pl/viewtopic.php?id=14241
Offline
dziala, wielkie dzieki wystarczylo zmienic to co wymieniłeś i teraz mam tak:
mencoder -ovc raw -oac pcm -tv driver=v4l2:norm=pal:input=0:adevice=/dev/dsp:width=640:height=480 -af volume=-10 -o a.avi tv://
teraz tylko zabawa z kodekami mi zostala ...
Offline
grzebiac dalej nastepny problem:
tom@Wheezy:~/zapas/video$ mencoder -ovc lavc -lavcopts vcodec=mpeg4:\vhq:vbitrate=6000 -oac mp3lame -lameopts cbr:br=128 -tv driver=v4l2:norm=pal:input=0:adevice=/dev/dsp:width=640:height=480 -af volume=-10 -o 6000.avi tv:// MEncoder 1.0rc4-4.4.5 (C) 2000-2010 MPlayer Team MPlayer was compiled without libmp3lame support. -lameopts is not an MEncoder option
tom@Wheezy:~/zapas/video$ mencoder -oac help MEncoder 1.0rc4-4.4.5 (C) 2000-2010 MPlayer Team Available codecs: copy - frame copy, without re-encoding (useful for AC3) pcm - uncompressed PCM audio lavc - FFmpeg audio encoder (MP2, AC3, ...)
jak usatwic w takim razie by dzwiek byl w mp3?
Offline
Wywal tego mencodera a zainstaluj z debian-multimedia.
Offline
pomogło :)
zgrywam juz dobrze za pomoca polecenia :
mencoder -ovc lavc -lavcopts vcodec=mpeg4:\vhq:vbitrate=6000 -oac mp3lame -lameopts br=128: -ffourcc DIVX -tv driver=v4l2:norm=pal:input=1:adevice=/dev/dsp:width=352:height=288 -af volume=-10 -o zakopane.avi tv://
Mam kilka kaset VHS ktore chciałbym zgrac do kompa najlepiej odrazu w formacie DVD Video bo wtedy gdy zajdzie koniecznosc nagrania na DVD nie trzeba bedzie konwertowac, ale ponizsza skladnia nie nagrywa mi dziweku:
mencoder -oac lavc -tv driver=v4l2:norm=pal:input=1:adevice=/dev/dsp:amode=1:width=352:height=288 -af volume=-10 -ovc lavc -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:keyint=15:vrc_maxrate=9800:vbitrate=2500:aspect=4/3:acodec=ac3:vstrict=0:abitrate=192 -of mpeg -mpegopts format=dvd:vaspect=4/3 -af lavcresample=48000 -o vhs.mpeg tv://
cos sie czepa do ustawien ac3:
Current input: 1 Current format: YVU420 v4l2: current audio mode is : STEREO Audio block size too low, setting to 16384! [V] filefmt:9 fourcc:0x32315659 size:352x288 fps:25.000 ftime:=0.0400 ========================================================================== Opening audio decoder: [pcm] Uncompressed PCM audio decoder AUDIO: 44100 Hz, 2 ch, s16le, 1411.2 kbit/100.00% (ratio: 176400->176400) Selected audio codec: [pcm] afm: pcm (Uncompressed PCM) ========================================================================== PACKET SIZE: 2048 bytes, deltascr: 43885 MPEG MUXER, patching aspect ratio to 4/3 Opening video filter: [expand osd=1] Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1 ========================================================================== Opening video decoder: [raw] RAW Uncompressed Video Movie-Aspect is undefined - no prescaling applied. videocodec: libavcodec (352x288 fourcc=3267706d [mpg2]) Selected video codec: [rawyv12] vfm: raw (RAW YV12) ========================================================================== [ac3 @ 0x8922de0]No channel layout specified. The encoder will guess the layout, but it might be incorrect. Limiting audio preload to 0.4s. Increasing audio density to 4. Forcing audio preload to 0, max pts correction to 0. Pos: 0.0s 1f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] Writing header... INITV: 0.200, 0.160, fps: 25.000 ^CPos: 2.0s 50f ( 0%) 23.61fps Trem: 0min 0mb A-V:0.000 [3431:192] Flushing video frames. Writing index...
Offline
Masz tam bałagan w składni
Nie mam teraz czasu aby to analizować.
Masz tu coś na wzór
/usr/bin/mencoder tv:// -tv device=/dev/video0:input=1:driver=v4l2:outfmt=yuy2:normid=1:fps=25:width=720:height=576:brightness=20:contrast=0:saturation=100 -vf pp=lb -of mpeg -mpegopts format=dvd -srate 48000 -ofps 25 -ovc lavc -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:keyint=15:vrc_maxrate=9800:vbitrate=2400:aspect=4/3 -vf pp=lb -oac lavc -lavcopts acodec=ac3:abitrate=192 -o film.mpg
To jest dla innej karty co niepotrzebne wyrzuć a co potrzebne dopasuj.
Ustawienia kodeków są dla dvd.
Offline
wlasciwie to Twoje ustawienia odnosnie audio sa identyczne. jak robie podglad pilku to mam audio o takich ustawiniach jakie wybiore tyle z epoprostu jest cisza w glosnikach tak jak by wybieral jakies inne zrodlo dzwieku podczas nagrywania
Offline
mencoder -ovc lavc -lavcopts vcodec=mpeg4:\vhq:vbitrate=6000 -oac mp3lame -lameopts br=128: -ffourcc DIVX -tv driver=v4l2:norm=pal:input=1:adevice=/dev/dsp:width=352:height=288 -af volume=-10 -o zakopane.avi tv://
To polecenie nagrywa z dźwiękiem ?
Offline
tak, mp3lame dziala ok
Offline
mencoder -of mpeg -mpegopts format=dvd -srate 48000 -ofps 25 -ovc lavc -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:keyint=15:vrc_maxrate=9800:vbitrate=2400:aspect=4/3 -vf pp=lb -oac lavc -lavcopts acodec=ac3:abitrate=192 -tv driver=v4l2:norm=pal:input=1:adevice=/dev/dsp -o film.mpg tv://
Spróbuj tego.
Jak coś będzie nie tak bo nie sprawdzałem to pokaż co mencoder pokazuje.
Offline
tom@Wheezy:~/100GB/video$ mencoder -of mpeg -mpegopts format=dvd -srate 48000 -ofps 25 -ovc lavc -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:keyint=15:vrc_maxrate=9800:vbitrate=2400:aspect=4/3 -vf pp=lb -oac lavc -lavcopts acodec=ac3:abitrate=192 -tv driver=v4l2:norm=pal:input=1:adevice=/dev/dsp -o film.mpg tv:// MPlayer SVN-r33057 (C) 2000-2010 MPlayer Team success: format: 9 data: 0x0 - 0x0 TV file format detected. Selected driver: v4l2 name: Video 4 Linux 2 input author: Martin Olschewski <olschewski@zpr.uni-koeln.de> comment: first try, more to come ;-) Selected device: BT878 video (AVerMedia TVPhone Tuner cap: Tuner rxs: MONO Capabilities: video capture video overlay VBI capture device tuner read/write streaming supported norms: 0 = NTSC; 1 = NTSC-M; 2 = NTSC-M-JP; 3 = NTSC-M-KR; 4 = PAL; 5 = PAL-BG; 6 = PAL-H; 7 = PAL-I; 8 = PAL-DK; 9 = PAL-M; 10 = PAL-N; 11 = PAL-Nc; 12 = PAL-60; 13 = SECAM; 14 = SECAM-B; 15 = SECAM-G; 16 = SECAM-H; 17 = SECAM-DK; 18 = SECAM-L; 19 = SECAM-Lc; inputs: 0 = Television; 1 = Composite1; 2 = S-Video; Current input: 1 Current format: YVU420 v4l2: current audio mode is : LANG1 Audio block size too low, setting to 8192! [V] filefmt:9 fourcc:0x32315659 size:640x480 fps:25.000 ftime:=0.0400 ========================================================================== Opening audio decoder: [pcm] Uncompressed PCM audio decoder AUDIO: 44100 Hz, 1 ch, s16le, 705.6 kbit/100.00% (ratio: 88200->88200) Selected audio codec: [pcm] afm: pcm (Uncompressed PCM) ========================================================================== PACKET SIZE: 2048 bytes, deltascr: 43885 Opening video filter: [expand osd=1] Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1 Opening video filter: [pp=lb] ========================================================================== Opening video decoder: [raw] RAW Uncompressed Video [PP] Using external postprocessing filter, max q = 6. Movie-Aspect is undefined - no prescaling applied. videocodec: libavcodec (640x480 fourcc=3267706d [mpg2]) Selected video codec: [rawyv12] vfm: raw (RAW YV12) ========================================================================== [ac3 @ 0x8922de0]No channel layout specified. The encoder will guess the layout, but it might be incorrect. Limiting audio preload to 0.4s. Increasing audio density to 4. Forcing audio preload to 0, max pts correction to 0. Pos: 0.0s 1f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] Writing header... INITV: 0.200, 0.160, fps: 25.000 Pos: 2.0s 50f ( 0%) 23.41fps Trem: 0min 0mb A-V:0.000 [2918:192] 1 duplicate frame(s)! ^CPos: 2.8s 69f ( 0%) 23.56fps Trem: 0min 0mb A-V:0.000 [2667:192] Flushing video frames. Writing index... Overhead: 3.002% (29963 / 998133) Writing header... Video stream: 2667.489 kbit/s (333436 B/s) size: 933621 bytes 2.800 secs 69 frames Audio stream: 192.000 kbit/s (24000 B/s) size: 66816 bytes 2.784 secs v4l2: 71 frames successfully processed, 1 frames dropped. tom@Wheezy:~/100GB/video$
ale co ciekawe jak zmienie ac3->mp2 pozostawiajac reszte to samo jest ok:
wczesniej robilem tak odsluchiwalem pliki pod windosem zas jak odpale plik z ac3 pod mplayere albo VLC (linux) dzwiek jest ale glosy sa mowione jakby przelecialy przez equalizer imitujacy glos robota
// tagi code — ArnVaker
Ostatnio edytowany przez olo321a (2011-03-21 12:42:46)
Offline
Tak na szybko dla sprawdzenia napisałem sobie skrypta
#!/bin/bash mencoder -quiet tv:// -tv device=/dev/video0:driver=v4l2:outfmt=yuy2:normid=8:fps=25:width=768:height=578:brightness=50:contrast=59:saturation=59:freq=503.300:fps=25:audiorate=48000:amode=1:alsa:adevice=hw.1,0 -vf scale=720:576,pp=de -of mpeg -mpegopts format=dvd -srate 48000 -ofps 25 -ovc lavc -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:keyint=15:vrc_maxrate=9800:vbitrate=2400:aspect=4/3 -vf pp=lb -oac lavc -lavcopts acodec=ac3:abitrate=192 -o /home/adam/XDTV/tvp2_`date "+%s"`.mpg
Nagrałem nim kawałek programu tv i jest ok.
Offline