Avidemux Forum

Avidemux => Unix-Like (Linux/Bsd/...) => Topic started by: bartimeo on October 30, 2020, 10:20:12 AM

Title: Jerky vision
Post by: bartimeo on October 30, 2020, 10:20:12 AM
Hello, I downloaded a video with VideoDowloadhelper in .MP4 format and with the player i see it with a small shot every 2 sec. If i open it with Avidemux, it tells me:"This video contains B-frames, but presentation time stamps (PTS) are either missing or monotonically increasing. Avidemux can try to reconstruct correct PTS by decoding the entire video. This may take a lot of time. Proceed?"
If i answer yes, he saves it and it shows in jerks. If i answer no, on Avidemux i see it correctly. I tried to save the file with .MKV or .TS but the shot remains. I enclose a part of the documentary to test with Avidemux
 
https://youtu.be/4gWU0Yj0J1c

Is there any trick to see it normally with a VLC-player?

Ubuntu 18.04 LTS
Avidemux 2.6.7
VLC 3.0.8
Browser Firefox 82.0 64 bit
VideoDownloadhelper 7.3.9
Title: Re: Jerky vision
Post by: eumagga0x2a on October 30, 2020, 11:46:58 AM
Is this short sample the original or the result of re-uploading a processed original source?

The sample video as seen on YouTube is jerky (probably wrong frame order at some intermediate state, then perpetuated by re-encoding, matches pretty well your description), now it is not correctable anymore as out-of-order frames are lost.

However, no PTS are missing in the sample video when downloaded using the right tool™.

Quote from: bartimeo on October 30, 2020, 10:20:12 AMAvidemux 2.6.7

I assume it was meant to be 2.7.6. Nevertheless, I would recommend using a more recent build (it is trivial to build Avidemux from source on Ubuntu). Quite a lot of bugs were fixed in the meantime.

sudo apt-get update
sudo apt-get install git libass-dev liba52-0.7.4-dev libmad0-dev libmp4v2-dev
cd ~
git clone https://github.com/mean00/avidemux2.git
cd avidemux2
git submodule update --init --recursive
bash createDebFromSourceUbuntu.bash --deps-only
bash bootStrap.bash --with-system-libass --with-system-liba52 --with-system-libmad --with-system-libmp4v2
bash run_avidemux_template.sh

(Never continue with a next command if the previous one fails!)

This would clone the source including translations, install build dependencies, then compile Avidemux and run it without installation.

Title: Re: Jerky vision
Post by: bartimeo on October 30, 2020, 06:31:14 PM
You are right. This short sample is the result of uploading a re-processed original source from Youtube. The original sample can be downloaded from

http://www.easybytez.com/2f0c3ljy7mma

and with this sample you will understand how on Avidemux Play it makes it look perfect if you open it without rebuilding the PTS correctly. If you rebuild the PTS, on the Avidemux Play it is seen with the jump every two seconds.

Ubuntu 18.04 LTS
Avidemux 2.7.6
VLC 3.0.8
Browser Firefox 82.0 64 bit
VideoDownloadhelper 7.3.9
Title: Re: Jerky vision
Post by: eumagga0x2a on October 30, 2020, 07:58:21 PM
The timing in the source video is so profoundly broken (not just the frame order is wrong, but frames are placed highly irregular), that reconstructed timing is bad as well. You can rescue this video by rejecting PTS reconstruction and re-encoding it with the "Resample" filter configured to "PAL (25)".

By the way, please use one of the recommended services to provide future samples, if necessary: WeTransfer (no email address needed!), Mega, Dropbox or Google Drive. Almost everything else is terrible in comparison.
Title: Re: Jerky vision
Post by: bartimeo on November 01, 2020, 04:35:29 PM
Sorry, where do I find  the re-encoding with "Resample" filter configured to "PAL (25)" in Avidemux ?
Title: Re: Jerky vision
Post by: eumagga0x2a on November 01, 2020, 08:53:04 PM
I'm sorry, I was not precise thus contributing to confusion.

Title: Re: Jerky vision
Post by: bartimeo on November 09, 2020, 04:30:52 PM
Thanks for the precise instructions that have solved the problem. Meanwhile, I have also followed this path which has given the same results

- Video Output → Mpeg4  AVC (x264)
- Configure → Output 1 → Pixel Aspect Ratio → Predefined Aspect Ratio → 64:45 (PAL 16;9)
- Save
Title: Re: Jerky vision
Post by: eumagga0x2a on November 09, 2020, 05:20:24 PM
Quote from: bartimeo on November 09, 2020, 04:30:52 PM- Video Output → Mpeg4  AVC (x264)
- Configure → Output 1 → Pixel Aspect Ratio → Predefined Aspect Ratio → 64:45 (PAL 16;9)

This is valid, of course, but please be aware that rather few video players respect pixel aspect ratio specified at the codec level (GStreamer-based players do this, but hardly any other) while almost all respect display aspect ratio specified at the container level, available in Avidemux for MP4 and MKV in the configuration of the respective muxers.