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 > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 13th September 2019, 22:53   #1  |  Link
TomArrow
Registered User
 
Join Date: Dec 2017
Posts: 90
Sync differences between 2 computers using FFMS2

Hi. Using AviSynth+ r2772 and ffms2 2.23.1 (ffinfo shows 2.23.0.0). Windows 7 Ultimate 64 bit fully up to date with all SPs.

I have an identical script, identical files, identical ffindex files, identical AviSynth+ version, identical plugins+ and plugins64+ folders (no plugins in the non-+ folders).

Have two synced videos. Both are mkv. One is H264 (bluray-compat), the other is MPEG-2 (dvd-compat).

Synced the two on computer 1, transferred the project to computer 2 and now the files are no longer in sync.

On computer two, there is suddenly a FOUR (!!) frame difference at the very start of the clip. I can compensate that difference with .Trim(), by removing 4 frames from one of the clips, but sadly even with that, I get random single-frame differences across the entire length of the video. The video will go out-of-sync for a single frame and then go back to being in sync.

On computer 1, the sync is spot-on.

Perfect sync is absolutely crucial for this project (I wanna export pngs to train an AI upscaler).

When I run .ffinfo on either of the two synced clips, I get identical readout on both computers (CFR and VFR time, frame numbers and all the other stuff), but the image shown is different.

I don't know what to do, this is extremely frustrating. It looks like ffms2 is using a different decoder on both computers, but I don't know how that is possible or what I can do about it.

Second computer has ffdshow installed, but I don't know if that has any influence or how to change anything about that. And if that could be the problem, I probably have a million different things installed that could interfere similarly.

This never happened to me before. Every time in the past when I transferred between the two computers, everything worked fine.

Please help, I'm losing my mind lol.

P.S. Oh yeah the second computer has a much better CPU. Computer 1 has a Intel G2130 CPU, computer 2 has an Intel 3930K and also a GPU that supports h264 decoding (GTX 1070). Was thinking maybe it could be some CPU optimization problem, with some SSE-version of the function having a bug or something. Or maybe ffmpeg is using the (evidently faulty) GPU decoding of the GTX 1070?

Last edited by TomArrow; 13th September 2019 at 22:59.
TomArrow is offline   Reply With Quote
Old 14th September 2019, 11:50   #2  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by TomArrow View Post
Hi. Using AviSynth+ r2772 and ffms2 2.23.1 (ffinfo shows 2.23.0.0). Windows 7 Ultimate 64 bit fully up to date with all SPs.

I have an identical script, identical files, identical ffindex files, identical AviSynth+ version, identical plugins+ and plugins64+ folders (no plugins in the non-+ folders).

Have two synced videos. Both are mkv. One is H264 (bluray-compat), the other is MPEG-2 (dvd-compat).

Synced the two on computer 1, transferred the project to computer 2 and now the files are no longer in sync.

On computer two, there is suddenly a FOUR (!!) frame difference at the very start of the clip. I can compensate that difference with .Trim(), by removing 4 frames from one of the clips, but sadly even with that, I get random single-frame differences across the entire length of the video. The video will go out-of-sync for a single frame and then go back to being in sync.

On computer 1, the sync is spot-on.

Perfect sync is absolutely crucial for this project (I wanna export pngs to train an AI upscaler).

When I run .ffinfo on either of the two synced clips, I get identical readout on both computers (CFR and VFR time, frame numbers and all the other stuff), but the image shown is different.

I don't know what to do, this is extremely frustrating. It looks like ffms2 is using a different decoder on both computers, but I don't know how that is possible or what I can do about it.

Second computer has ffdshow installed, but I don't know if that has any influence or how to change anything about that. And if that could be the problem, I probably have a million different things installed that could interfere similarly.

This never happened to me before. Every time in the past when I transferred between the two computers, everything worked fine.

Please help, I'm losing my mind lol.

P.S. Oh yeah the second computer has a much better CPU. Computer 1 has a Intel G2130 CPU, computer 2 has an Intel 3930K and also a GPU that supports h264 decoding (GTX 1070). Was thinking maybe it could be some CPU optimization problem, with some SSE-version of the function having a bug or something. Or maybe ffmpeg is using the (evidently faulty) GPU decoding of the GTX 1070?
Try setting the same number of threads for both avs+ and ffms2 and see if it still happens.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 14th September 2019, 14:53   #3  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
You could also try seekmode=0. Could be slower but also more safe.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 14th September 2019, 22:52   #4  |  Link
TomArrow
Registered User
 
Join Date: Dec 2017
Posts: 90
Quote:
Originally Posted by Myrsloik View Post
Try setting the same number of threads for both avs+ and ffms2 and see if it still happens.
Thanks for the idea. I've never used explicit multithreading in Avisynth+ before. How would I achieve what you suggested?
TomArrow is offline   Reply With Quote
Old 14th September 2019, 23:08   #5  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 7,806
You may also try lsmash as video source decoder.
Atak_Snajpera is offline   Reply With Quote
Old 15th September 2019, 00:01   #6  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
Quote:
Originally Posted by TomArrow View Post
Thanks for the idea. I've never used explicit multithreading in Avisynth+ before. How would I achieve what you suggested?
ffms2("myvide.mp4", threads=1)

https://github.com/FFMS/ffms2/blob/m...#ffvideosource
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Reply

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 05:48.


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