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. |
26th March 2014, 08:42 | #1861 | Link | |
...?
Join Date: Nov 2005
Location: Florida
Posts: 1,419
|
Quote:
https://code.google.com/p/ffmpegsource/downloads/list?can=1&q=cplugin&colspec=Filename+Summary+Uploaded+ReleaseDate+Size+DownloadCount I didn't build them, but if those show the issue, then it'll at least show that it's not something recent. My own limited tests still show it with a brand new FFmpeg, so it's not that, and the -D_SYSCRT option mentioned in the FFMS2 docs didn't seem to have an effect. This narrows it down to it being in the C plugin, it being a problem with AviSynth's C interface itself, or something that occurred to me yesterday, a side-effect of linking in a static version of libgcc (which could explain why the memory increase happens in roughly equal chunks, although I'm not sure why that would result in memory not being freed when the script closes, aside from the fact that VirtualDub keeps AviSynth.dll and DevIL.dll loaded even after the user closes the script). The solution for that last one is pretty straightforward, but it's a lot more inconvenient (since it requires re-compiling my entire MinGW-w64 cross environment and the entire dependency chain for FFmpeg*, and then distributing libgcc_s.dll as a system lib with the FFMS2 package). *well, I'd run the test in a VM, but if this is really the source of the problem, normal builds with a shared libgcc would have to wait until mid-April (I recompile my cross environment every six months anyway, after upgrading to the newest release of Ubuntu). Last edited by qyot27; 26th March 2014 at 08:47. |
|
26th March 2014, 22:44 | #1862 | Link | |
Registered User
Join Date: Nov 2009
Posts: 2,405
|
Quote:
|
|
30th March 2014, 15:28 | #1863 | Link |
...?
Join Date: Nov 2005
Location: Florida
Posts: 1,419
|
As an update, my attempt at using a shared version of GCC (by simply installing the repository version of the MinGW-w64 toolchain in 14.04 beta) crashed and burned. Even with the requisite dlls present for FFMS2/ffmsindex to rely on, it ended up failing to index immediately, even though it didn't crash. I still need to test with Clang, though.
|
8th April 2014, 08:04 | #1865 | Link |
German doom9/Gleitz SuMo
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
|
Other users in the german doom9/Gleitz board report a wrong audio skew in certain cases, like this sample (40 MB).
This file is reported to have a negative delay, which FFMS2 apparently tries to respect by stuffing the audio stream, but the duration seems to be incorrect, 23 ms missing. |
8th April 2014, 15:35 | #1866 | Link |
Registered User
Join Date: Dec 2002
Posts: 5,565
|
To add more info, timecodes of the sample:
Code:
track_ID: 1 Media timescale: 3000 DTS = 0, CTS = 0 DTS = 100, CTS = 100 DTS = 200, CTS = 200 DTS = 300, CTS = 300 [...] DTS = 22200, CTS = 22200 DTS = 22300, CTS = 22300 track_ID: 2 Media timescale: 44100 Code:
[edts: Edit Box] position = 248 size = 36 [elst: Edit List Box] position = 256 size = 28 version = 0 flags = 0x000000 entry_count = 1 entry[0] segment_duration = 21750 media_time = 598 media_rate = 1.000000 |
28th April 2014, 10:31 | #1867 | Link |
Anime addict
Join Date: Feb 2009
Location: Spain
Posts: 673
|
Possible bug in ffvideosource??? http://forum.doom9.org/showthread.ph...75#post1679175
__________________
Intel i7-6700K + Noctua NH-D15 + Z170A XPower G. Titanium + Kingston HyperX Savage DDR4 2x8GB + Radeon RX580 8GB DDR5 + ADATA SX8200 Pro 1 TB + Antec EDG750 80 Plus Gold Mod + Corsair 780T Graphite |
28th April 2014, 10:36 | #1868 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
|
Quote:
1. The two scripts are not equivalent, which is evident since you need assumefps() in there at all 2. Seeking in demuxed video streams is never accurrate 3. Seeking in mpeg-ish containers usually doesn't end well either 4. Why megui is adding vfr to cfr conversion to every ffvideosource call is also a bit of a mystery
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
28th April 2014, 11:45 | #1869 | Link |
Anime addict
Join Date: Feb 2009
Location: Spain
Posts: 673
|
Ok, thanks for you answer.
__________________
Intel i7-6700K + Noctua NH-D15 + Z170A XPower G. Titanium + Kingston HyperX Savage DDR4 2x8GB + Radeon RX580 8GB DDR5 + ADATA SX8200 Pro 1 TB + Antec EDG750 80 Plus Gold Mod + Corsair 780T Graphite |
28th April 2014, 13:12 | #1870 | Link | |||
Registered User
Join Date: Mar 2011
Posts: 4,823
|
Quote:
Quote:
Quote:
I tested the sample myself and it appears to only be a problem when the video is in an AVI created by VirtualDub(Mod) and the frame rate is 23.976 (well the only other frame rate I tested was 25fps and that was fine). If you take the AVI created by VirtualDubMod and remux it with avimux, the problem goes away, as it does if you remux as an MKV and index, so (not understanding how it works myself) there appears to be some sort of frame rate miscommunication going on between VirtualDub created AVIs and ffmpegsource. |
|||
29th April 2014, 01:54 | #1871 | Link |
ангел смерти
Join Date: Nov 2004
Location: Lost
Posts: 9,558
|
Numerator/Denominator overflow? Does the import use 32-bit arithmetic? Avisynth used to export enormous fractions that required 64-bit arithmetic to properly handle, until it was changed in 2.5.7 or 2.5.8 to recognize certain common numbers and reduce the rest. Any old files from before then will still have the bad behavior, at least until remuxed by something that'll reduce the fractions.
|
29th April 2014, 06:45 | #1872 | Link | |
Registered User
Join Date: Mar 2011
Posts: 4,823
|
Quote:
The file in question was created via Avisynth 2.6.0.4, at least in my case. I also tried AviSynth+ 2.6.0.5 portable with the same result. I originally thought it was a VirtualDub problem but after testing a little more I think I was wrong. If I create the AVI using MeGUI (the writing application is Lavf55.33.100) the same problem occurs. The encoder used seems to make no difference. I've tried Lagaryth, huffyuv and Xvid. For whatever reason remuxing the AVI with Avimux fixes the problem. As does remuxing as an MKV with MKVMergeGUI. Remuxing with VirtualDub doesn't fix the problem. Adding fpsnum and fpsden to each script seems like a good idea to me. That way the frame rate is always constant and should help prevent audio sync problems. If the frame rate is constant in the first place, adding them should make no difference. It's one of the reasons I use ffvideosource in preference to LSmash, which doesn't (as far as I know) have a similar frame rate conversion function. |
|
29th April 2014, 07:15 | #1873 | Link |
Registered User
Join Date: Mar 2011
Posts: 4,823
|
While we're on the subject, here's a sample of an instance where adding fpsnum and fpsden to a script is a good idea. Aside from one missing/duplicate frame, the video is constant frame rate, 25fps. Without fpsnum and fpsden in the script, ffvideosource outputs a total of one frame less, and a frame rate of 24.971fps (it seems to output the average frame rate). Lsmash does likewise, with no way to tell it not to. AviSource/DirectShowSource "get it right" and output the correct number of frames and the correct frame rate.
I don't quite understand why ffvideosource and LSmash don't output the same as AviSource by default, so fpsnum and fpsden wouldn't be required. Without them, I think the only way to encode the video "correctly" would be to extract the timecodes from the original file and use them when remuxing the encoded version. By adding fpsnum and fpsden to each script, MeGUI eliminates the need for doing so and the encoded version has a "constant frame rate". http://ge.tt/6fbWjpe1/v/0 Last edited by hello_hello; 29th April 2014 at 07:17. |
22nd May 2014, 12:28 | #1874 | Link |
...?
Join Date: Nov 2005
Location: Florida
Posts: 1,419
|
FFMS2 C-plugin r892+41
Optimized for Pentium-III and SSE. FFmpeg r63367 git-f932e5f, built on May 22 2014 03:46:47 with gcc 4.9.0 (GCC): Code:
libavutil 52. 86.100 / 52. 86.100 libavcodec 55. 63.100 / 55. 63.100 libavformat 55. 40.100 / 55. 40.100 libavdevice 55. 13.101 / 55. 13.101 libavfilter 4. 5.100 / 4. 5.100 libavresample 1. 2. 0 / 1. 2. 0 libswscale 2. 6.100 / 2. 6.100 libswresample 0. 19.100 / 0. 19.100 libpostproc 52. 3.100 / 52. 3.100 configuration: --prefix=/home/qyot27/win32_build --cross-prefix=i686-w64-mingw32- --enable-gpl --enable-version3 --disable-w32threads --enable-avresample --disable-encoders --disable-muxers --disable-doc --disable-debug --disable-network --disable-hwaccels --disable-indevs --disable-outdevs --cpu=pentium3 --extra-cflags='-mfpmath=sse -march=pentium3 -msse -mtune=pentium3 -DPTW32_STATIC_LIB' --target-os=mingw32 --arch=x86 --optflags=-O0 EDIT 2014-06-29: Updated build here. Last edited by qyot27; 29th June 2014 at 05:20. |
24th May 2014, 16:14 | #1876 | Link |
German doom9/Gleitz SuMo
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
|
The original AviSynth 2.x did not continue the development of its 64-bit core version, which was left in a quite unstable state, therefore only few plugins were made for that platform.
Now with AviSynth plus, development appears to be rather equal for both 32-bit and 64-bit architectures, therefore support for both may be more useful again. |
25th May 2014, 01:29 | #1879 | Link |
...?
Join Date: Nov 2005
Location: Florida
Posts: 1,419
|
Yeah, although it's mostly to avoid the flacdec issues caused by using -O2 with GCC 4.9.0 (it's fixed in the 4.9.1 prerelease branch).
I've not done any performance testing to see how much impact GCC's optimizations really have (generally, -O0 gets used with debug builds, so it may just be simpler to compare debug and release builds for any performance gap). |
29th June 2014, 05:19 | #1880 | Link |
...?
Join Date: Nov 2005
Location: Florida
Posts: 1,419
|
FFMS2 C-plugin r927+41
Optimized for Pentium-III and SSE. ffmpeg version r64300 git-f02a440 Copyright (c) 2000-2014 the FFmpeg developers built on Jun 28 2014 22:59:08 with gcc 4.9.0 (GCC) Code:
libavutil 52. 90.101 / 52. 90.101 libavcodec 55. 68.100 / 55. 68.100 libavformat 55. 44.100 / 55. 44.100 libavdevice 55. 13.101 / 55. 13.101 libavfilter 4. 9.100 / 4. 9.100 libavresample 1. 3. 0 / 1. 3. 0 libswscale 2. 6.100 / 2. 6.100 libswresample 0. 19.100 / 0. 19.100 libpostproc 52. 3.100 / 52. 3.100 configuration: --prefix=/home/qyot27/win32_build --cross-prefix=i686-w64-mingw32- --enable-gpl --enable-version3 --disable-w32threads --enable-avresample --disable-encoders --disable-muxers --disable-doc --disable-debug --disable-network --disable-hwaccels --disable-indevs --disable-outdevs --cpu=pentium3 --extra-cflags='-mfpmath=sse -march=pentium3 -msse -mtune=pentium3 -DPTW32_STATIC_LIB' --target-os=mingw32 --arch=x86 --optflags=-O0 Last edited by qyot27; 30th July 2014 at 18:00. |
Thread Tools | Search this Thread |
Display Modes | |
|
|