[MEncoder-users] V210 Codec

Larry Reznick lreznick at idistream.com
Wed Feb 18 17:29:48 CET 2009


P.J. Trudell wrote:
> P.J. Trudell wrote:
>   
>> Larry, 
>> I don't think I have an /etc/mplayer/codecs.conf or a ~/.mplayer/codecs.conf
>>
>> pj at padiwan:~$ ls -al /etc/mplayer/
>> total 28
>> drwxr-xr-x   2 root root  4096 2009-01-10 22:58 .
>> drwxr-xr-x 140 root root 12288 2009-02-17 12:21 ..
>> -rw-r--r--   1 root root  3760 2007-11-03 09:14 input.conf
>> -rw-r--r--   1 root root  3654 2007-11-03 09:14 menu.conf
>> -rw-r--r--   1 root root  3270 2008-04-12 19:17 mplayer.conf
>> pj at padiwan:~$ ls -al ~/.mplayer/
>> total 28
>> drwxr-xr-x  3 pj pj 4096 2008-12-11 13:33 .
>> drwxr-xr-x 66 pj pj 4096 2009-02-17 10:31 ..
>> -rw-r--r--  1 pj pj   44 2008-12-10 19:42 config
>> -rw-r--r--  1 pj pj 2531 2009-02-17 08:38 gui.conf
>> -rw-r--r--  1 pj pj   25 2009-02-17 08:38 gui.history
>> -rw-r--r--  1 pj pj    0 2009-02-17 08:38 gui.pl
>> -rw-r--r--  1 pj pj    0 2009-02-17 08:38 gui.url
>> -rw-r--r--  1 pj pj   36 2008-12-11 12:09 registry
>> drwxr-xr-x  3 pj pj 4096 2008-12-11 13:28 skins
>> lrwxrwxrwx  1 pj pj   53 2008-12-11 11:16 subfont.ttf -> /usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf
>>
>>
>>     
> It is the same on all my computers regardless if I installed them with
> apt-get or compiled from source. Wait a second, on the machine I
> compiled it on, a find * |grep codecs.conf found a codecs.conf file in
> the directory I used to compile mplayer, but it doesnt seem to be used
> when I use mplayer.  Should I copy it to /etc/mplayer or ~/.mplayer/  ?
> or should I make the changes prior to compiling?
>   
>> P.J.
>> _______________________________________________
>> MEncoder-users mailing list
>> MEncoder-users at mplayerhq.hu
>> https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
>>
>>    
>>
>> The original (current by SVN) codecs.conf file is in the etc subdir of 
>> the mplayer dir you update from SVN and compile in. So, the one your 
>> find showed is the one I mentioned. That's the one you want to copy into 
>> your ~/.mplayer subdir and then modify to include the Blackmagic 
>> configuration.
>>
>> Copy codecs.conf after you update with SVN, either before or after you 
>> successfully complete your compile. Your copy of codecs.conf gets read 
>> each time you start MPlayer so it is independent of compiling. Because 
>> the only change I make to the latest version from SVN is the Blackmagic 
>> configuration, I always copy & modify the latest one after SVN if I get 
>> a successful compile. Most people don't need ~/.mplayer/codecs.conf 
>> because the built-in settings are typically sufficient.
>>
>> --Larry
>> _______________________________________________
>> MEncoder-users mailing list
>> MEncoder-users at mplayerhq.hu
>> https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
>>     
>
> Lary,
> It worked great.  Thanks for your help!!!  
>
> I commented out the cinewave codec you talked about above and added the blackmagic section and it plays well.  
>
> By the way I am looking for a good format to convert my uncompressed (v210) home movies to to work with them in cinelerra without much of a loss in quality.  Any suggestions of a format and a sample command.
>
> Thanks again.
>
> P.J.
> _______________________________________________
> MEncoder-users mailing list
> MEncoder-users at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
>
>   

The v210 pixel format is a 10-bit 4:2:2 format, so simply using MPlayer 
to convert it to 8-bit 4:2:0 (I420 AKA IYUV or YV12, which simply swaps 
the Cr & Cb) will save space. I don't know Cinelerra so I have no direct 
suggestions. If Cinelerra understands the I420 format, that would be 
your first conversion.

I prefer to use the YUV4MPEG2 file format to avoid mystery data. (Look 
up "yuv4mpeg" in the MPlayer man page. MEncoder won't produce this 
format, only MPlayer.) Just be careful about the FPS fraction it 
generates if you're using one of the NTSC frame rates: MPlayer generates 
screwy fractions. For example, the 720p movie trailer for The Spirit 
reports:

VIDEO:  [avc1]  1280x544  24bpp  23.976 fps    0.0 kbps ( 0.0 kbyte/s)

The 23.976 fps rate is actually supposed to be 24000/1001, barring video 
engineer fooling around with rates for syncing audio & video. Using the 
following command line to generate the YUV4MPEG2 output:

$ mplayer -nocache -nosound -vo yuv4mpeg:file=spirit_720p_2.y4m 
the_spirit_h720p.mov

the resulting file is 1,829,939,518 bytes long with 1752 frames. Its 
YUV4MPEG2 header shows:

$ head -1 spirit_720p.y4m
YUV4MPEG2 W1280 H544 F12570329:524288 Ip A1:1

That fraction is bizarre. Obviously, the denominator is binary based, 
but why use that one? Mathematically, this fraction works out to 
23.97599983 instead of 23.976. In fact, 23.976 should have been 
expressed as 2997/125. However, one could argue that the rate is 
supposed to be 24000/1001, which is 23.976023976 (repeating the last six 
digits). Thus, while 23.976 is theoretically inaccurate enough, the 
bizarre fraction MPlayer comes up with causes even more error. You might 
consider this picky, but the difference introduces creeping sync errors. 
After MPlayer finishes writing the YUV4MPEG2 file, I repair the fraction 
in the header.

Separately, you can extract the PCM audio and put it into a WAV file. 
Once you've got the Y4M and WAV, you can mux them into a container using 
MEncoder or FFmpeg.

--Larry



More information about the MEncoder-users mailing list