View Single Post
Old 21st November 2013, 00:48   #209  |  Link
HWK
Registered User
 
HWK's Avatar
 
Join Date: Feb 2009
Location: Toronto, Ontario, Canada
Posts: 1,059
Quote:
Originally Posted by jdobbs View Post
Has someone created a workaround for this? I decided I wanted to do some testing with FRIMEncode in the hope of eventually adding support to BD-RB, and this is all I ever get when I have an AVS as input (simple 2D source using DirectshowSource()) and AVISYNTH v2.5.8.

Am I doing something wrong?
I haven't come across one where workaround works, even with avisynth 2.6.0. However if pipe is used then encode works and as an added bonus no large files are created other than files extracted by tsmuxer and no dependency on ffdshow and avisynth.

If you are interested in my workflow, it consist of following setting and yes these are new ones. Which allowed full encode to complete.

1. Call tsmuxer to extract avc and mvc stream, or any supported stream.
2. Create batch file with parameter similar to one shown shown on next line, for this example it is mvc

Quote:
FRIMDecode mvc -i 00098.track_4113.264 -i 00098.track_4114.mvc -o \\.\pipe\test.yuv | FRIMEncode.exe mvc -i \\.\pipe\test_L.yuv -i \\.\pipe\test_R.yuv -viewoutput -o E:\Pacific_Rim_AVC.264 -o E:\Pacific_Rim_MVC.264 -w 1920 -h 1080 -f 23.976 -u 1 -cpbsize 3570 -l 6 -vbr 39081 60000 -profile high -level 4.1 -gop 24 4 0 S -maxdpb 4
3. Finally execute batch file and it will decode source files with frim decoder and feed it to frim encoder.

Although not required, but here all the parameters encoder and decoder will accept with encoder parameters first, follow by decoder.

Quote:
FRIM Encoder version 1.15 (build: Nov 12 2013)
- based on Intel(R) Media SDK (version: 4.0.760.60435)

Usage:

FRIMEncode mpeg2|h264|mvc|jpeg [options]
-i InputFile -o OutputBS

options:

-avi - input file is in AVI format,
if not specified then YUV is expected
-sbs|tab numViews - input file is in side-by-side or top-above-below
format, valid only for multiview
-w width - source picture width (one view), mandatory for YUV
-h height - source picture height (one view), mandatory for YUV
-f frameRate - video frame rate (frames per second)

-cbr|b bitRate - CBR mode (in Kbits/s)
-vbr bitRate maxRate - VBR mode (in Kbits/s)
-cqp QPI QPP QPB - CQP mode
QPx quantization parameters for I,P,B frames
QPx in range [0,51]
-labrc bitRate depth - LA BRC mode (in Kbits/s) for H.264 encoder
look ahead depth, in range [10,100] or 0(=auto),
number of frames to be analyzed before encoding
Supported only with -hw option on 4th Generation
on Intel Core processors
bit rate is valid for H.264, MPEG2 and MVC
-cpbsize size - cpb/vbv buffer size (in KB)
max 3750 for H.264 Blu-ray
max 1194 for MPEG2 Blu-ray

-tff|bff - input stream is interlaced, top|bottom field first,
if not specified then progressive is expected
-nv12 - input is in NV12 color format,
if not specified then YUV420 is expected
-u 1..7 - target usage: between 1(=quality) and 7(=speed),
default is 4(=balanced),
valid for H.264, MPEG2 and MVC
-q quality - quality parameter for JPEG,
in range [1,100], 100 is the best quality
-l numSlices - number of slices, default value 0

-profile profile - codec profile name
MPEG2: simple, main, high
H.264: baseline, main, high
-level level - codec level
MPEG2: low/LL, main/ML, high1440/H14, high/HL,
H.264: 1, 1b, 1.1, 1.2, 1.3,
2, 2.1, 2.2, 3, 3.1, 3.2,
4, 4.1, 4.2, 5, 5.1, 5.2
MVC: 4, 4.1, 4.2, 5, 5.1, 5.2

-gop gopLength gopDist idrInterval O|C|S
- GOP structure control
GOP length
(0=unspecified, 1=I-frame only, ...)
GOP distance between I- or P-frames
(0=unspecified, 1=no B-frames, ...)
IDR interval:
H.264: between I- and IDR-frames
(0=every I-frame is an IDR frame, ...)
MPEG2: sequence header interval
(0=once at beginning, 1=every I-frame, ...)
Opened, Closed, Strict ... GOP structure

-maxdpb numFrames - maximum number of frames buffered in a DPB
(Decoded Picture Buffer), default value 0(=unspecified)
-CAVLC|CABAC - use CAVLC or CABAC for encoding, default is CABAC
(for H.264 only)
-VuiNalHrd on|off - insert NAL HRD parameters into bitstream,
default value on (for H.264 only)
-VuiVclHrd on|off - insert VCL HRD parameters into bitstream,
default value on (for H.264 only)
-PicTimingSEI on|off - insert picture timing SEI with pic_struct syntax
element into bitstream,
default value on (for H.264 only)
-EndOfSequence on|off - insert End of Sequence NAL into bitstream,
default value on (for H.264 only)
-EndOfStream on|off - insert End of Stream NAL into bitstream,
default value off (for H.264 only)

-dstw width - destination picture width, invokes VPP resizing
-dsth height - destination picture height, invokes VPP resizing
-hw - use platform specific SDK implementation,
if not specified then software implementation is used
-d3d - work with d3d9 surfaces
-d3d11 - work with d3d11 surfaces

-viewoutput - instruct the MVC encoder to output each view
in separate bitstream buffer.
Depending on the number of '-o' options behaves as follows:

1: two views are encoded in single file
2: two views are encoded in separate files
3: behaves like two '-o' were used and then one '-o'
Example: FRIMEncode mvc
-i InputFile_L -i InputFile_R
-o OutputEncodedBase -o OutputEncodedDependent
-viewoutput -w width -h height
Quote:
FRIM Decoder version 1.15 (build: Nov 12 2013)
- based on Intel(R) Media SDK (version: 4.0.760.60435)

Usage:

FRIMDecode mpeg2|h264|mvc|vc1|jpeg [options]
-i InputBS [-i InputBS_dependent]
-o OutputYUVFile [-o OutputYUVFile_R]

options:

-sbs|tab - output file is in side-by-side or top-above-below format,
valid only for multiview
-hw - use platform specific SDK implementation,
if not specified software implementation is used
-low_latency - configures decoder for low latency mode
(only for H.264 and JPEG)
-calc_latency - calculates latency during decoding and prints log
(only for H.264 and JPEG)
-jpeg_rotate n - rotate jpeg frame n degrees (n=90,180,270)
(only for JPEG)
-nv12 - output is in NV12 color format,
if not specified then YUV420 is used
-d3d - work with d3d9 surfaces
-d3d11 - work with d3d11 surfaces
-r - render decoded data in a separate window
-wall w h n m f t tmo - same as -r, and positioned rendering window
in a particular cell on specific monitor
w ... number of columns of video windows on selected monitor
h ... number of rows of video windows on selected monitor
n(0,.,w*h-1) ... order of video window in table that will be rendered
m(0,1..) ... monitor id
f ... rendering framerate
t(0/1) ... enable/disable window's title
tmo ... timeout for -wall option, in seconds

Press 1 to toggle fullscreen rendering on/off
Hopefully this will help.
__________________
If you fail to plan; you plan to fail, would you not agree? Think about it.

Last edited by HWK; 21st November 2013 at 00:57.
HWK is offline   Reply With Quote