[WORKAROUND] Avidemux-qt5 recognizes 23.976 ftp movies as 24.39 fps

Started by CameronPoe, April 25, 2017, 02:24:55 PM

Previous topic - Next topic

CameronPoe

Any mkv x264 23.976 movie opened in newest Avidemux recognizes and decodes them as 24.39 fps. I tried to use ResampleFPS video filter to change fps to proper 23.976, but audio is out of sync then :( I managed to decode audio to aac using ffmpeg and it decodes audio properly at 23.976 fps.

Can anyone fix this bug in Avidemux or make an audio filter as well to resample from 24.39 fps to 23.976 on the fly?

eumagga0x2a

Actually there were some commits fixing wrong fps detection in MKV. Please redirect the console output of avidemux3_qt5 to a file, load a video with fps value not calculated correctly and attach the log to your next reply.


eumagga0x2a

Your Avidemux version is too old, please retest with the current one (a nightly).

CameronPoe

My version is 2.6.19 and it says it is currently the newest. If there is newer version where can I download it from?

eumagga0x2a

Quote from: CameronPoe on April 25, 2017, 03:55:09 PM
If there is newer version where can I download it from?

On Linux, you can easily build Avidemux yourself from git source. On 64bit Linux, you can also use an appImage from http://avidemux.org/nightly/ ("support" is what will become hopefully already today or tomorrow v2.6.20, the other one is the current git master).

CameronPoe

Thanks :)

I have downloaded source_r9046.tar.gz from http://www.avidemux.org/nightly/snapshot/
but I have no idea how to run it or compile it :(

Fortunately I did manage to run AppRun from avidemuxUniversal_amd64_170425_108.app (it says 2.7.0 version)
and it seems to be fixed :)

I will try to decode something and let you know after few hours how it went ;)


CameronPoe

Unfortunately it is still buggy :( I tried a different movie and it shows 24.39 fps this time :(

=====================================================
Video
=====================================================
Codec 4CC:      AVC1
Image Size:      1920 x 1080
Aspect Ratio:      1:1 (1:1)
Frame Rate:      24,390 fps
Total Duration:      01:45:30.541

=====================================================
Extra Video Properties
=====================================================
ExtraDataSize:      41
Extra data:      01 64 00 29 FF E1 00 19 67 64

=====================================================
DÃ...ºwiÃ,,â,,¢k
=====================================================
Codec:         AC3
Channels:      6
Bitrate:      56000 Bps / 448 kbps
Frequency:      48000 Hz
Total Duration:      01:45:30.496

CameronPoe

The previous movie was properly shown with 23.976 fps:


=====================================================
Video
=====================================================
Codec 4CC:      AVC1
Image Size:      1920 x 1080
Aspect Ratio:      1:1 (1:1)
Frame Rate:      23,976 fps
Total Duration:      01:37:16.002

=====================================================
Extra Video Properties
=====================================================
ExtraDataSize:      40
Extra data:      01 64 00 29 FF E1 00 18 67 64

=====================================================
DÃ...ºwiÃ,,â,,¢k
=====================================================
Codec:         DTS
Channels:      Stereo
Bitrate:      192000 Bps / 1536 kbps
Frequency:      48000 Hz
Total Duration:      01:37:15.898




The difference between those two movie files I noticed is that the one with good fps in avidemux shows actually 23.976025 fps in SMPlayer (Linux video player) and the other video that shows bad 24.390 fps in SMPlayer shows actually 23.975986 fps.
I have no idea if that makes this problem.

CameronPoe

There is new log2 with bad fps in new Avidemux 2.7.0

eumagga0x2a

I'm just extracting the relevant part of the log:

[ComputeDeltaAndCheckBFrames] 17:29:59-998  PTS is not monotonous, there are bframe
[getStdFrameRate] 17:30:00-000  Best match is 0
[ComputeDeltaAndCheckBFrames] 17:30:00-000  Checking deviation for native 1000 23976
[checkDeviation] 17:30:00-000  Num=1000 Den=23976 half=20853 zero=0 first=0
[checkDeviation] 17:30:00-003  Den=23976 Num=1000 Good = 80132, bad=71643
[ComputeDeltaAndCheckBFrames] 17:30:00-003  Checking deviation for minDelata 41000 1000000
[checkDeviation] 17:30:00-003  Num=41000 Den=1000000 half=20499 zero=0 first=0
[checkDeviation] 17:30:00-007  Den=1000000 Num=41000 Good = 85134, bad=66641
[ComputeDeltaAndCheckBFrames] 17:30:00-007  Deviation        = 71643
[ComputeDeltaAndCheckBFrames] 17:30:00-007  DeviationMinDelta = 66641
[ComputeDeltaAndCheckBFrames] 17:30:00-007  Min delta is better
[ComputeDeltaAndCheckBFrames] 17:30:00-007  Checking deviation for stdFrameRate=1001:24000
[checkDeviation] 17:30:00-007  Num=1001 Den=24000 half=20853 zero=0 first=0
[checkDeviation] 17:30:00-010  Den=24000 Num=1001 Good = 30309, bad=121466
[ComputeDeltaAndCheckBFrames] 17:30:00-010  Deviation for stdFrameRate(0) =121466
[ComputeDeltaAndCheckBFrames] 17:30:00-010  Old default duration    41708 us
[ComputeDeltaAndCheckBFrames] 17:30:00-010  New framerate values : 41000:1000000
[ComputeDeltaAndCheckBFrames] 17:30:00-010  New default duration    41000 us
[ComputeDeltaAndCheckBFrames] 17:30:00-010  First frame pts     0 us
[ComputeDeltaAndCheckBFrames] 17:30:00-010  Not enough valid DTS
[open] 17:30:00-013  Have to delay by 208000 us so that PTS>DTS
[MKV] Video Track duration for 6330500 ms

CameronPoe

I was right ;D

Problem still exist on new Avidemux 2.7.0 but only for movies that come with exactly 23.975986 fps.
I found a workaround to this problem - when you open any 23.975986 fps movie in MKVToolNix
and change fps to 24000/1001 for the video stream and save it - the output will have 23.976025 fps,
so you can load it to Avidemux 2.7.0 (nightly edition) and it will recognize it and decode it properly as 23.976 :)