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 30th July 2007, 19:22   #81  |  Link
Leak
ffdshow/AviSynth wrangler
 
Leak's Avatar
 
Join Date: Feb 2003
Location: Austria
Posts: 2,441
Quote:
Originally Posted by foxyshadis View Post
I don't have a problem with the audio cache, if random access methods are going to cause problems. But would it be possible to either pass each block through zlib first, or designate the file as compressed? (ie, by passing FILE_ATTRIBUTE_COMPRESSED to CreateFile.) Doesn't help much, but since disk i/o will be the big blocker there, it'll help some.
How about storing (rolling) checksums of, say, 4KB blocks of audio instead (like rsync does) so that you can start decoding at some approximate position in the compressed audio and figure out where you actually are after decoding at most 8kB minus one byte followed by adjusting accordingly? (i.e. seek back some more or decode a bit more until you hit the right sample)

That way you get sample-accurate seeks to each 4kB position while only having to store only a fraction of the current amount of data, with only a small performance hit after a seek.

np: Thomas Fehlmann - Atlas 2 (Honigpumpe)
__________________
now playing: [artist] - [track] ([album])
Leak is offline   Reply With Quote
Old 30th July 2007, 20:32   #82  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
The following information could be very wrong since most of my observations come from comp.exe and not even a real hex editor...

The things I've tried so far is to index the audio in a way similar to the video, demuxing the raw audio stream to its own file to eliminate inaccurate seeking and the current method. Demuxing the audio to a separate file didn't make any real difference in decoding behavior in most cases.

Some kind of state does however seem to be kept by some decoders (mp3 which I mainly tested with) that means you won't get the same output even if you start at a much earlier point. Interestingly enough offset isn't what made me give up but the fact that the decoded samples seemed to be off by +-1 in a systematic way.

I could resurrect the most working version of the code as a separate filter if anyone wants to try their luck. Don't think anyone really commented on how it worked before it was removed.

I think I'll go read the flac documentation now...
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet

Last edited by Myrsloik; 30th July 2007 at 20:34.
Myrsloik is offline   Reply With Quote
Old 14th August 2007, 11:38   #83  |  Link
smok3
brontosaurusrex
 
smok3's Avatar
 
Join Date: Oct 2001
Posts: 2,392
all i ever get is: cant load ffmpegsource.dll..., what is there to do?
smok3 is offline   Reply With Quote
Old 14th August 2007, 12:05   #84  |  Link
Leak
ffdshow/AviSynth wrangler
 
Leak's Avatar
 
Join Date: Feb 2003
Location: Austria
Posts: 2,441
Quote:
Originally Posted by smok3 View Post
all i ever get is: cant load ffmpegsource.dll..., what is there to do?
Are you using LoadCPlugin to load it? (Note the extra "C" in there...)
__________________
now playing: [artist] - [track] ([album])
Leak is offline   Reply With Quote
Old 14th August 2007, 12:11   #85  |  Link
smok3
brontosaurusrex
 
smok3's Avatar
 
Join Date: Oct 2001
Posts: 2,392
yes, i have tried all possible things.
smok3 is offline   Reply With Quote
Old 14th August 2007, 13:46   #86  |  Link
buzzqw
HDConvertToX author
 
Join Date: Nov 2003
Location: Cesena,Italy
Posts: 6,552
unzip ffmpegsource.zip in your \windows\system32, and overwrite all file

then take the ffmpegsource.dll and put where you want

load it with standard LoadPlugin

BHH
__________________
HDConvertToX: your tool for BD backup
MultiX264: The quick gui for x264
AutoMen: The Mencoder GUI
AutoWebM: supporting WebM/VP8
buzzqw is offline   Reply With Quote
Old 18th August 2007, 18:00   #87  |  Link
CruNcher
Registered User
 
CruNcher's Avatar
 
Join Date: Apr 2002
Location: Germany
Posts: 4,926
could it be that ffmpegsource is damaged ? i get this here after some encodes (1920x1080p 23.976 Film) of the same clip in the cmd
Quote:
Compiler did not align stack variables. Libavcodec has been miscompiled
and may be very slow or crash. This is not a bug in libavcodec,
but in the compiler. Do not report crashes to FFmpeg developers.
System is AMD Athlon 64 Venice @ 2.4 Ghz Windows XP SP2
playbacking the .avs with mpc works fine tough but encoding results in output errors (strange blocks, luma changes)
__________________
all my compares are riddles so please try to decipher them yourselves :)

It is about Time

Join the Revolution NOW before it is to Late !

http://forum.doom9.org/showthread.php?t=168004

Last edited by CruNcher; 18th August 2007 at 18:07.
CruNcher is offline   Reply With Quote
Old 18th August 2007, 19:56   #88  |  Link
Gusar
Registered User
 
Join Date: Jan 2006
Posts: 103
The bug is, as the message says, in the compiler. Only the recently released gcc-4.2 for MinGW compiles correct code, older MinGW compilers do not.
Gusar is offline   Reply With Quote
Old 18th August 2007, 20:17   #89  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Version 1.7 already is compiled with gcc 4.2.1 which I got from http://forum.doom9.org/showthread.ph...02#post1028402 since
3.4.5 couldn't even link faad2 and a52dec properly. So there has to be more to it than just the compiler version.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 18th August 2007, 21:13   #90  |  Link
Gusar
Registered User
 
Join Date: Jan 2006
Posts: 103
Quote:
Originally Posted by Myrsloik View Post
Version 1.7 already is compiled with gcc 4.2.1 which I got from http://forum.doom9.org/showthread.ph...02#post1028402 since
3.4.5 couldn't even link faad2 and a52dec properly. So there has to be more to it than just the compiler version.
Some MinGW fixes have been added to ffmpeg revision 10106 (Aug 13). If your build is older, that's the problem.
Gusar is offline   Reply With Quote
Old 18th August 2007, 21:27   #91  |  Link
TheRyuu
warpsharpened
 
Join Date: Feb 2007
Posts: 787
Quote:
Originally Posted by Myrsloik View Post
Version 1.7 already is compiled with gcc 4.2.1 which I got from http://forum.doom9.org/showthread.ph...02#post1028402 since
3.4.5 couldn't even link faad2 and a52dec properly. So there has to be more to it than just the compiler version.
Your right it is more then just the compiler.
The 3.4.x versions are the ones that break libavcodec, not to mention can't link those items properly.

The newer 4.2.x versions shouldn't break it.
This is based off of experience with libav with xbmc's mplayer.dll.

I suppose ffmpeg shouldn't be that much different.

Quote:
Originally Posted by CruNcher View Post
could it be that ffmpegsource is damaged ? i get this here after some encodes (1920x1080p 23.976 Film) of the same clip in the cmd

System is AMD Athlon 64 Venice @ 2.4 Ghz Windows XP SP2
playbacking the .avs with mpc works fine tough but encoding results in output errors (strange blocks, luma changes)
It's normally a compiler error.
And it can break some decoding options in libavcodec.
TheRyuu is offline   Reply With Quote
Old 18th August 2007, 21:41   #92  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Try the new version and see what happens.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 19th August 2007, 13:07   #93  |  Link
smok3
brontosaurusrex
 
smok3's Avatar
 
Join Date: Oct 2001
Posts: 2,392
Quote:
Originally Posted by buzzqw View Post
unzip ffmpegsource.zip in your \windows\system32, and overwrite all file

then take the ffmpegsource.dll and put where you want

load it with standard LoadPlugin

BHH
great, that did it, can i expect to get some aac audio throught this?
smok3 is offline   Reply With Quote
Old 19th August 2007, 23:05   #94  |  Link
winnydows
Registered User
 
winnydows's Avatar
 
Join Date: Feb 2006
Location: Moscow
Posts: 190
Myrsloik
for your plugin. I dream about it a lot of years. I add your plugin to my program:
XviD4PSP 5.000 beta 15 lite
Framework 3.0 required.

One question:
How i can change audio track in your plugin ?

Best regards in your developing. You my Saviour.
winnydows is offline   Reply With Quote
Old 20th August 2007, 00:14   #95  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
From The Book of Encoding chapter 5 verse 9:
Quote:
atrack & vtrack: Track number as seen by the relevant demuxer, starts from 0, -1 means it will pick the first suitable track and -2 means it's disabled.
I've had some more time to figure out how to use flac for the audio cache and it seems possible with very little work since the library actually supports sample accurate seeking natively. There ara however a few implementation details I don't know what to do about...

Should it be possible to select between raw pcm and flac compression? There will be at least one added argument for flac's compression level anyway since there's a big difference in speed between them.

If yes, should the uncompressed cache be extended to write real wav files instead of just raw pcm? Would that improve anything for people who just want the audio decoded for processing with other programs?

Note that it should be easy to autodetect the cache type so it wouldn't cause any issues to implements all 3 (pcm/raw/flac) options.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 21st August 2007, 06:26   #96  |  Link
CruNcher
Registered User
 
CruNcher's Avatar
 
Join Date: Apr 2002
Location: Germany
Posts: 4,926
@ Myrsloik
yep no more message no problems anymore thx
__________________
all my compares are riddles so please try to decipher them yourselves :)

It is about Time

Join the Revolution NOW before it is to Late !

http://forum.doom9.org/showthread.php?t=168004
CruNcher is offline   Reply With Quote
Old 22nd August 2007, 14:38   #97  |  Link
MatMaul
Registered User
 
Join Date: Apr 2004
Posts: 402
hey !
first thanks for this great plugin.

do you think the support for mov files can be added please ?

I would like to open the video of my camera (mov file, mjpeg codec) with this plugin. My videos play fine with ffmpeg.exe
MatMaul is offline   Reply With Quote
Old 22nd August 2007, 17:49   #98  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Upload the file or a part of it to ftp://upload:upload@mellbin.org/ and I'll take a look at it when I've got the time.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 22nd August 2007, 19:24   #99  |  Link
MatMaul
Registered User
 
Join Date: Apr 2004
Posts: 402
done !
MatMaul is offline   Reply With Quote
Old 22nd August 2007, 21:34   #100  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
The bugs have been found and the file will work in the next version. The stack overflow was caused by av_find_stream_info() needing a really big stack. It is now executed in a separate thread with 4MB of stack all to itself. No idea why it needs so much but it works.
__________________
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 19:13.


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