Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
24th July 2018, 08:43 | #22941 | Link |
German doom9/Gleitz SuMo
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,781
|
Implementing a weave is not too hard, I believe. But implementing the logic to detect incorrectly interlaced HEVC may be. And you won't want to manually enable forced weaving for every video separately.
|
24th July 2018, 10:13 | #22942 | Link |
Registered User
Join Date: Mar 2009
Location: Russian Crimea
Posts: 335
|
LigH
Usually I like automation (as I wanted to force switch off high quality deinterlacing on some "bad interlaced streams" for hardware decoder in nVIDIA's videocards - but it wasn't implemented even in manual mode immediately by nevcairiel so I switch it off forever after implemented by Aleksoid1978, some time later I think after many asks by another users of LAV Filters nevcairiel implemented too but not automatic) if it works correctly but if it's too hard to implement or it can works incorrectly I'd like have just manual control i.e. Force weave as I mentioned at first post on previous page. Last edited by VictorLS; 24th July 2018 at 13:36. |
24th July 2018, 22:09 | #22943 | Link |
Registered User
Join Date: Oct 2012
Posts: 8
|
LAVVideo Multi-Instance Issue
I'm using multiple instances of the DirectShow LAVVideo decoder to decode several streams simultaneously. The video is H.264 and is in MKV, MP4 and a proprietary container format files. The H.264 in the MKV and proprietary container are both Annex-B prefixed and the decoders run simultaneously without issue. No frame drops or decoder errors. The H.264 is the MP4 files is not Annex-B, the only known difference, and decoding with multiple instances causes the decoders to throw many NAL parsing errors. The result is that frames are dropped randomly from these simultaneous decoder instances.
|
24th July 2018, 23:18 | #22945 | Link | |
Registered Developer
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,346
|
Quote:
__________________
LAV Filters - open source ffmpeg based media splitter and decoders |
|
25th July 2018, 12:12 | #22947 | Link |
Registered User
Join Date: Oct 2012
Posts: 8
|
LAVVideo Multi-Instance Issue
The decoder error messages are such:
[h264 @ 03d4dec0] Invalid NAL unit size (24584278 > 2879). [h264 @ 03d4dec0] Error splitting the input into NAL units. [h264 @ 2146bf80] Invalid NAL unit size (28985 > 28748). [h264 @ 2146bf80] Error splitting the input into NAL units. [h264 @ 03d4dec0] Invalid NAL unit size (598628684 > 3370). [h264 @ 03d4dec0] Error splitting the input into NAL units. [h264 @ 2146bf80] Invalid NAL unit size (22491 > 21484). [h264 @ 2146bf80] Error splitting the input into NAL units. [h264 @ 2146bf80] Invalid NAL unit size (-1019633513 > 94). [h264 @ 2146bf80] Error splitting the input into NAL units. [h264 @ 03d4dec0] Invalid NAL unit size (-545420300 > 3047). [h264 @ 03d4dec0] Error splitting the input into NAL units. [h264 @ 03d4dec0] Invalid NAL unit size (-1424184330 > 22). [h264 @ 03d4dec0] Error splitting the input into NAL units. [h264 @ 03d4dec0] Invalid NAL unit size (24977 > 20414). [h264 @ 03d4dec0] Error splitting the input into NAL units. [h264 @ 2146bf80] Invalid NAL unit size (1875228973 > 4829). [h264 @ 2146bf80] Error splitting the input into NAL units. [h264 @ 2146bf80] Invalid NAL unit size (22326 > 21586). |
25th July 2018, 12:34 | #22948 | Link |
Registered Developer
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,346
|
Those errors usually happen if you try to pass off AnnexB as MP4-style H.264, or the media type indicates a wrong size of the length field.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders |
25th July 2018, 13:36 | #22949 | Link | |
Registered User
Join Date: Oct 2012
Posts: 8
|
Quote:
The length prefixed IDR video frames do have length prefixed Access Unit Delimiters, SPS and PPS NALUs preceding them. The non-IDR video frames contain only a length prefixed Access Unit Delimiter following by the length prefixed video frame. |
|
25th July 2018, 17:32 | #22950 | Link |
Registered Developer
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,346
|
If you're certain the video is fine, then you may still be delivering it to the decoder wrong. I assume you use your own source filter, and not LAV Splitter?
My guess would be that the media type doesn't match the video contents.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders |
25th July 2018, 18:00 | #22951 | Link | |
Registered User
Join Date: Oct 2012
Posts: 8
|
Quote:
I made changes to the MP4 parsing to remove all NALUs from non IDR video frames and updated the output media sample size. For IDR frames, changes were made to only send the PPS NALU followed by the IDR NALU with an updated output media sample size. The output media sample type is: MEDIASUBTYPE_AVC1 FORMAT_MPEG2Video with: pVIH2->bmiHeader.biCompression = MKTAG('a', 'v', 'c', '1'); Which is the same as when delivered from the proprietary format container. Unfortunately, the issue is still occurring. Last edited by sirhaden; 25th July 2018 at 18:04. |
|
26th July 2018, 07:56 | #22952 | Link | |
Registered User
Join Date: Oct 2017
Posts: 2
|
Quote:
|
|
27th July 2018, 21:42 | #22955 | Link |
Registered User
Join Date: Jul 2018
Posts: 1,063
|
about interlaced h.264 decoding
Addition posts of VictorLS:
If feeding LAV Splitter with interlace HEVC stream we see HEVC VUI-> field_seq_flag = 1 and frame_field_info_present_flag = 1, but VIDEOINFOHEADER2 -> dwInterlaceFlags = 0x00000000 that confuses renderer. Also at the output of LAV decoder also VIDEOINFOHEADER2 -> dwInterlaceFlags = 0x00000000 that indicates progressive frames. I think if LAV splitter-decoder operates with such HEVC bitstream it must set dwInterlaceFlags |= AMINTERLACE_IsInterlaced | AMINTERLACE_1FieldPerSample in the VIDEOINFOHEADER2 of output decoded samples and feed it to the renderer. Also for each sample the LAV Decoder must pass through field placement data and set dwTypeSpecificFlags member of AM_SAMPLE2_PROPERTIES: if pic_struct member of picture timing SEI = 1, then dwTypeSpecificFlags |= AM_VIDEO_FLAG_FIELD1; if if pic_struct member of picture timing SEI = 2, then dwTypeSpecificFlags |= AM_VIDEO_FLAG_FIELD2. May this helps. Some info about streaming interlaced content using h.265 as sequence of fields: http://www.ramugedia.com/interlace-support-in-hevc "But implementing the logic to detect incorrectly interlaced HEVC may be. " The input h.265 bitstream to LAV Filters do properly marked as field-based in the VUI. So to detect this the LAV Filters must process VUI data in the input h.265 bitstream and use it in the internal processing or pass this data to renderer for correct visualization on progressive electro-optical devices. To show VUI data in graphstudio the source .ts was remuxed to .mp4 using ffdshow. Last edited by DTL; 27th July 2018 at 21:49. |
27th July 2018, 22:25 | #22956 | Link |
Registered Developer
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,346
|
There will be no support for interlaced HEVC unless FFmpeg properly supports decoding them like any other interlaced format. I recommend inquiring there.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders |
27th July 2018, 22:52 | #22957 | Link |
Registered User
Join Date: Jul 2018
Posts: 1,063
|
But ffmpeg Do properly decode sequence of pictures that handle interlaced h.265 field-based video. Generally users do not ask ffdshow and LAV to output weaved frames or perform deinterlace for such h.265 streams. But LAV must parse h.265 stream VUI data and mark output DirectShow stream samples properly at least.
Now it marks them as non-interlaced so all further renderers fails to display it properly. Also field-based stream is completely valid DirectShow stream marked with flags AMINTERLACE_IsInterlaced | AMINTERLACE_1FieldPerSample in the VIDEOINFOHEADER2. As well as more common interlaced-frames stream. So I hope if LAV splitter-decoder will correctly pass-through the metadata to the next to decoder renderer it may do all required work for displaying it correctly. Ofcourse if LAV-software is too high-level wrapper around ffmpeg that it can not go low-level into VUI of h.265 data processed so it really no way to do it. Sadly in this case. |
27th July 2018, 23:42 | #22958 | Link | |
Registered Developer
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,346
|
Quote:
PS: Just because something is theoretically valid in DirectShow, it does not mean that it would actually be supported by whatever renderer one cares about.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders Last edited by nevcairiel; 28th July 2018 at 00:06. |
|
28th July 2018, 14:14 | #22959 | Link |
Registered User
Join Date: Aug 2016
Posts: 1,348
|
Hi, @nevcairiel - i'm using some Playstation Platinum wireless headphones for late night viewing but finding i'm having to turn off bitstreaming to get sound, shouldn't these be working now RE changelog: LAV Audio will fallback to audio decoding if bitstreaming is not supported by the audio renderer/hardware
|
28th July 2018, 15:01 | #22960 | Link |
Registered Developer
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,346
|
That depends if the driver actually refuses bitstreaming. Maybe it doesn't.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders |
Tags |
decoders, directshow, filters, splitter |
Thread Tools | Search this Thread |
Display Modes | |
|
|