DrScotsman
30th June 2005, 20:23
I'm running Linux 2.6.11, first time user for capturing in Linux.
I recently bought a Terratec Cinergy 600 capture card (SAA7134 chipset, which on searching seems good around the doom9 forums). That's probably irrelevent to my point, but worth saying.
Now in your Windows capture guide you recommend encoding to UYVY or YUY2, and as I would like to postprocess in Virtualdub and/or AviSynth under VMware (which I have been sucessfully doing for a while), I'd like to take that advice.. Now when encoding from the TV (bare bones command: "mencoder -tv driver=v4l2:device=/dev/video0:fps=25:width=720:height=576:channel=X:outfmt=yuy2:norm=0:noaudio tv://") trying to encode directly to raw YU2 works fine. However trying to encode to huffyuv results in problems:
prompt$ mencoder -tv driver=v4l2:device=/dev/video0:fps=25:width=720:height=576:channel=26:outfmt=yuy2:norm=0:noaudio tv:// -ovc lavc -lavcopts vcodec=huffyuv -v
MEncoder 1.0pre7-3.4.1 (C) 2000-2005 MPlayer Team
CPU: Advanced Micro Devices Athlon MP/XP/XP-M Barton (Family: 6, Stepping: 0)
Detected cache-line size is 64 bytes
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE
[I've cut a huge chunk out which in my opinion is irrelevent Ask for it if needed]
[V] filefmt:9 fourcc:0x32595559 size:720x576 fps:25.00 ftime:=0.0400
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1 (-1=autodetect) osd: 1
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 720 x 576 (preferred csp: Packed YUY2)
Trying filter chain: expand lavc
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
SwScale params: -1 x -1 (-1=no scaling)
Trying filter chain: scale expand lavc
VDec: using Packed YUY2 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO Config (720x576->720x576,flags=0,'MPlayer',0x32595559)
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 1 -> 1
SwScaler: reducing / aligning filtersize 9 -> 8
SwScaler: BICUBIC scaler, from Packed YUY2 to Planar YV12 using MMX2
SwScaler: using 4-tap MMX scaler for horizontal luminance scaling
SwScaler: using 4-tap MMX scaler for horizontal chrominance scaling
SwScaler: using 1-tap MMX "scaler" for vertical scaling (YV12 like)
SwScaler: 720x576 -> 720x576
REQ: flags=0x401 req=0x0
REQ: flags=0x401 req=0x0
videocodec: libavcodec (720x576 fourcc=55594648 [HFYU])
[huffyuv @ 0x851d6c8]Error: YV12 is not supported by huffyuv; use vcodec=ffvhuff or format=422p
Could not open codec.
FATAL: Cannot initialize video driver.
VDecoder init failed :(
Cannot find codec matching selected -vo and video format 0x32595559.
Read DOCS/HTML/en/codecs.html!
==========================================================================
Exiting...
If I understand correctly, it seems that it automatically uses the software scaler to convert the colorspace. I don't want to use YV12 so the ffvhuff suggestion is not an option. I'm sorry to say that I don't understand what the 422p option, so if that option is lossless (as in no lossy colorspace conversion) then I'll use that.
Now encoding to raw is not an option as it wastes too much space, so is there any workaround for this? Theoretically I could encode raw YUY2 to a named pipe and use another application to encode to huffyuv, so that would be a good option.
Thanks in advance.
I recently bought a Terratec Cinergy 600 capture card (SAA7134 chipset, which on searching seems good around the doom9 forums). That's probably irrelevent to my point, but worth saying.
Now in your Windows capture guide you recommend encoding to UYVY or YUY2, and as I would like to postprocess in Virtualdub and/or AviSynth under VMware (which I have been sucessfully doing for a while), I'd like to take that advice.. Now when encoding from the TV (bare bones command: "mencoder -tv driver=v4l2:device=/dev/video0:fps=25:width=720:height=576:channel=X:outfmt=yuy2:norm=0:noaudio tv://") trying to encode directly to raw YU2 works fine. However trying to encode to huffyuv results in problems:
prompt$ mencoder -tv driver=v4l2:device=/dev/video0:fps=25:width=720:height=576:channel=26:outfmt=yuy2:norm=0:noaudio tv:// -ovc lavc -lavcopts vcodec=huffyuv -v
MEncoder 1.0pre7-3.4.1 (C) 2000-2005 MPlayer Team
CPU: Advanced Micro Devices Athlon MP/XP/XP-M Barton (Family: 6, Stepping: 0)
Detected cache-line size is 64 bytes
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE
[I've cut a huge chunk out which in my opinion is irrelevent Ask for it if needed]
[V] filefmt:9 fourcc:0x32595559 size:720x576 fps:25.00 ftime:=0.0400
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1 (-1=autodetect) osd: 1
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 720 x 576 (preferred csp: Packed YUY2)
Trying filter chain: expand lavc
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
SwScale params: -1 x -1 (-1=no scaling)
Trying filter chain: scale expand lavc
VDec: using Packed YUY2 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO Config (720x576->720x576,flags=0,'MPlayer',0x32595559)
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 1 -> 1
SwScaler: reducing / aligning filtersize 9 -> 8
SwScaler: BICUBIC scaler, from Packed YUY2 to Planar YV12 using MMX2
SwScaler: using 4-tap MMX scaler for horizontal luminance scaling
SwScaler: using 4-tap MMX scaler for horizontal chrominance scaling
SwScaler: using 1-tap MMX "scaler" for vertical scaling (YV12 like)
SwScaler: 720x576 -> 720x576
REQ: flags=0x401 req=0x0
REQ: flags=0x401 req=0x0
videocodec: libavcodec (720x576 fourcc=55594648 [HFYU])
[huffyuv @ 0x851d6c8]Error: YV12 is not supported by huffyuv; use vcodec=ffvhuff or format=422p
Could not open codec.
FATAL: Cannot initialize video driver.
VDecoder init failed :(
Cannot find codec matching selected -vo and video format 0x32595559.
Read DOCS/HTML/en/codecs.html!
==========================================================================
Exiting...
If I understand correctly, it seems that it automatically uses the software scaler to convert the colorspace. I don't want to use YV12 so the ffvhuff suggestion is not an option. I'm sorry to say that I don't understand what the 422p option, so if that option is lossless (as in no lossy colorspace conversion) then I'll use that.
Now encoding to raw is not an option as it wastes too much space, so is there any workaround for this? Theoretically I could encode raw YUY2 to a named pipe and use another application to encode to huffyuv, so that would be a good option.
Thanks in advance.