AV1 decoder not working on v.2.7.6 ?

Started by fullhdfan, July 19, 2020, 11:52:24 PM

Previous topic - Next topic

fullhdfan

I've just noticed that my appimage version got the vdpau filters. Maybe because you said to me to install the nvidia drivers( the default was the open source xserver nouveau). Tried "the keep frames" and "double framerate" option and the images with a lot of motion are still " flickering"(not smooth) . Is there an option to set the field order manually at double framerate or does the filter recognize them automatically or maybe it dosnt matter ? I tried all other filters and none of them converted the motion smoothly as in the original video(they did it more or less, but still noticeable). This matter plagues me for ages  :-\ . I want to convert some videos from my old camera that are interlaced in order to save some disk space, but don't want to distroy their quality.

eumagga0x2a

Regarding running self-built Avidemux: please copy and paste the complete uncut textual content of the Terminal from executing the wrapper script.

QuoteAlso changed the location of the template file to avidemux usr directory

Why that?? It should be placed into a directory listed by

echo $PATH

else you have to type the path to the file, not just its name to run it.

Regarding VDPAU deinterlacer filter: it assumes that the top field comes first, unusable with videos where the field order is the other way round. The VA-API deinterlacer (for Intel graphics on Linux) should support also bottom field first type of input. If no Intel hardware is available, Yadif remains the last but very good option.

fullhdfan

I cannot post the results directly, the forum sofware doesn't allow me to do that, it says it contains contacts or already posted, but there is the attachment.

eumagga0x2a

Thanks, would you please attach the modified wrapper script as well as the header file ~/Desktop/avidemux_2.7.6/install/include/avidemux/2.7/ADM_coreConfig.h ?

fullhdfan

I changed the name of the admplugins directory in the .h file (i don't know the reason anymore).
Also tested the hardware vdpau deinterlace filter - definetly better than any software counterpart(the best one -yadif- i tested them all), but still a small flickering on images with high speed motion.

eumagga0x2a

Quote from: fullhdfan on July 21, 2020, 11:35:45 PM
I changed the name of the admplugins directory in the .h file (i don't know the reason anymore).

The script uses the values of ADM_RELATIVE_LIB_DIR and ADM_PLUGIN_DIR defines to construct the library search path, so your changes preclude it from working. With your changes, it sets the environment for avidemux3_qt5 to look for Avidemux libraries in ${HOME}/Desktop/avidemux_2.7.6/install/usr/usr/lib and plugins in ${HOME}/Desktop/avidemux_2.7.6/install/usr/usr/lib/avidemux_plugins which is obviously wrong.

Probably not of big importance, but ADM_coreConfig.h tells us that the build of NVENC-based HW video encoders was disabled, likely because of nv-codec-headers missing.

fullhdfan

#21
The relative lib and install directory values in the admcoreconfig.h file were default values. I changed them after your last posting, made
Install as /install/usr and realtive lib as/ lib. The application was launched but cannot open videos and there are no encoders(see the attached terminal output)
Anyway , i will give it up. Just give me a last advice and if it doesn't work I'll stick to the appimage version. My goal was to find extra features to make the conversion and deinterlacing faster and better(my pc is old and i don't expect miracles(but when a 1h fullhd interlaced h264 home video takes 14h to be converted to an h.265 progressive is still an isue doesn't it ?). Can i see somewhere if the hardware decoding is used during the conversion ?
For future release:  could you add the change frame order option to the vdpau deinterlace filter ?
Use dav1d decoder for av1. It's faster.

eumagga0x2a

Quote from: fullhdfan on July 22, 2020, 10:44:43 AM
I changed them after your last posting, made Install as /install/usr

This is wrong. The default prefix is /usr, so it should be (and it was correct earlier)

#define ADM_INSTALL_DIR "/usr"

Quoteand realtive lib as/ lib.

I assume there is a mistake in the quote, the correct value should be

#define ADM_RELATIVE_LIB_DIR "lib"

(and don't change ADM_PLUGIN_DIR, it should remain

#define ADM_PLUGIN_DIR "ADM_plugins6"

...)

QuoteThe application was launched but cannot open videos and there are no encoders(see the attached terminal output)

Thanks,

Quote [ADM_initBaseDir] 10:27:46-959  Relative to install plugin mode : </home/deian/Desktop/avidemux_2.7.6/install/usr/bin/../lib/ADM_plugins6>

which means the path supplied to the canonicalize_file_name function was wrong, so it failed, the pointer "simple2" was NULL, and we don't append the trailing directory separator on failure, making the failure fatal :-D

Plugins could not be found due to directory separator missing after ADM_plugins6 following canonicalize_file_name() rejecting the path passed to it.

QuoteAnyway , i will give it up. Just give me a last advice and if it doesn't work I'll stick to the appimage version.

I would recommend to start afresh with git master (I assume git is already installed, else

sudo apt-get update
sudo apt-get install git


should not pose a problem)

cd ~
git clone https://github.com/mean00/avidemux2.git
cd avidemux2
git submodule update --init --recursive
bash bootStrap.bash
bash run_avidemux_template.sh


QuoteCan i see somewhere if the hardware decoding is used during the conversion ?

In the main window below the "Video Decoder" header, the left label indicates the decoder in use, the right one the renderer. On a VDPAU platform, it shows "VDPAU" when the HW accel decoder is used.

QuoteFor future release:  could you add the change frame order option to the vdpau deinterlace filter ?

You mean support for bottom-field-first input? I have not a single sample of this kind, so no development is possible unless you provide a sample. I also don't know whether VDPAU supports this (VDPAU has been deprecated by NVIDIA, so it probably makes more sense to explore its successors).

QuoteUse dav1d decoder for av1. It's faster.

It has ripened now, but libaom was a more reliable solution back then. We will need libaom also when an AV1 encoder ever arrives in Avidemux.

eumagga0x2a

I've altered the behaviour of canonize() to always add directory separator, won't harm.

fullhdfan

I followed your last advice and it worked (git).
This should have been done from the start.
My first package was a fosshub download(link from your website).
The software was installed with no problems. It took ages to build. The terminal froze sometimes and I thought the process is over, but when I looked at the task manager the CPU was fully loaded . This was maybe the reason why my first build didn't succeed. Perhaps i thought the build is over because apparently there was no activity in the terminal and closed it too early.

You can download a small interlaced sample here . It is bottom field first (mediainfo app info) and very smooth motion - tested on my TV.

https://drive.google.com/file/d/12E8AiilNvTZ6NHCOA9d4M5PiAS49eCsg/view?usp=drivesdk

The link will be active temporarily.

Many thanks and looking forward to new codecs  ;D .

eumagga0x2a

Thank you very much for the sample. It allowed me to verify for the first time that the VA-API deinterlacer works fine with BFF input. Will look into our options for the VDPAU deinterlacer a bit later, I need to move to a different PC for that purpose, not possible ATM.

QuoteThe terminal froze sometimes and I thought the process is over, but when I looked at the task manager the CPU was fully loaded .

The output from make is redirected to a file in /tmp (e.g. /tmp/logbuildCore), it looks as if "nothing happens" while the build is normally progressing.

eumagga0x2a

Suport for BFF input in the VDPAU deinterlacer plugin has been added, please do

cd ~/avidemux2
git pull --recurse
bash bootStrap.bash --rebuild


and try whether it works for you (it works for me with your sample and usual TFF videos).

The option to "keep bottom field" (actually to drop all output deinterlaced pictures with odd number) doesn't seem to produce pleasant results with any of samples I tried, maybe it is better to remove it. The optimal result is mostly achieved when choosing "keep both", but I have a sample where the actual footage is shot in BFF mode, but the ticker on top of it is in TFF mode! This leaves "keep top field" the only viable option in this special case.

fullhdfan

I've tested the vdpau deinterlace filter in TFF and BFF modes and both work flawlessly. I have also thought so far the software deinterlace filters were bad. An idea crossed my mind : let's test the converted samples on my TV : vdpau, yadif and dgbob (all double framerate). The result : amazing ! Perfectly smooth motion !

I figured out why the motion is not smooth on my PC - it's too slow/old.  50 frames/s - double framerate - is just  too much, no matter whether linux or windows, hardware or software decoding(the software one beeing even faster than the hardware one at this framerate) .

Does the resample fps filter do something special ? I've used it always with my test samples above, because i had problems in the past - the android/pc players and even my TV didn't play the converted (dvd->h.264 interlaced) videos smoothly without it.

eumagga0x2a

#28
Quote from: fullhdfan on July 27, 2020, 09:54:59 PM
I've tested the vdpau deinterlace filter in TFF and BFF modes and both work flawlessly.

Great, thanks. It is always possible with HW acceleration stuff that a fix is based on assumptions which hold in one environment but not in another, so such feedback is very valuable.

QuoteI have also thought so far the software deinterlace filters were bad.

They are, actually.

QuoteAn idea crossed my mind : let's test the converted samples on my TV : vdpau, yadif and dgbob (all double framerate). The result : amazing ! Perfectly smooth motion !

The smoothness is given from bobbing (from doubling the frame rate). It is the overall quality – how well the reconstruction of missing lines works – which matters.

QuoteDoes the resample fps filter do something special ? I've used it always with my test samples above, because i had problems in the past - the android/pc players and even my TV didn't play the converted (dvd->h.264 interlaced) videos smoothly without it.

During the 2.7.4 – 2.7.6 release cycle, some issues in Avidemux were identified and fixed which resulted in perfectly regular input turning into pseudo-variable (oscillating) frame rate output. In particular, Avidemux tried to use time base (the num/den fraction used to describe timestamps in a video) and frame rate interchangeably, often arriving at wrong time base for many streams. The "Resample" filter helped to counteract these issues. It is still helpful in many cases when the input itself is irregular (the denominator grows huge, the numerator is small and thus the timestamps expressed in multiple of time base are high), but when the input is either perfectly regular (also regular with some frames missing) or the irregularity was caused by an older version of Avidemux, which we are sometimes able to recognize and to correct, it should not be necessary.

Please note that videos produced by most if not all Android smartphones have variable frame rate with time base denominator set to 90 kHz. So VFR should not be a problem on Android as such, but some devices have a fixed max frame rate and issues in time base calculation during codec configuration can result in a stream being rejected if the fps exceeds the limit, see topic x264 incompatible with LG BluRay player.