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:
I can play back this file fine.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
However, I would like to compress it further once it is finished. Here is what I'm trying
The video compresses fine, but I loose the sound. The output from mencoder is: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
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.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.
Any ideas?
Cheers
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 4 of 4
Thread
-
-
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. -
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 -
Glad it solved the problem.
Linux _is_ user-friendly. It is not ignorant-friendly and idiot-friendly.
Similar Threads
-
mencoder: ts to avi (x264) with multiple audio stream
By sven_911 in forum LinuxReplies: 20Last Post: 26th Mar 2020, 05:26 -
Joining HD MOV files from camera & saving as mp4; "Invalid Audio Stream"
By maskingtape in forum Newbie / General discussionsReplies: 30Last Post: 23rd Aug 2011, 12:30 -
How Could I change the default audio stream in a Dual or Multi Audio AVI fi
By worldperseus in forum AudioReplies: 3Last Post: 17th Jan 2011, 05:53 -
Mencoder problem: BUFFER UNDEFLOW at stream 0, raising muxrate to 11088
By fvisagie in forum Video ConversionReplies: 0Last Post: 29th Apr 2009, 16:43 -
How do you separate an AVI file into a video stream and an audio stream?
By VidHunter in forum MacReplies: 2Last Post: 1st May 2008, 03:27