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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > New and alternative a/v containers

Reply
 
Thread Tools Search this Thread Display Modes
Old 23rd July 2018, 18:38   #22981  |  Link
hobbs1
Registered User
 
Join Date: Jan 2007
Posts: 4
Hey Nev, getting an insecure connection warning from your site.

Quote:
files.1f0.de uses an invalid security certificate.

The certificate expired on Monday, July 23, 2018 7:08 AM. The current time is Monday, July 23, 2018 10:35 AM.

Error code: SEC_ERROR_EXPIRED_CERTIFICATE
hobbs1 is offline   Reply With Quote
Old 23rd July 2018, 22:38   #22982  |  Link
VictorLS
Registered User
 
Join Date: Mar 2009
Posts: 146
https://ffmpeg.zeranoe.com/builds/ ffplay.exe x64 from ffmpeg-4.0.1-win64-static.zip plays Zee TV20180716-203544.ts (24MB) https://yadi.sk/i/dXUEPpVE3ZEkRJ - from previous page https://forum.doom9.org/showthread.p...6191&page=1149 plays (without sound) that ts well using ffplay.exe -vf weave,yadif=1 "Zee TV20180716-203544.ts" string was given me by clever Russian guy so I hope it'll be not very hard to implement right decoding of such files in LAV Filters.

Last edited by VictorLS; 23rd July 2018 at 22:57.
VictorLS is offline   Reply With Quote
Old 24th July 2018, 08:43   #22983  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,676
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.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is online now   Reply With Quote
Old 24th July 2018, 10:13   #22984  |  Link
VictorLS
Registered User
 
Join Date: Mar 2009
Posts: 146
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.
VictorLS is offline   Reply With Quote
Old 24th July 2018, 22:09   #22985  |  Link
sirhaden
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.
sirhaden is offline   Reply With Quote
Old 24th July 2018, 23:15   #22986  |  Link
mkver
Registered User
 
Join Date: May 2016
Posts: 138
Actually, H.264 in Matroska mustn't be annex B; it must use the same length-prefixed mode that mp4 uses as well.
mkver is offline   Reply With Quote
Old 24th July 2018, 23:18   #22987  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 9,447
Quote:
Originally Posted by sirhaden View Post
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.
There is no global state in decoding that i'm aware of that would ever cause one instance to influence another one. Are you sure those errors don't happen when decoding single files, which might indicate something is wrong with how the files are being send to the decoder?
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is offline   Reply With Quote
Old 24th July 2018, 23:18   #22988  |  Link
sirhaden
Registered User
 
Join Date: Oct 2012
Posts: 8
Quote:
Originally Posted by mkver View Post
Actually, H.264 in Matroska mustn't be annex B; it must use the same length-prefixed mode that mp4 uses as well.
Both work in the MKV container.
sirhaden is offline   Reply With Quote
Old 25th July 2018, 12:12   #22989  |  Link
sirhaden
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).
sirhaden is offline   Reply With Quote
Old 25th July 2018, 12:34   #22990  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 9,447
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
nevcairiel is offline   Reply With Quote
Old 25th July 2018, 13:36   #22991  |  Link
sirhaden
Registered User
 
Join Date: Oct 2012
Posts: 8
Quote:
Originally Posted by nevcairiel View Post
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.
The MP4 video frames are all length prefixed.

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.
sirhaden is offline   Reply With Quote
Old 25th July 2018, 17:32   #22992  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 9,447
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
nevcairiel is offline   Reply With Quote
Old 25th July 2018, 18:00   #22993  |  Link
sirhaden
Registered User
 
Join Date: Oct 2012
Posts: 8
Quote:
Originally Posted by nevcairiel View Post
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.
I am my own source and splitter filters.

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.
sirhaden is offline   Reply With Quote
Old 26th July 2018, 07:56   #22994  |  Link
ca
Registered User
 
Join Date: Oct 2017
Posts: 2
Quote:
Originally Posted by RealSnoopyDog View Post
I tested two nightlies: 0.69.0-43 and 0.69.0-73. Everything seems to work fine except that i can not playback Blu-Rays anymore using the DLLs libaacs.dll and libbdplus.dll. When media playback should start it says "Can not render Video/Output pin, error: 0x80004005 unknown error".

With the last official LAV release 0.69 this still works.
Aacs still doesn't seem to be working a year later. Can anyone else confirm this?
ca is offline   Reply With Quote
Old 26th July 2018, 14:09   #22995  |  Link
clsid
Registered User
 
Join Date: Feb 2005
Posts: 4,838
ProcessMonitor might reveal if it still tries to load those DLLs.
clsid is offline   Reply With Quote
Old 26th July 2018, 18:08   #22996  |  Link
sirhaden
Registered User
 
Join Date: Oct 2012
Posts: 8
LAVVideo Multi-Instance Issue

Resolved the issue related to a different DirectShow filter, not the LAV filters.
sirhaden is offline   Reply With Quote
Old 27th July 2018, 21:42   #22997  |  Link
DTL
Registered User
 
Join Date: Jul 2018
Posts: 2
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.
Attached Images
  

Last edited by DTL; 27th July 2018 at 21:49.
DTL is offline   Reply With Quote
Old 27th July 2018, 22:25   #22998  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 9,447
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
nevcairiel is offline   Reply With Quote
Old 27th July 2018, 22:52   #22999  |  Link
DTL
Registered User
 
Join Date: Jul 2018
Posts: 2
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.
DTL is offline   Reply With Quote
Old 27th July 2018, 23:42   #23000  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 9,447
Quote:
Originally Posted by DTL View Post
But ffmpeg Do properly decode sequence of pictures that handle interlaced h.265 field-based video
No, it does not. If it did, there would be no discussion because it would just work. It decodes it like a progressive half-height video. It decodes any other interlaced format as weaved fields into one frame and exports metadata about interlaced status and field order, which is required for both software and hardware deinterlacing. It does not do that for HEVC. Hence, it is not supported. There will be no manual hackery for HEVC interlaced, or trying to get separate fields to work. Either it adopts standard decoding, or it won't be supported.

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.
nevcairiel is offline   Reply With Quote
Reply

Tags
decoders, directshow, filters, splitter

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:22.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.