The following warnings occurred:
Warning [2] Undefined array key 1 - Line: 313 - File: inc/plugins/google_seo/redirect.php PHP 8.3.12-nmm1 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/google_seo/redirect.php 313 errorHandler->error_callback
/inc/class_plugins.php 142 google_seo_redirect_hook
/global.php 100 pluginSystem->run_hooks
/showthread.php 28 require_once
Warning [2] Undefined array key 1 - Line: 314 - File: inc/plugins/google_seo/redirect.php PHP 8.3.12-nmm1 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/google_seo/redirect.php 314 errorHandler->error_callback
/inc/class_plugins.php 142 google_seo_redirect_hook
/global.php 100 pluginSystem->run_hooks
/showthread.php 28 require_once
Warning [2] Undefined array key "" - Line: 327 - File: inc/plugins/google_seo/redirect.php PHP 8.3.12-nmm1 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/google_seo/redirect.php 327 errorHandler->error_callback
/inc/class_plugins.php 142 google_seo_redirect_hook
/global.php 100 pluginSystem->run_hooks
/showthread.php 28 require_once



This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

[HELP] Old AVI seems to have an unworkable frame rate, don't know what to do
#1
Here is the video file. It is an old VHS rip of a Canadian TV show from the 1960s. https://drive.google.com/file/d/1vW6FUQP...sp=sharing

In its default state, there's no video/audio sync to speak of.

Hybrid reports it as having a frame count of 81070 and at a frame rate of 59.750. ffmpeg reports somewhere around 29.88 as a frame rate but nothing solid.

Topaz Video AI reports it as having a frame rate of 29.875 and a frame count of 40534, which is obviously false (it should be 40535 hypothetically?), but Topaz famously doesn't display proper frame counts unless the file is set to constant frame rate, which this old .avi is not.

With the "Scale Speed" and "Scale Output to Duration" options on Hybrid, it outputs as a proper 29.97 FPS file with a constant frame rate and good audio and video sync. Except Hybrid and ffmpeg reports it as having 40561 frames, while my media player and Topaz Video AI report 40660.

If I don't select any of these options and just have Hybrid encode it to x264 or something, the file "says" it has a run time of 22:37, but plays as double speed and cuts out halfway through.

So I tried breaking the initial video (the one linked earlier, not one of the ones from Hybrid) down to just images---yes, all 81,070 frames of it. That was 65GB in uncompressed .bmps. Every other frame is a duplicate. Every. Other. Frame.

I'm at a loss what to do with this file beyond just classifying it as "too damaged to function".

The frame rate is most definitely somewhere around 29.97 (with an insane amount of duplicate frames) even though I can't figure out what to do.
Reply
#2
Looking at that file wit MediaInfo, it shows:
Video
Count                                    : 390
Count of stream of this kind             : 1
Kind of stream                           : Video
Kind of stream                           : Video
Stream identifier                        : 0
StreamOrder                              : 0
ID                                       : 0
ID                                       : 0
Format                                   : MPEG-4 Visual
Format                                   : MPEG-4 Visual
Commercial name                          : MPEG-4 Visual
Format profile                           : Simple@L1
Format settings, BVOP                    : No
Format settings, BVOP                    : No
Format settings, QPel                    : No
Format settings, QPel                    : No
Format settings, GMC                     : 0
Format settings, GMC                     : No warppoints
Format settings, Matrix                  : Default (H.263)
Format settings, Matrix                  : Default (H.263)
Internet media type                      : video/MP4V-ES
Codec ID                                 : XVID
Codec ID/Hint                            : XviD
Codec ID/Url                             : http://mediaarea.net/XVID
Duration                                 : 1356820
Duration                                 : 22 min 36 s
Duration                                 : 22 min 36 s 820 ms
Duration                                 : 22 min 36 s
Duration                                 : 00:22:36.820
Duration                                 : 00:22:31:10
Duration                                 : 00:22:36.820 (00:22:31:10)
Bit rate                                 : 1829096
Bit rate                                 : 1 829 kb/s
Width                                    : 604
Width                                    : 604 pixels
Height                                   : 478
Height                                   : 478 pixels
Sampled_Width                            : 604
Sampled_Height                           : 478
Pixel aspect ratio                       : 1.000
Display aspect ratio                     : 1.264
Display aspect ratio                     : 5:4
Frame rate                               : 59.750
Frame rate                               : 59.750 FPS
Frame count                              : 81070
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Chroma subsampling                       : 4:2:0
Bit depth                                : 8
Bit depth                                : 8 bits
Scan type                                : Progressive
Scan type                                : Progressive
Compression mode                         : Lossy
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 0.106
Delay                                    : 0
Delay                                    : 00:00:00.000
Delay                                    : 00:00:00:00
Delay                                    : 00:00:00.000 (00:00:00:00)
Stream size                              : 310219316
Stream size                              : 296 MiB (90%)
Stream size                              : 296 MiB
Stream size                              : 296 MiB
Stream size                              : 296 MiB
Stream size                              : 295.8 MiB
Stream size                              : 296 MiB (90%)
Proportion of this stream                : 0.89641
Writing library                          : Lavc52.66.0
Writing library                          : Lavc52.66.0
ffmpeg reports:
Input #0, avi, from 'c:\Users\Selur\Desktop\strangeparadise.avi':
  Metadata:
    software        : Lavf52.61.0
  Duration: 00:22:37.35, start: 0.000000, bitrate: 2039 kb/s
  Stream #0:0: Video: mpeg4 (Simple Profile) (XVID / 0x44495658), yuv420p, 604x478 [SAR 1:1 DAR 302:239], 1829 kb/s, 59.75 fps, 29.88 tbr, 59.75 tbn
  Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, stereo, fltp, 192 kb/s
Looking at the video shows that someone encoded and interlaced input as progressive without deinterlacing.
XviD does not support interlaced content and is highly compressed, so whoever created this messed up. (at least the source seemingly wasn't cropped or resized during the progressive re-encoding step.)

Since the file itself has no frame count info, most tools fill calculate the frame rate through the playtime and the frame rate. So depending on the assumed frame rate and play time, the reported frame count will differ.

Quote:If I don't select any of these options and just have Hybrid encode it to x264 or something, the file "says" it has a run time of 22:37, but plays as double speed and cuts out halfway through.
Naturally, since the source isn't properly flagged and should have a frame rate that is near 29.97 fps.

Quote:With the "Scale Speed" and "Scale Output to Duration" options on Hybrid, it outputs as a proper 29.97 FPS file with a constant frame rate and good audio and video sync. Except Hybrid and ffmpeg reports it as having 40561 frames, while my media player and Topaz Video AI report 40660.
Since remuxing the .avi to .mkv using mkvmerge returns a file reporting 40561 frames, this seems correct to me. If audio and video is sync, I see no issue with using this way.

Cu Selur

Ps.: additionally, the source is vfr not cfr.
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#3
I see. I had intended to clean it up a bit using Hybrid and its many options, and make it a CFR video, then put it in Topaz Video AI to upscale it to 1080p. Topaz requires the video source to be CFR anyway, and near as I can tell you need to encode a video to do that, so I figured Hybrid was the best way to go about it.

I'm a bit confused on the 40561 (Hybrid/ffmpeg) vs. 40660 (Topaz/Media Player Classic) frame count ordeal though.
Reply
#4
Quote:I'm a bit confused on the 40561 (Hybrid/ffmpeg) vs. 40660 (Topaz/Media Player Classic) frame count ordeal though.
My guess this happens when the time gets divided by 29.97 vs 29.875 frame rate.
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#5
The best way to treat the source is probably to:
  • enable "Config->Automation->Always extract timecode from input" (+ disable "only some")
  • enable "Config->Input->Decoding->CFR output" (so the decoder will decode to cfr)
  • enable "Filtering->Misc->Overwrite input frame rate" to "29.97" (so Hybrid will treat the source as if it was flagged as 29.97fps)
  • enable "Filtering->(De-)Interlace/Telecine->Deinterlace/Telecine Settings->Overwrite input scan type" and set it to "top field first"
  • enable "Filtering->(De-)Interlace/Telecine->QTGMC Vapoursynth->Bob" if you want to keep all motion information.
  • add whatever additional filtering you deem proper.

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#6
(13.01.2024, 13:07)Selur Wrote: The best way to treat the source is probably to:
  • enable "Config->Automation->Always extract timecode from input" (+ disable "only some")
  • enable "Config->Input->Decoding->CFR output" (so the decoder will decode to cfr)
  • enable "Filtering->Misc->Overwrite input frame rate" to "29.97" (so Hybrid will treat the source as if it was flagged as 29.97fps)
  • enable "Filtering->(De-)Interlace/Telecine->Deinterlace/Telecine Settings->Overwrite input scan type" and set it to "top field first"
  • enable "Filtering->(De-)Interlace/Telecine->QTGMC Vapoursynth->Bob" if you want to keep all motion information.
  • add whatever additional filtering you deem proper.

Cu Selur

The last two steps result in an incredibly long and slowed down file. The former three lead to a desynced file.

If combined with Filtering->Speed Change->Scale output frame rate AND Change speed to 29.97, it yields a properly synced video file that Hybrid reports as having 40664 frames, and that Topaz Video AI and Media Player reports as having 40680 frames.

I'll just have to see if Topaz can process the video out of Hybrid properly. It is flagged as CFR at least. And Topaz' reported frame count is at least represented by something else (Media Player), if it's going to have errors with a file it's usually when it's still VFR and will have a lower frame count than Hybrid/ffmpeg/Media Player actually report.

Certainly a lot of unique issues working with old video files like this, lol.
Reply
#7
Quote:The last two steps result in an incredibly long and slowed down file. The former three lead to a desynced file.
Quote:enable "Filtering->(De-)Interlace/Telecine->QTGMC Vapoursynth->Bob" if you want to keep all motion information.
is optional, 'if you want ....', without it the frame count will not change, with it the frame count and thus the filtering&encoding time will increase.
Without:
Quote:enable "Filtering->(De-)Interlace/Telecine->Deinterlace/Telecine Settings->Overwrite input scan type" and set it to "top field first"
no deinterlacing will take place, since the source is detected as progressive.

Using the steps I mentioned, I got a sync output.

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)