VideoHelp Forum
+ Reply to Thread
Results 1 to 4 of 4
Thread
  1. Member
    Join Date: Mar 2009
    Location: United Kingdom
    Search Comp PM
    Hi,

    I'm attempting to record some video cassettes via a capture card. My computer can only manage to do an xvid compression in real time - here is the command I'm running:

    Code:
    sudo nice --19 \
    mencoder "tv://" -v -tv \
    driver=v4l2:device=/dev/video0:input=1:immediatemode=0:width=720:height=468:fps=25:outfmt=yv12:adevice=/dev/dsp:audiorate=48000 \
    -o "/home/documents/videos/films/${1}-copy.avi" \
    -aspect 4:3 \
    -endpos ${2} \
    -oac copy \
    -ovc xvid -xvidencopts turbo:nochroma_me:notrellis:max_bframes=0:vhq=0:psnr:bitrate=2000
    I can play back this file fine.

    However, I would like to compress it further once it is finished. Here is what I'm trying

    Code:
    mencoder "/home/documents/videos/films/${1}-copy.avi" \
    -o "/home/documents/videos/films/${1}.avi" \
    -vf yadif=0,hqdn3d=4:3:6,pp=al:c,softskip,harddup,crop=704:448:8:10 -field-dominance -1 -aid 128 \
    -oac faac -faacopts mpeg=4:br=96:object=2:tns \
    -ovc x264 -x264encopts bitrate=1000:me=hex:dct_decimate:nointerlaced:no8x8dct:nofast_pskip:trellis=0:partitions=p8x8,b8x8,i4x4:mixed_refs:keyint=250:keyint_min=25:frameref=2:bframes=8:b_adapt=1:b_pyramid:weight_b:direct_pred=spatial:subq=4:nochroma_me:cabac:deblock:level_idc=41:threads=auto:ssim:psnr
    The video compresses fine, but I loose the sound. The output from mencoder is:

    Code:
    MEncoder 2:1.0~rc2-0ubuntu17+medibuntu1 (C) 2000-2007 MPlayer Team
    success: format: 0  data: 0x0 - 0x387e5c
    AVI file format detected.
    [aviheader] Video stream found, -vid 0
    [aviheader] Audio stream found, -aid 1
    AVI: invalid audio stream ID: 128 - ignoring (nosound)
    VIDEO:  [XVID]  720x468  12bpp  25.000 fps  2127.6 kbps (259.7 kbyte/s)
    [V] filefmt:3  fourcc:0x44495658  size:720x468  fps:25.00  ftime:=0.0400
    videocodec: framecopy (720x468 12bpp fourcc=44495658)
    Writing header...
    ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
    Writing header...
    ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
    For some reason, mplayer can play the file with audio, but mencoder things the audio stream is invalid. I've tried doing the same in VLC. Although I can see an error, the sound is still lost.

    Any ideas?

    Cheers
    Quote Quote  
  2. Get Slack disturbed1's Avatar
    Join Date: Apr 2001
    Location: init 4
    Search Comp PM
    Remove -aid 128 from your encoding script. That's for VOB/MPEG files, not avi containers.
    Linux _is_ user-friendly. It is not ignorant-friendly and idiot-friendly.
    Quote Quote  
  3. Member
    Join Date: Mar 2009
    Location: United Kingdom
    Search Comp PM
    Thank you kind sir!

    That will teach me for taking code from other peoples examples without understanding what it does. I think I'd been staring at it too long to notice the problem.

    Regards
    Quote Quote  
  4. Get Slack disturbed1's Avatar
    Join Date: Apr 2001
    Location: init 4
    Search Comp PM
    Glad it solved the problem.
    Linux _is_ user-friendly. It is not ignorant-friendly and idiot-friendly.
    Quote Quote  



Similar Threads