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
Register FAQ Calendar Today's Posts Search

Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 3rd April 2017, 20:40   #41  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
Quote:
Originally Posted by Selur View Post
Feature request: Support .mpls parsing. It's really a pain to always load all the separate files a playlist makes up and later join them together,... (FFmpeg itself can handle playlist files fine when build with libbluray)
That sounds complicated... I'd kinda like to avoid it. Maybe someone can make a ffms2 compile with libbluray and see what happens. Maybe it'll work automatically then. I don't think anyone's done that.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is online now  
Old 5th April 2017, 21:43   #42  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
Test3 uploaded. Some more fixinations and improvements. Now handles all your VP9 needs!
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is online now  
Old 8th April 2017, 17:47   #43  |  Link
shekh
Registered User
 
Join Date: Mar 2015
Posts: 775
Is it good idea to merge (some part of) it to VirtualDub source plugin? Basically what I miss from bare ffmpeg is accurate per-frame timestamps.
__________________
VirtualDub2
shekh is offline  
Old 8th April 2017, 18:25   #44  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
Quote:
Originally Posted by shekh View Post
Is it good idea to merge (some part of) it to VirtualDub source plugin? Basically what I miss from bare ffmpeg is accurate per-frame timestamps.
I would definitely make it a separate input plugin. All the tricks used can lead to issues worse than naive ffmpeg usage. I wouldn't mind including vdub support of it's contributed.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is online now  
Old 8th April 2017, 18:46   #45  |  Link
shekh
Registered User
 
Join Date: Mar 2015
Posts: 775
I already accumulated a frightening amount of tricks to make ffmpeg work.. Want to add some sort of option, not separate plugin.
Can you briefly describe what ffms does now? My idea is to just run a scan of stream and save pts/dst of each frame (similar to running ffprobe). And which frames are keys.
__________________
VirtualDub2
shekh is offline  
Old 8th April 2017, 18:57   #46  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
There's no brief description. It's a long list of horrible ideas. See the source. Your hacks are a puny collection. We parse the bitstream for some formats. Use dts OR pts depending on the time of day. Switch between byte and timestamp seeking. Guess decoding delays (badly). Audio is even nastier.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is online now  
Old 8th April 2017, 20:20   #47  |  Link
TheFluff
Excessively jovial fellow
 
Join Date: Jun 2004
Location: rude
Posts: 1,100
Quote:
Originally Posted by shekh View Post
I already accumulated a frightening amount of tricks to make ffmpeg work.. Want to add some sort of option, not separate plugin.
Can you briefly describe what ffms does now? My idea is to just run a scan of stream and save pts/dst of each frame (similar to running ffprobe). And which frames are keys.
That'll just get you to where FFMS was like five years ago. FFMS has an API, use that.

I think the main thing we've learned from FFMS is that while ffmpeg has a unified API that is the same for all formats, you can definitely not count on every format behaving the same (or in fact even behave similarly), nor on the documented functionality/behavior to work consistently for all formats, etc etc. One of the best ways to illustrate this is some of the comments in the ffms source - where someone's been forced to add some godawful workaround and explained why. Some of my favorites:

https://github.com/FFMS/ffms2/blob/f...exing.cpp#L471
https://github.com/FFMS/ffms2/blob/f...track.cpp#L218 (really, just read this entire source file, it shows why your idea is painfully inadequate)
https://github.com/FFMS/ffms2/blob/f...ource.cpp#L654
https://github.com/FFMS/ffms2/blob/f...ource.cpp#L160 (again, audiosource.cpp is worth reading in its entirety)

Last edited by TheFluff; 8th April 2017 at 20:36.
TheFluff is offline  
Old 8th April 2017, 21:02   #48  |  Link
shekh
Registered User
 
Join Date: Mar 2015
Posts: 775
Yes I have experience. My favorite is "block_align" field. The docs should really say "this is meaningless value, we just need room for random stuff"
I wonder if any issue found by FFMS resulted in some fix in FFMPEG to improve it?
__________________
VirtualDub2
shekh is offline  
Old 9th April 2017, 01:00   #49  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
Quote:
Originally Posted by shekh View Post
Yes I have experience. My favorite is "block_align" field. The docs should really say "this is meaningless value, we just need room for random stuff"
I wonder if any issue found by FFMS resulted in some fix in FFMPEG to improve it?
I don't think any meaningful fixes happened. Framr accurate seeking isn't a supported usr case.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is online now  
Old 14th April 2017, 22:03   #50  |  Link
Mystery Keeper
Beyond Kawaii
 
Mystery Keeper's Avatar
 
Join Date: Feb 2008
Location: Russia
Posts: 724
Test 3 still gives me wrong frames for VP9. Further in time compared to the source video.
__________________
...desu!
Mystery Keeper is offline  
Old 15th April 2017, 08:55   #51  |  Link
dipje
Registered User
 
Join Date: Oct 2014
Posts: 268
I have issues with .MTS files (avchd so they contain h264 and ac3).

The files have some weird timing . The audio starts sooner than the video most of the time. It seems when I press record on my camera it starts capturing audio immediately, but video takes half a second or so to get going. So the timecodes of the videostream don't start at 00:00:00. What ffms2000 seems to do is freeze-frame the first videoframe until a/v sync is achieved.
But halfway through the files the frames seem to jump backward and forward , weird glitches. Glitches that aren't there with ffplay or playing through mpc-hc and lavfilters.

The thing is, I don't think this is a regression from ffms2, I think ffms2 also has the same issue, and the issue comes from the libavformat demuxer for MTS which is 'not recommended' I believe.

In older ffms2 versions (2.1 or earlier even ?) You could disable the libav demuxer during indexing, so it would use another one (don't know which, haali or something from matroska that could read MTS ? ). Or maybe I remuxed the MTS files to mkv to prevent issues.

Anyway, lsmash libav reads them ok. It uses a different MTS parser right ?

All other files I use recently (magicyuv 10bit RGB, dnxhr 444, Cineform RGB ) seem to work just fine. (Only tested through Vapoursynth x64)

Last edited by dipje; 15th April 2017 at 08:58.
dipje is offline  
Old 15th April 2017, 11:09   #52  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
Quote:
Originally Posted by dipje View Post
I have issues with .MTS files (avchd so they contain h264 and ac3).

The files have some weird timing . The audio starts sooner than the video most of the time. It seems when I press record on my camera it starts capturing audio immediately, but video takes half a second or so to get going. So the timecodes of the videostream don't start at 00:00:00. What ffms2000 seems to do is freeze-frame the first videoframe until a/v sync is achieved.
But halfway through the files the frames seem to jump backward and forward , weird glitches. Glitches that aren't there with ffplay or playing through mpc-hc and lavfilters.

The thing is, I don't think this is a regression from ffms2, I think ffms2 also has the same issue, and the issue comes from the libavformat demuxer for MTS which is 'not recommended' I believe.

In older ffms2 versions (2.1 or earlier even ?) You could disable the libav demuxer during indexing, so it would use another one (don't know which, haali or something from matroska that could read MTS ? ). Or maybe I remuxed the MTS files to mkv to prevent issues.

Anyway, lsmash libav reads them ok. It uses a different MTS parser right ?

All other files I use recently (magicyuv 10bit RGB, dnxhr 444, Cineform RGB ) seem to work just fine. (Only tested through Vapoursynth x64)
Do you have a sample MTS file? It could be timestamp discontinuities (or something else) we're trying to fix right now.

I have no idea what l-smash uses. All I know is that it does everything very differently.

Haali splitter support was removed several years ago because haali stopped developing it looooooooong ago (and lavf got better)
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet

Last edited by Myrsloik; 15th April 2017 at 11:13.
Myrsloik is online now  
Old 15th April 2017, 15:26   #53  |  Link
zub35
Registered User
 
Join Date: Oct 2016
Posts: 56
Add the ability to convert vfr to cfr using two methods: duplicate or blend.
Only DSS2 does the correct conversion, by duplication.
zub35 is offline  
Old 15th April 2017, 15:28   #54  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
Quote:
Originally Posted by zub35 View Post
Add the ability to convert vfr to cfr using two methods: duplicate or blend.
Only DSS2 does the correct conversion, by duplication.
Duplication already exists. Also lrn2vfr. It's 2017.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is online now  
Old 15th April 2017, 15:48   #55  |  Link
zub35
Registered User
 
Join Date: Oct 2016
Posts: 56
Quote:
Originally Posted by Myrsloik View Post
Duplication already exists. Also lrn2vfr. It's 2017.
This is not right. ffms averages fps and discards frames that exceed it.
Dss2 works with the top bar of VFR and duplicates frames to it, without discarding.
p.s. Or maybe I do not understand something ...

Also that's when fps jumps to the insane 1000, and then all the other frames are duplicated to it, which is also bad.
It is necessary that ffms find the average maximum value, discarding too large bursts.

Last edited by zub35; 15th April 2017 at 15:54.
zub35 is offline  
Old 15th April 2017, 15:53   #56  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
Quote:
Originally Posted by zub35 View Post
This is not right. ffms averages fps and discards frames that exceed it.
Dss2 works with the top bar of VFR and duplicates frames to it, without discarding.
p.s. Or maybe I do not understand something ...
No frames are discarded umless you use the cfr mode. You're wrong.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is online now  
Old 15th April 2017, 16:08   #57  |  Link
zub35
Registered User
 
Join Date: Oct 2016
Posts: 56
sample: https://cloud.mail.ru/public/BX68/Cxg3rF7iX (sorry, only erotic)
dss2 30fps and 20970 frames [11:38.999]
ffms2000 20.220fps and 14113 frames [11:37.958]

Because of what, the video in ffms is accelerating, then slowing down
zub35 is offline  
Old 15th April 2017, 16:11   #58  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
Don't even have to look at it. It's because it has dropped frames (duplicates/nvops) and only returns actually coded frames. The file is vfr and you're using the vfr mode. Everything works as expected.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is online now  
Old 15th April 2017, 16:14   #59  |  Link
zub35
Registered User
 
Join Date: Oct 2016
Posts: 56
The video is not behaving naturally. Rides with acceleration and deceleration. This not normal
Also, it would still be great ffms2000 worked with timecodes_v2 in this conversion vfr to cfr, loading them from file. This was-would be useful for raw streams.

Last edited by zub35; 15th April 2017 at 16:20.
zub35 is offline  
Old 15th April 2017, 16:18   #60  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
Quote:
Originally Posted by zub35 View Post
The video is not behaving naturally. Rides with acceleration and deceleration. This not normal
Lrn2vfr. The dropped frames do exactly that.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is online now  
Closed Thread


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 21:00.


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