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 Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 29th May 2020, 00:01   #2601  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,496
I've run into a problem with FFmpegSource, and I'm not sure if it isn't just something which is already understood to happen and just doesn't affect most users.

https://filebin.net/ycobtv5flicijv2e/trim.ts?t=9ldisa80

I can open this file with VirtualDub via Avisynth and ffmpegsource2 and I can step forward through it frame-by-frame without problems. The trouble starts when I try to step through it backwards - once they fall out of whatever caches they might be in (e.g. by advancing past frame 50), frames 24 and 25 become duplicates of frame 26. This is a problem because the filters I want to call on this clip do a lot of random access and the end result suffers from these duplicates even when stepped through forwards.

seekmode = 0 fixes it, but is impractical since the source file has 180000 frames and it takes several minutes to seek into the middle of the file.

Is there any other way to avoid this, or is there another source filter (edit: an x64 one, since my project is ravenous for RAM) for h.264/.ts that won't exhibit this behaviour? (apart from DGIndexNV, which I know would work fine but my new laptop isn't compatible with it).
__________________
My AviSynth filters / I'm the Doctor

Last edited by wonkey_monkey; 29th May 2020 at 00:36.
wonkey_monkey is offline   Reply With Quote
Old 29th May 2020, 00:37   #2602  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,374
@w_m , lsmash works ok , HolyWu branch

https://github.com/HolyWu/L-SMASH-Works/releases
poisondeathray is offline   Reply With Quote
Old 29th May 2020, 01:02   #2603  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,496
Thanks, I'll give it a try.

ffmpegsource also seems to have a habit of silently killing VirtualDub at random. Hopefully LSmash won't do that either.
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 29th May 2020, 13:13   #2604  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,496
Quote:
Originally Posted by poisondeathray View Post
@w_m , lsmash works ok , HolyWu branch

https://github.com/HolyWu/L-SMASH-Works/releases
It (LWLibavVideoSource) doesn't cause frames 24 and 25 to become duplicates of 26... but it does cause frame 55 to become a duplicate of frame 56

You can also exhibit this behaviour by adding the "reverse" filter and stepping through forwards.
__________________
My AviSynth filters / I'm the Doctor

Last edited by wonkey_monkey; 29th May 2020 at 13:23.
wonkey_monkey is offline   Reply With Quote
Old 29th May 2020, 16:18   #2605  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,079
For me seeking in transport stream has always been problematic, even when using an indexing source filter. I made it a habit to repack transport streams into an MKV container before I do anything else to them.

Tested your sample, and after using MKVToolNix to repack the file all my source filters (even DSS2Mod) behaved nicely.
manolito is offline   Reply With Quote
Old 29th May 2020, 16:42   #2606  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,374
Quote:
Originally Posted by wonkey_monkey View Post
It (LWLibavVideoSource) doesn't cause frames 24 and 25 to become duplicates of 26... but it does cause frame 55 to become a duplicate of frame 56

You can also exhibit this behaviour by adding the "reverse" filter and stepping through forwards.

threads=1 looks ok, but slower

Does that computer not have nvidia card ? Interesting that gpu decoding with decoder="h264_cuvid" works (or prefer_hw=1) , but intel QS does not on that clip (prefer_hw=2)



Quote:
Originally Posted by manolito View Post
Tested your sample, and after using MKVToolNix to repack the file all my source filters (even DSS2Mod) behaved nicely.
This did not work for me using ffms2 or lsmash x64 (same problem); and dss2 x64 drops the last frame
poisondeathray is offline   Reply With Quote
Old 29th May 2020, 16:56   #2607  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
In my experience it's better to use ffmpeg to remux ts to mkv, that is the default handling in staxrip, mkvmerge is fine for playback but not so for editing, causes sync issues.
stax76 is offline   Reply With Quote
Old 29th May 2020, 18:05   #2608  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,496
Well this is a minefield...

Results of remuxing to MKV (with ffmpeg):

LWLibavVideoSource: still skips frame 55
LSmashVideoSource: doesn't open this container
FFMpegSource2: seems to work okay so far

Results of remuxing to MP4 (with ffmpeg):

LWLibavVideoSource: still skips frame 55
LSmashVideoSource: First two frames get repeated, a couple of later frames get skipped. Definite no-go.
FFMpegSource2: Freezes on the first few frames, skips a couple of later frames (despite claiming to be frame accurate on Avisynth wiki)

--------------------------------------------------------------------------------------------------------

Is this all as expected?
__________________
My AviSynth filters / I'm the Doctor

Last edited by wonkey_monkey; 29th May 2020 at 18:07.
wonkey_monkey is offline   Reply With Quote
Old 29th May 2020, 18:34   #2609  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,420
It may be the method you're using to rip the Blu-ray. If I have to, I make a full-disc decrypted backup with MakeMKV (arguably you could maybe do a more restricted rip using BlurayTestAndDecrypt and libaacs/KEYDB.cfg, but you'd lose the disc structure), and then use mkvmerge to remux the main title to MKV by giving it the index.bdmv to parse. No demuxing to elementary streams and then remuxing them into other containers, if that's where the .ts sample came from.

I say this because there was a point, not sure how long ago exactly or if it's been fixed since, that MakeMKV's Matroska output acted strangely when given to source filters (or maybe it was eac3to? Like I said, it was a while ago). The simplest way to sidestep the problem is not to let MakeMKV make an MKV of whatever you're ripping.
qyot27 is offline   Reply With Quote
Old 29th May 2020, 19:37   #2610  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 7,815
Quote:
Originally Posted by wonkey_monkey View Post
Well this is a minefield...

Results of remuxing to MKV (with ffmpeg):

LWLibavVideoSource: still skips frame 55
LSmashVideoSource: doesn't open this container
FFMpegSource2: seems to work okay so far

Results of remuxing to MP4 (with ffmpeg):

LWLibavVideoSource: still skips frame 55
LSmashVideoSource: First two frames get repeated, a couple of later frames get skipped. Definite no-go.
FFMpegSource2: Freezes on the first few frames, skips a couple of later frames (despite claiming to be frame accurate on Avisynth wiki)

--------------------------------------------------------------------------------------------------------

Is this all as expected?
I can confirm. Remuxing to mkv with mkvtoolnix solves nothing
Atak_Snajpera is offline   Reply With Quote
Old 29th May 2020, 21:06   #2611  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,496
I'd forgotten about Seek Tester! Definitely going to put that to some good use.

Does it seek forward and store a hash per frame, or something, and then seek randomly and test the hashes to see which frames are returned?
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 27th July 2020, 01:19   #2612  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,156
Any update FFmpegSource with FFmpeg 4.3.1??
kedautinh12 is offline   Reply With Quote
Old 21st August 2020, 22:35   #2613  |  Link
StvG
Registered User
 
Join Date: Jul 2018
Posts: 450
ffms2:
- ffmpeg n4.4@1c7e55dd50;
- zlib 1.2.11;
- dav1d 0.7.1.
StvG is offline   Reply With Quote
Old 22nd August 2020, 01:01   #2614  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,156
Quote:
Originally Posted by StvG View Post
ffms2:
- ffmpeg n4.4@1c7e55dd50;
- zlib 1.2.11;
- dav1d 0.7.1.
Thanks
kedautinh12 is offline   Reply With Quote
Old 22nd August 2020, 13:01   #2615  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
FFMS 2.40-RC1

Test it. Don't bitch about missing libraries (apart from zlib but I think I got that one included).
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 22nd August 2020, 13:35   #2616  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,156
Quote:
Originally Posted by Myrsloik View Post
FFMS 2.40-RC1

Test it. Don't bitch about missing libraries (apart from zlib but I think I got that one included).
Thanks
kedautinh12 is offline   Reply With Quote
Old 22nd August 2020, 14:46   #2617  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
My results:
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database

Last edited by ChaosKing; 22nd August 2020 at 14:49.
ChaosKing is online now   Reply With Quote
Old 22nd August 2020, 16:07   #2618  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
Quote:
Originally Posted by ChaosKing View Post
My results:
What's different in the stvg builds? From what I can tell the results should be more similar.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet

Last edited by Myrsloik; 22nd August 2020 at 16:09.
Myrsloik is offline   Reply With Quote
Old 22nd August 2020, 17:26   #2619  |  Link
StvG
Registered User
 
Join Date: Jul 2018
Posts: 450
This is the patch for my builds.
StvG is offline   Reply With Quote
Old 22nd August 2020, 17:55   #2620  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Impressive update, thanks.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS 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 11:38.


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