[prev in list] [next in list] [prev in thread] [next in thread]
List: mjpeg-users
Subject: Re: [Mjpeg-users] cvs mpeg2enc chokes on smil2yuv out
From: "Steven M. Schultz" <sms () 2BSD ! COM>
Date: 2006-07-24 22:46:11
Message-ID: Pine.BSI.4.05L.10607241526390.29398-100000 () moe ! 2bsd ! com
[Download RAW message or body]
On Sun, 23 Jul 2006, sean wrote:
> I have a raw dv file.
> smil2yuv -i 2 test.dv > test.yuv
Ok - so that decoded the DV data to a 4:1:1 Y'CbCr file (or as it's
commonly called "yuv 411").
> cat test.yuv | mpeg2enc -f 8 -o test.m2v
> **ERROR: [mpeg2enc] Could not read YUV4MPEG2 header: stream
> requires unsupported features!
Which of course won't work since mpeg2enc accepts ONLY "yuv" (Y'CbCr)
data that uses 4:2:0 sampling. More properly "4:2:0 MPEG-2".
> head test.yuv
> YUV4MPEG2 W720 H480 F30000:1001 Ib A10:11 C411
^
|
Chroma sampling is 4:1:1
MPEG does NOT allow 4:1:1. MPEG-2 allows, at the main level/profile
ONLY 4:2:0 (there is a 4:2:2 MPEG profile for professional/studio
use but relatively few encoders support it).
> Should I be using something else to convert raw to yuv??
I'll point out that the 'container' doesn't matter at all. The DV
data could be in a Quicktime file or in a type 2 AVI file and the
error would be the same.
DV data does use the "yuv" colorspace (for NTSC it's 4:1:1, for PAL
it's 4:2:0PALDV). It should also me mentioned that "yuv" has many
forms - 4:1:1, 4:2:0, 4:2:2, 4:4:4, and I've seen a 3:1:1 mentioned
once. So to talk about converting to "yuv" is vague.
a better and more accurate statement of the question would be:
How do I convert a file containing DV data to 4:2:0mpeg2 (something
mpeg2enc understands)?
That can be answered. You need to resample (convert) the chroma
from 4:1:1 to 4:2:0. This is done with y4mscaler. y4mscaler can be
found at http://www.mir.com/DMG/Software/y4mscaler.html
In its simplest chroma conversion mode the usage is trivial:
... | y4mscaler -O chromass=420mpeg2 | ...
smil2yuv -i 2 test.dv | \
y4mscaler -O chromass=420mpeg2 | \
mpeg2enc -f 8 ...
Cheers,
Steven Schultz
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic