[MPlayer-users] crash v4l

phypor mplayer.user at rsichem.com
Fri May 16 03:50:57 CEST 2003


sometimes itll loop through the script a coupla times,
sometimes it happens right away

id be happy for it to be something wrong im doing (that i can fix) so i can archive from my camcorder


phypor at rommel camcordcap $ uname -a
Linux rommel.cox-internet.com 2.4.21-pre5-gss #7 Sat Apr 26 15:21:37 CDT 2003 i686 AMD Athlon(tm) XP 1700+ AuthenticAMD 
GNU/Linux

phypor at rommel camcordcap $ free
            total       used       free     shared    buffers     cached
Mem:      515608     506152       9456          0      26788      98088
-/+ buffers/cache:   381276     134332
Swap:       618492    51976     566516


Crash output

MEncoder 0.90-3.2.2 (C) 2000-2003 Arpad Gereoffy (see DOCS)

CPU: Advanced Micro Devices Athlon 4 PM Palomino/Athlon MP Multiprocessor/Athlon XP eXtreme Performance (Family: 6, 
Stepping: 2)
Detected cache-line size is 64 bytes
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Reading /home/phypor/.mplayer/codecs.conf: can't open '/home/phypor/.mplayer/codecs.conf': No such file or directory
Reading /usr/share/mplayer/codecs.conf: 50 audio & 136 video codecs
File not found: 'frameno.avi'
Reading config file /home/phypor/.mplayer/mencoder: No such file or directory
init_freetype
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
success: format: 0  data: 0x0 - 0x0
TV detected! ;-)
Selected driver: v4l
  name: Video 4 Linux input
  author: Alex Beregszaszi <alex at naxine.org>
  comment: under development
Selected device: BT878(Pinnacle PCTV Studio/Ra)
  Capabilites: capture tuner overlay clipping frameram scales
  Device type: 235
  Supported sizes: 48x32 => 768x480
  Inputs: 3
   0: Television: tuner audio tv camera  (tuner:1, norm:ntsc)
   1: Composite1: audio camera  (tuner:0, norm:ntsc)
   2: S-Video: audio camera  (tuner:0, norm:ntsc)
mbuf: size=8519680, frames=4
  Audio devices: 1
Video capture card reports the audio setup as follows:
   0: TV: muted=no vol=0 bass=0 treble=0 balance=0 mode=mono chan=1
ioctl dsp getfmt: 0
Supported formats: 1f9
ioctl dsp setfmt: 0
ioctl dsp stereo: 0 (req: 0)
ioctl dsp speed: 0
ioctl dsp trigger: 0
trigger: 1
ioctl dsp trigger: 0
ioctl dsp getblocksize: 0
blocksize: 8192
Audio capture - buffer 256 blocks of 8192 bytes, skew average from 16 meas.
Using input 'S-Video'
Selected norm: NTSC
Requested width: 480
Requested height: 320
Selected input hasn't got a tuner!
==> Found video stream: 0
Output format: Planar YV12
Audio capture - buffer 256 blocks of 8192 bytes, skew average from 16 meas.
==> Found audio stream: 0
   TV audio: 1 channels, 16 bits, 44100 Hz
Picture values:
  Depth: 12, Palette: yuv420p (Format: Planar YV12)
  Brightness: 32768, Hue: 32768, Colour: 32512, Contrast: 27648
Audio capture - buffer 256 blocks of 8192 bytes, skew average from 16 meas.
Using a ring buffer for maximum 1145 frames, 251 MB total size.
Enabling tv audio. Requested setup is:
id=0 vol=60000 bass=0 treble=0 balance=0 mode=mono chan=1
[V] filefmt:9  fourcc:0x32315659  size:480x320  fps:29.00  ftime:=0.0345
input fps will be interpreted as 29.97 instead
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
dec_audio: Allocating 2048 + 65536 = 67584 bytes for output buffer
AUDIO: 44100 Hz, 1 ch, 16 bit (0x10), ratio: 88200->88200 (705.6 kbit)
Selected audio codec: [pcm] afm:pcm (Uncompressed PCM)
==========================================================================
Opening video filter: [expand=-1:-1:-1:-1:1]
Expand: -1 x -1, -1 ; -1  (-1=autodetect) osd: 1
Opening video filter: [hqdn3d]
Opening video filter: [pp=ci]
[hqdn3d] query(Planar YV12) -> 1
[hqdn3d] query(Planar I420) -> 1
[hqdn3d] query(Planar IYUV) -> 1
[hqdn3d] query(Planar 444P) -> 0
[hqdn3d] query(Planar 422P) -> 0
[hqdn3d] query(Planar 411P) -> 0
Opening video filter: [crop=448:304:16:8]
Crop: 448 x 304, 16 ; 8
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 480 x 320 (preferred csp: Planar YV12)
[PP] Using external postprocessing filter, max q = 6.
Trying filter chain: crop pp hqdn3d expand lavc
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO Config (480x320->480x320,flags=0,'MPlayer',0x32315659)
REQ: flags=0xC01  req=0x400
REQ: flags=0x401  req=0x0
REQ: flags=0x401  req=0x0
REQ: flags=0x401  req=0x0
videocodec: libavcodec (448x304 fourcc=58564944 [DIVX])
High quality encoding selected (non real time)!
Selected video codec: [rawyv12] vfm:raw (RAW YV12)
==========================================================================
MP3 audio selected
Building audio filter chain for 44100Hz/1ch/16bit -> 44100Hz/1ch/16bit...
[libaf] Adding filter dummy
[dummy] Was reinitialized, rate=44100Hz, nch = 1, format = 0x00000001 and bps = 2
[dummy] Was reinitialized, rate=44100Hz, nch = 1, format = 0x00000001 and bps = 2
Writing AVI header...

preset=64

LAME version 3.93 MMX  (http://www.mp3dev.org/)
CPU features: i387, MMX (ASM used), 3DNow! (ASM used), SIMD
Using polyphase lowpass  filter, transition band: 10847 Hz - 11381 Hz

misc:

         scaling: 0.850000
         ch0 (left) scaling: 0.000000
         ch1 (right) scaling: 0.000000
         filter type: 0
         quantization: xr^3/4
         huffman search: best (outside loop)
         experimental X=1 Y=0 Z=1
         ...

stream format:

         MPEG-1 Layer 3
         1 channel - mono
         padding: off
         variable bitrate - ABR
         ...

psychoacoustic:

         tonality estimation limit: 8871.700195 Hz
         using short blocks: allowed
         adjust masking: 0.000000 dB
         psymodel: 1
         noise shaping: 2
          ^ amplification: 1
          ^ stopping: 1
         ATH: using
          ^ type: 2
          ^ adjust type: 0
          ^ adapt threshold type: 2
         experimental psy tunings by Naoki Shibata
            adjust masking bass=-3 dB, alto=0 dB, treble=0 dB, sfb21=0 dB
         using temporal masking effect: yes
         interchannel masking ratio: 0.000000
         ...

Forcing audio preload to 0, max pts correction to 0
*** [crop] Exporting mp_image_t, 480x320x12bpp YUV planar, 230400 bytes
*** [pp] Exporting mp_image_t, 448x304x12bpp YUV planar, 204288 bytes
*** [hqdn3d] Allocating mp_image_t, 448x304x12bpp YUV planar, 204288 bytes
*** [lavc] Allocating mp_image_t, 448x304x12bpp YUV planar, 204288 bytes
*** [expand] Direct Rendering mp_image_t, 448x304x12bpp YUV planar, 204288 bytes
get_path('subfont.ttf') -> '/home/phypor/.mplayer/subfont.ttf'
Unicode font: 1185 glyphs.
Pos:  53.5s   1602f ( 0%)  30fps Trem:   0min   0mb  A-V:0.000 [590:60] A/Vms 9/19 D/B/S 0/0/0
video capture thread: frame delta ~ 20.9 fps
Pos:  53.5s   1603f ( 0%)  30fps Trem:   0min   0mb  A-V:0.000 [589:60] A/Vms 9/19 D/B/S 0/0/0
video capture thread: frame delta ~ 50.0 fps
Pos:  57.7s   1728f ( 0%)  30fps Trem:   0min   0mb  A-V:0.000 [587:60] A/Vms 9/19 D/B/S 0/0/0
video capture thread: frame delta ~ 25.0 fps

video capture thread: frame delta ~ 37.4 fps
Pos: 381.7s  11441f ( 0%)  30fps Trem:   0min   0mb  A-V:0.000 [616:60] A/Vms 11/17 D/B/S 0/0/0
video capture thread: frame delta ~ 22.6 fps
Pos: 381.8s  11442f ( 0%)  30fps Trem:   0min   0mb  A-V:0.000 [616:60] A/Vms 11/17 D/B/S 0/0/0
video capture thread: frame delta ~ 44.3 fps
Pos: 600.0s  17983f ( 0%)  30fps Trem:   0min   0mb  A-V:0.000 [626:60] A/Vms 11/17 D/B/S 0/0/0
Writing AVI index...
Fixing AVI header...

Video stream:  626.446 kbit/s  (78305 bps)  size: 46986221 bytes  600.035 secs  17983 frames

Audio stream:   60.811 kbit/s  (7601 bps)  size: 4560886 bytes  600.007 secs
uninit video: raw
DEMUXER: freeing demuxer at 0x84000a8
Waiting for threads to finish... done
DEMUXER: freeing sh_audio at 0x8401000
DEMUXER: freeing sh_video at 0x8400f68
./camcordcap-v07.sh: line 48:  3082 Segmentation fault      mencoder -v -tv 
driver=v4l:on:device=/dev/video0:width=480:height=320:input=2:norm=NTSC -vop hqdn3d,pp=ci,crop=448:304:16:8 -fps 29.97 
-ofps 29.97 -ovc lavc -lavcopts vcodec=mpeg4:vhq:v4mv:keyint=300:vbitrate=$VBR:last_pred=5 -oac mp3lame -lameopts 
preset=$ABR -endpos $CLIPLEN -o $FILEN-$CLIPI.avi
bangfuckimdead!




phypor at rommel camcordcap $ cat camcordcap-v07.sh
#!/bin/sh

# v07   -
# v06   - CLIPCNT & CLIPLEN looping
# v05   - 480x320 capture, hqdn3d, good resolution, good pp
# v04   - 320x480 60fps
# v03   - mpeg1
# v02   - best setup for divx (cpu bottleneck)

#if [ "$1" ];

FILEN='monitor-030514'

TOPDIR='/home/dev/camcordcap/'
DAYDIR="`date +%y%m%d`"

LOGF=ccc.log

CLIPCNT=12
CLIPLEN=10:00

VBR=800
ABR=64

cd $TOPDIR
#if [ ! -d $DAYDIR ]; then
#        mkdir $DAYDIR;
#fi
#cd $DAYDIR

CLIPI=1
while [ $CLIPI -le $CLIPCNT ]; do
         echo $CLIPI

         mencoder  -v \
                 -tv driver=v4l:on:device=/dev/video0:width=480:height=320:input=2:norm=NTSC \
                 -vop hqdn3d,pp=ci,crop=448:304:16:8 \
                 -fps 29.97 -ofps 29.97 \
                 -ovc lavc \
                 -lavcopts vcodec=mpeg4:vhq:v4mv:keyint=300:vbitrate=$VBR:last_pred=5 \
                 -oac mp3lame \
                 -lameopts preset=$ABR \
                 -endpos $CLIPLEN \
                 -o $FILEN-$CLIPI.avi || { echo 'bangfuckimdead!'; exit; }

         sleep 2
         let CLIPI+=1
done

exit

# -vop hqdn3d ok for smaller 480x320

#       -vop crop=594:464:18:8,pp=ci,denoise3d=2:2:2 \

# -vop denoise3d/hqdn3d works v nicely, but is expensive enough to be non-realtime on xp1700
# -vop lavcdeint has horizontal deinterlace artifacts
# -vop telecine helps not at all
# -vop tfields, 60/60fps, cpu bottlenecked, possibly a/vsync off

# hqdn3d off
#       -vop crop=594:464:18:8,pp=ci,hqdn3d \

# Even with vhq off, only get an extra few fps
#       -lavcopts vcodec=mpeg4:keyint=300:vbitrate=2000 \

# Can't keep up (disk throughputwise)
#       -ovc rawrgb \

#       -lavcopts vcodec=mpeg4:vhq:v4mv:keyint=300:vbitrate=2000 \

# Low qual (not terrible, just loses too much)
#       -xy .5 -zoom -sws 10 \

# Good settings, CPU can't keep up
#       -vop crop=594:464:18:8,pp=ci,hqdn3d \
#       -lavcopts vcodec=mpeg4:vhq:v4mv:keyint=300:vbitrate=2000:trell \




More information about the MPlayer-users mailing list