Hi
considering my usual source https://dl.dropboxusercontent.com/u/39871584/C0020.mxf
I do: ffmpeg -i c0020.mxf -vcodec mjpeg -pix_fmt yuvj422p -q:v 0 -an ffmpeg.avi
this produce:
General
Complete name : D:\ffmpeg.avi
Format : AVI
Format/Info : Audio Video Interleave
File size : 536 MiB
Duration : 36s 600ms
Overall bit rate : 123 Mbps
Writing application : Lavf55.37.100
Video
ID : 0
Format : JPEG
Codec ID : MJPG
Duration : 36s 600ms
Bit rate : 123 Mbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 25.000 fps
Color space : YUV
Bit depth : 8 bits
Compression mode : Lossy
Bits/(Pixel*Frame) : 2.370
Stream size : 536 MiB (100%)
If I try to do the same in Virtualdub, encoding in FFDSHOW (and then rename with the hex editor the tag ffds in "mjpg")
this is the result:
General
Complete name : D:\vdffd.avi
Format : AVI
Format/Info : Audio Video Interleave
File size : 9.11 MiB
Duration : 4s 0ms
Overall bit rate : 19.1 Mbps
Writing library : VirtualDub build 35491/release
Video
ID : 0
Format : JPEG
Codec ID : MJPG
Duration : 4s 0ms
Bit rate : 19.1 Mbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 25.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.368
Stream size : 9.10 MiB (100%)
So if I try open it (vdffd.avi) in virtualdub with the internal mjpg decompressor, it don't load and get error.
An error appear in virtualdub also if I try open the ffmpeg' one (ffmpeg.avi)
If I try encode, in virtualdub, with the accusoft Pic Mjpeg in 422 mode:
General
Complete name : D:\pic.avi
Format : AVI
Format/Info : Audio Video Interleave
File size : 33.1 MiB
Duration : 4s 0ms
Overall bit rate : 69.4 Mbps
Writing library : VirtualDub build 35491/release
Video
ID : 0
Format : JPEG
Codec ID : MJPG
Duration : 4s 0ms
Bit rate : 69.4 Mbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 25.000 fps
Color space : YUV
Chroma subsampling : 4:2:2
Bit depth : 8 bits
Scan type : Interlaced
Scan order : Top Field First
Compression mode : Lossy
Bits/(Pixel*Frame) : 1.338
Stream size : 33.1 MiB (100%)
so virtualdub open correctly the PIC.avi and it is declared 422 by mediainfo
If I try encode in pic in 4:2:0 (4:1:1) mode this is the results:
General
Complete name : D:\pic420.avi
Format : AVI
Format/Info : Audio Video Interleave
File size : 29.4 MiB
Duration : 4s 0ms
Overall bit rate : 61.7 Mbps
Writing library : VirtualDub build 35491/release
Video
ID : 0
Format : JPEG
Codec ID : MJPG
Duration : 4s 0ms
Bit rate : 61.6 Mbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 25.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Interlaced
Scan order : Top Field First
Compression mode : Lossy
Bits/(Pixel*Frame) : 1.189
Stream size : 29.4 MiB (100%)
= virtualdub don't read the file pic420.avi !
Exactly the same thing happens with mencoder: when the output file are not declared in 4:2:2 by mediainfo is unopenable by virtualdub with the interal mjpeg decompressor.
Supporting the thesis that the problem is the lack of encoding in 4:2:2 I wonder if there is possibility of encoding with ffmpeg (and also in virtualdub with the ffdshow plugin) so that the output file is expressly 4:2:2. Thanks
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 11 of 11
Thread
-
-
Then there is probably something in the metadata signalling the file is 4:2:2 that vdub's internal jpeg decoder requires , since other mjpeg decoders correctly decode at 4:2:2
So your question isn't the lack of encoding 4:2:2, but rather some metadata or signalling that indicates file is 4:2:2 for mediainfo or internal vdub mjpeg decoder (because file is 4:2:2 according to other decoders)
You still haven't answered why you want to use internal vdub jpeg decoder ? -
because with internal decoder is greatly reduced the risk of making messes, greatly reduced the risk that some parameters has changed depending on windows settings and VFW or DirectShow decoder installed or not installed or changed by mistake or perhaps from other programs. In general the use of the internal decompressor is a point of grip and safety in order to avoid shambles
-
Virtualdub is the intermediary to do a thousand things, from the encoding H264 then the reduction hd/sd, convert mxf -> mjpg. I enjoy to shoot videos of my cats, not for serious things
-
-
Yes PM jagabo, he know all this stuff about AVI header etc... I don't know if the 4:2:2 is signalled in the header or RIFF tree, or if it's somewhere else in the actual video bitstream
That's a big cat , but I like your Mr. Tribble better -
As far as I can tell, ffdshow VFW's mjpeg mode does't support interlaced YUY2 properly. It always down-samples to YV12 and it treats the interlaced chroma as progressive (or maybe VirtualDub was down-sampling, but I suspect not because I had VirtualDub set to output YUY2 to the codec). The only way I could get it to encode interlaced video correctly is to feed it interlaced YV12 with VirtualDub in Fast Recompress mode. Try this script as input to VirtualDub if you want to experiment for yourself:
Code:ColorBars(pixel_type="yuy2") top=PointResize(width, height/2) bot=top.Invert() Interleave(top,bot) AssumeFieldbased() Weave() #ConvertToYV12(interlaced=true) # enable for interlaced YV12 output Trim(0,10)
Last edited by jagabo; 24th Apr 2014 at 20:28.
-
Why not import the mxf file into Virtualdub via FFInputDriver, it keeps 4:2:2. Do what you have to do, then export to mjpg or whatever.
Got my retirement plans all set. Looks like I only have to work another 5 years after I die........