View Single Post
Old 19th February 2020, 22:18   #993  |  Link
mindsong
Registered User
 
Join Date: Mar 2018
Posts: 4
hello videofan3d,

Thanks for the reply (and for your great work on this project).

In your short reply, you've confirmed that my system is (still) not configured correctly. Most folks in here are working with a different data-flow (BD-3D to standalone MVC-3D), so I wanted to check to see if my simple test/approach was working for others before hitting up the thread with a "it doesn't work" assertion... Apparently it does work...

For me, the 'parts' all seem to be working on their own, but FRIMEncode isn't seeing my simple (or slightly more complex) AVISynth output as I420 and exits before it creates the avc/mvc pair - the error has been mentioned before and most folks have been able to fix their issues. I've read enough to see that the system setup is as likely (or more likely) to be a source of problems as the final FIRM/Intel step, so I wanted to be sure my ultimate target was viable (simple AVS script to avvc/mvc). Thanks for verifying that.


In gory detail, for those that might 'see' my problem, and future readers who go down this debugging path:

As I assumed (and still do) that the problem *is* my system, so my resolution efforts follow:

1) I've worked to match my x86/x64 toolchains with 'proper' (bitwise) versions of the AVISynth, ffdshow/VFW, FRIM, and Intel MSDK as a foundation. (everything is x86 for now)

2) I've then checked to be sure my simple AVS script is viable (it renders fine using AVIsynth 2.60 and AviSynth+ in 32-bit Vdub2, WMP, MPC-HC, and ffmpeg's avs renderer to both pipes and files)

3) I've done everything I know how to ensure that the AVS script outputs are YV12/I420 AVI streams and files, using Vdub2 and ffmpeg - files and pipes show lossless 4:2:0 YV12 or I420 content at various resolutions and framerates. The files/streams/pipes seem to play well enough on the above players and media-info/ffprobe indicate appropriate content/formats

4) I'm pretty certain that my ffdshow layer is causing the issue in the pipeline, but after hacking at that for a day, thought I'd ask some smarter folks to be sure my approach was/is plausible and that the script/workflow wasn't missing some obvious understanding ("of course that doesn't work!..." kind of thing).

5) with ffdshow(-tryout from sourceforge ffdshow_rev4533_20140929_clsid.exe) , the default install (32bit) with the default settings and the VFW decode "RGB raw video" set to "all-supported", I get the mentioned error from the above FRIMEncode32.exe command and script:

Code:
ERROR: Cannot get I420 frame from input avi-file MyScript.avs
       Frame was written in default format to file MyScript.avs.error.bmp
and the bmp file that is produced *looks correct* (double-wide colorbars), so I assume that the AVISynth framework is operating properly (I have removed/disabled *all* of my avisynth plugins to ensure no side-effects/conflicts)

Also - when run *without* the "-avi" option, my FRIMEncode32.exe is able to run, ingest, process, and output a avc/mvc pair (660K.avc - 654k.mvc - mvc should be 520k-ish?) from an AVI file created from the above AVS script (~600 M avi for the 100 frames) using vdub2 (latest).

For good reason, I think the output is correct but not useful (the input file looks fine in WMP, but the avc file has sliding/blocky content from the FRIM/Intel stage (in WMP), and a tsmuxer m2ts from the pair plays, but also looks 'wrong' in the same way (no errors in the tsmuxer stage).

I assume FRIMEncode is expecting raw video and my AVI has repeating/confusing header/frame info that causes this corruption/sliding image effect. Probably doing the right thing. It only processes 50 frames (of 100).

If I run the command *with* the "-avi" switch, I get the same I420 related error message.



Infile specs (generated from vdub2 with the above AVS script):

Code:
General
Complete name                            : C:\Users\mindsong\Desktop\at\I420_3840x1080.avi
Format                                   : AVI
Format/Info                              : Audio Video Interleave
File size                                : 593 MiB
Duration                                 : 4 s 167 ms
Overall bit rate                         : 1 194 Mb/s
Writing application                      : Lavf58.29.100

Video
ID                                       : 0
Format                                   : YUV
Codec ID                                 : I420
Codec ID/Info                            : 8 bit Y plane followed by 8 bit 2x2 subsampled U and V planes.
Duration                                 : 4 s 167 ms
Bit rate                                 : 1 194 Mb/s
Width                                    : 3 840 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 3.556
Frame rate                               : 24.000 FPS
Compression mode                         : Lossless
Bits/(Pixel*Frame)                       : 12.000
Stream size                              : 593 MiB (100%)

FRIM Command that processes this file (with funky output avc/mvc files (size = 660K.avc - 654k.mvc) :

Code:
FrimEncode32 -i I420_3840x1080.avi -sbs 2 -viewoutput -o:mvc b.avc d.mvc -w 3840 -h 1080 -dsth 1080 -dstw 1920 -u 4

FRIM Encoder version 1.30 - Win32 (build: Apr 16 2019)
 - based on Intel(R) Media SDK

Media SDK impl          HARDWARE (3) - D3D9 (C:\Program Files\Intel\Media SDK\libmfxhw32.dll)
Media SDK version       1.20
Memory type             System
Async depth             4

Input  format           I420

Encoder                 AVC

Input picture:
  Resolution            3840x1088
  PAR                   0:0
  Structure             Progressive
  Crop X,Y,W,H          0,0,3840,1080
  Frame rate            23.976
Output picture:
  Resolution            1920x1088
  PAR                   0:0
  Structure             Progressive
  Crop X,Y,W,H          0,0,1920,1080
  Frame rate            23.976
Bitrate control         CBR
  bitrate               3572
GOP structure:
  GOP length            24
  I-/P-frame distance   4
  IDR-frame interval    0
  GOP type              Opened
Num of slices           6
Target usage            4 (balanced)

Processing started
Frame number: 50
Processing finished in 3.00 seconds
(and adding the -avi option causes the process to fail with the mentioned I420 colorspace format error.)


So I believe that my FRIM (1.30) tools are not able to ingest my (seemingly) I420 4.2.0 lossless AVI streams, and probably due to my ffdshow/VFW/raw-video conduit setup.

I saw mention earlier in this thread of the ffdshow version being an issue for someone. Is there a preferred version/source (x64 and x32) of ffdshow? (or any of the tools that I'm using?)

Again, I may be missing something *really* basic and have no idea that I'm overlooking something - Are the above steps (toolchain, tests, workflow) rational for what I'm trying to do?

Of course I can provide samples and config screenshots if they would help!

Thanks again for all insights and advice!

cheers,

mindsong

Last edited by mindsong; 19th February 2020 at 23:00. Reason: typos, awkward wording fixes, code tags
mindsong is offline   Reply With Quote