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 4th January 2020, 10:34   #1  |  Link
TomArrow
Registered User
 
Join Date: Dec 2017
Posts: 63
Odd frame accuracy with ffms2 and MPEG-1

I have a PNG sequence which I encoded as MPEG-1 file. Then I remuxed that MPEG-1 file to mkv. This is the only way I can get reliable frame accuracy with ffvideosource.

By frame accuracy I mean that I can jump to any frame number and it will always end up being the same frame.

However, this only applies to anything past a certain point in the video stream and only when I delay the MPEG-1 MKV stream by around 5 frames.

The first frames, when played in the correct order, actually are perfectly in sync. But all it takes is to move forward a few frames and then backwards a bit and suddenly that 5 frame delay becomes necessary. However that 5 frame delay is constant throughout the entire 2 hour video and completely reliable except for the beginning of the video if seeked in the correct order.

If I just play the video straight in the correct order, the sync seems to stay correct, however I haven't waited long enough to see for how long.

Anything I can do about this? Is there some other import filter that doesn't have this problem?
TomArrow is offline   Reply With Quote
Old 4th January 2020, 10:42   #2  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 5,929
Quote:
I have a PNG sequence which I encoded as MPEG-1 file
personally I would open the PNG sequence in Avisynth instead of the MPEG-1

Quote:
Is there some other import filter that doesn't have this problem?
most folks would use DGDecode/DGMPGDec (DGIndex&mpeg2source) instead of FFmegSource.
__________________
Hybrid here in the forum, homepage
Notice: Since email notifications do not work here any more, it might take me quite some time to notice a reply to a thread,..
Selur is offline   Reply With Quote
Old 4th January 2020, 10:49   #3  |  Link
TomArrow
Registered User
 
Join Date: Dec 2017
Posts: 63
Oh well, I tried MPEG2Source and that seems to do the trick.

Edit: Ah, so I'm using the suggested method. Great,thanks! Yeah I'm opening the png sequence too. I need both, trying to train an AI on the MPEG-1 artifacts.
TomArrow is offline   Reply With Quote
Old 10th January 2020, 17:55   #4  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,055
Quote:
Originally Posted by TomArrow View Post
I have a PNG sequence which I encoded as MPEG-1 file. Then I remuxed that MPEG-1 file to mkv. This is the only way I can get reliable frame accuracy with ffvideosource.

By frame accuracy I mean that I can jump to any frame number and it will always end up being the same frame.

However, this only applies to anything past a certain point in the video stream and only when I delay the MPEG-1 MKV stream by around 5 frames.

The first frames, when played in the correct order, actually are perfectly in sync. But all it takes is to move forward a few frames and then backwards a bit and suddenly that 5 frame delay becomes necessary. However that 5 frame delay is constant throughout the entire 2 hour video and completely reliable except for the beginning of the video if seeked in the correct order.

If I just play the video straight in the correct order, the sync seems to stay correct, however I haven't waited long enough to see for how long.

Anything I can do about this? Is there some other import filter that doesn't have this problem?
Encode PNG sequences as something like huffyuv in AVI if you want to use FFMS2. That's 100% guaranteed to work properly (in addition to also beign lossless)
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik 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 15:57.


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