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 21st July 2021, 21:08   #2661  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
One of my colleagues reported that when Indexing a WAV which is larger than 2 GB, the audio is silent from a certain point onward even if he's using the x64 build for Avisynth.
I wonder if rf64 (which would be the extension needed to come around the original wav size limit) has been implemented in FFAudioSource().
Anyway, ffmpeg seems to support wav's bigger than 2 GB, even when the rf64 extension is not used in the source file, in fact in FFMpeg decoding works fine.
Here is a way to quickly create a test wav file to reproduce the problem:

Quote:
ffmpeg -f lavfi -i "sine=frequency=1000:sample_rate=48000:duration=3600" -f lavfi -i "sine=frequency=2000:sample_rate=48000:duration=3600" -f lavfi -i "sine=frequency=3000:sample_rate=48000:duration=3600" -f lavfi -i "sine=frequency=4000:sample_rate=48000:duration=3600" -f lavfi -i "sine=frequency=5000:sample_rate=48000:duration=3600" -f lavfi -i "sine=frequency=6000:sample_rate=48000:duration=3600" -f lavfi -i "sine=frequency=7000:sample_rate=48000:duration=3600" -f lavfi -i "sine=frequency=8000:sample_rate=48000:duration=3600" -filter_complex amerge=inputs=8 c:\temp\out.wav
Indexing it with FFAudioSource() causes the problem.

The problem doesn't occur with WAVSource().

The issue has been reported in the bug tracker here: https://github.com/FFMS/ffms2/issues/389

Last edited by FranceBB; 21st July 2021 at 21:14.
FranceBB is offline   Reply With Quote
Old 21st July 2021, 23:41   #2662  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Does not make sense index a pcm samples wav, to locate a sample in a file you only need know the number of bytes per sample (in the header) and multiply.
The size of a index to all samples can be bigger than the WAV file.
Of course WavSource don't have this problem because don't make index.

BTW you can use RaWavSource from NicAudio to support WAV files bigger than 4 GB, and also RF64 or W64
__________________
BeHappy, AviSynth audio transcoder.

Last edited by tebasuna51; 21st July 2021 at 23:46.
tebasuna51 is online now   Reply With Quote
Old 22nd July 2021, 11:30   #2663  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
Of course I can use NicAudio(), but the thing is that one of my colleagues used FFAudioSource() by mistake and found the issue so he reported it to me and I was like: first of all, demux with FFMpeg and use WAVSource(), second of all, thank you for letting me know, I might as well just report it to the FFAudioSource () developers to get it fixed, so here I am.
FranceBB is offline   Reply With Quote
Old 22nd July 2021, 12:17   #2664  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by FranceBB View Post
Of course I can use NicAudio(), but the thing is that one of my colleagues used FFAudioSource() by mistake and found the issue so he reported it to me and I was like: first of all, demux with FFMpeg and use WAVSource(), second of all, thank you for letting me know, I might as well just report it to the FFAudioSource () developers to get it fixed, so here I am.
I made BestAudioSource so I'd never have to look into audio bug reports for FFMS2 ever again. True story.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 10th August 2021, 10:53   #2665  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,153
DNX120 fixed in L-SMASH Works, need fix in ffms2. Thanks
https://forum.doom9.org/showthread.p...42#post1949542
kedautinh12 is online now   Reply With Quote
Old 14th August 2021, 18:57   #2666  |  Link
StvG
Registered User
 
Join Date: Jul 2018
Posts: 447
ffms2_1c6169a (pass: tTnkia1ToVkw):
- ffms2@4567314;
- ffmpeg 4.4@1bc1757;
- zlib 1.2.11;
- dav1d 0.9.1;
- added FFAudioSource/FFMS2/FFmpegSource2 parameter "drc_scale" (float type, AC3 decoding).

Last edited by StvG; 14th August 2021 at 19:00.
StvG is offline   Reply With Quote
Old 15th August 2021, 10:02   #2667  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
Uh, new build, sweet, thanks.
FranceBB is offline   Reply With Quote
Old 15th August 2021, 11:55   #2668  |  Link
filler56789
SuperVirus
 
filler56789's Avatar
 
Join Date: Jun 2012
Location: Antarctic Japan
Posts: 1,351
Quote:
Originally Posted by StvG View Post
ffms2_1c6169a (pass: tTnkia1ToVkw):
- ffms2@4567314;
- ffmpeg 4.4@1bc1757;
- zlib 1.2.11;
- dav1d 0.9.1;
- added FFAudioSource/FFMS2/FFmpegSource2 parameter "drc_scale" (float type, AC3 decoding).
and
filler56789 is offline   Reply With Quote
Old 17th August 2021, 19:52   #2669  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
A somewhat untested build with a pile of changes. This should slay most of your poor quality forks.

Code:
- 2.3000
  - Added support for VapourSynth API4 (Myrsloik)
  - Added basic Avisynth+ frame property support (Myrsloik)
  - Added Rotation and Flip properties for VapourSynth (Myrsloik)
  - Added long path support for ffmsindex in windows (Myrsloik)
  - The audio gap fill logic is now optional and usually disabled by default (Myrsloik)
  - Allow the drc_scale option to be set when decoding audio (Myrsloik)
  - Allow the enable_drefs and use_absolute_path demuxer options to be used when indexing (Myrsloik)
FFMS3000 test1
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 17th August 2021, 22:22   #2670  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,667
@Myrsloik

If I want to support your API4 with DGDecodeNV, will I need to maintain two versions, one for API3 and one for API4? Thank you.
videoh is offline   Reply With Quote
Old 17th August 2021, 22:50   #2671  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by videoh View Post
@Myrsloik

If I want to support your API4 with DGDecodeNV, will I need to maintain two versions, one for API3 and one for API4? Thank you.
It's fairly easy to support both. See the FFMS2 source for an example. I'll probably improve the nfMakeLinear handling a bit before the final release so less things will be horribly slow as well.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 17th August 2021, 22:56   #2672  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,667
Thank you, I will have a look.
videoh is offline   Reply With Quote
Old 18th August 2021, 00:37   #2673  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,667
So, does Vapoursynth try the new API with VapourSynthPluginInit2() and if it fails tries again with VapourSynthPluginInit()?

The diff between vapoursource.cpp and vapoursource4.cpp is quite extensive and scares me a bit. Is there a comprehensive guide to things that need to be changed to use API4? Thank you.
videoh is offline   Reply With Quote
Old 18th August 2021, 09:32   #2674  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by videoh View Post
So, does Vapoursynth try the new API with VapourSynthPluginInit2() and if it fails tries again with VapourSynthPluginInit()?

The diff between vapoursource.cpp and vapoursource4.cpp is quite extensive and scares me a bit. Is there a comprehensive guide to things that need to be changed to use API4? Thank you.
A mostly complete summary can be found here:

https://github.com/vapoursynth/vapou...%20changes.txt

Note that a lot of changes are mostly renaming.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 22nd August 2021, 15:26   #2675  |  Link
longwin
Registered User
 
Join Date: Apr 2016
Posts: 1
Quote:
Originally Posted by StvG View Post
ffms2_1c6169a (pass: tTnkia1ToVkw):
- ffms2@4567314;
- ffmpeg 4.4@1bc1757;
- zlib 1.2.11;
- dav1d 0.9.1;
- added FFAudioSource/FFMS2/FFmpegSource2 parameter "drc_scale" (float type, AC3 decoding).
Thank you for your build.
longwin is offline   Reply With Quote
Old 23rd October 2021, 16:19   #2676  |  Link
gale
Registered User
 
Join Date: Oct 2021
Posts: 1
Video encoded in vc1. With FFVideoSource the number of frames is one more than with eac3to.
gale is offline   Reply With Quote
Old 10th November 2021, 14:48   #2677  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
Opened a new bug about a ZLog2 HDR H.265 UHD file (yes, there's more than just PQ and HLG in the world ehehehe): https://github.com/FFMS/ffms2/issues/395
FranceBB is offline   Reply With Quote
Old 10th November 2021, 15:52   #2678  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,345
Quote:
Originally Posted by FranceBB View Post
Opened a new bug about a ZLog2 HDR H.265 UHD file (yes, there's more than just PQ and HLG in the world ehehehe): https://github.com/FFMS/ffms2/issues/395
What versions ? Works ok for me.

avs+ r3482 x64

ffms2_StvG_1c6169a_20210814 (this is the one a few posts above) x64

L-SMASH-Works-20210811 x64
https://github.com/HomeOfAviSynthPlu...Works/releases

I didn't test actual encode, but ran through ffmpeg rawvideo, so it goes through each frame, and completes
ffmpeg -i ffms2.avs -c:v rawvideo -an -f null NUL

Preview of ffms2 and lsmash scripts in avspmod looks ok, seeking to random frames

Quote:
Simple AVS Script 2:

LWLibavVideoSource("T:\_RUBRICHE\MASSIMO\A002C0023_20211019172852_0001.MOV")

Expected behavior:

The file is supposed to be indexed correctly with the whole 3 minutes.
My lsmash index completed (yours apparently did not) , looks ok seeking in avspmod

Last edited by poisondeathray; 10th November 2021 at 15:58.
poisondeathray is offline   Reply With Quote
Old 18th January 2022, 20:55   #2679  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
FFMpeg 5 has been released and it supports IMF decoding by feeding it the cpl file.
Is it gonna be available for FFMpegSource2() too?
FranceBB is offline   Reply With Quote
Old 18th January 2022, 22:00   #2680  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by FranceBB View Post
FFMpeg 5 has been released and it supports IMF decoding by feeding it the cpl file.
Is it gonna be available for FFMpegSource2() too?
No idea. Depends on whether or not the current index method can be adapted. Also time. I have no time.
__________________
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 10:38.


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