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 22nd October 2007, 02:40   #161  |  Link
Chainmax
Huh?
 
Chainmax's Avatar
 
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
I want to open a DXA video in Avisynth, do I need anything else than FFMPEGSource?
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it.
Chainmax is offline   Reply With Quote
Old 26th October 2007, 01:56   #162  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
This Is A Version Only Intended For Testing, Idiots Should Skip This Post

This test version uses a new way to decode audio without using a huge uncompressed audio cache. Matroska files need no additional space and all other containers have the original demuxed audio track stored in c:\ffmpegsource.cache (this test version only).

The decoding results seems to be identical (dithering/other parts of codecs that prevent it but makes no difference) when run multiple times when compared to itself. It does however differ a lot from ffmpegsource(atrack=-1) and I have no idea why that is. There are at least no audible artifacts (to me) so report if it works properly.

Usage:
FFAudioSource(string source)

Link
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 27th October 2007, 13:39   #163  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
@Myrsloik,

Recently MLP decoding was added: ffmpeg-mailinglist. Could you add this to FFAudioSource? I would be very grateful!
Wilbert is offline   Reply With Quote
Old 27th October 2007, 18:10   #164  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
I tried to compile a newer ffmpeg the usual way but I get this error:
Code:
gcc -shared -Wl,--output-def,avformat-51.def -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-auto-image-base -Wl,--warn-common -Wl,-rpath-link,"/c/libraries/ffmpeg"/libavcodec -Wl,-rpath-link,"/c/libraries/ffmpeg"/libavformat -Wl,-rpath-link,"/c/libraries/ffmpeg"/libavutil -o avformat-51.dll allformats.o cutils.o os_support.o sdp.o utils.o avio.o aviobuf.o raw.o aiff.o riff.o amr.o apc.o ape.o asf.o asfcrypt.o au.o avidec.o avs.o vocdec.o voc.o bethsoftvid.o c93.o daud.o dsicin.o dv.o dxa.o electronicarts.o ffm.o flic.o flvdec.o 4xm.o gifdec.o gxf.o idcin.o img2.o ipmovie.o matroskadec.o matroska.o mm.o mmf.o mov.o isom.o mp3.o mpc.o mpeg.o mpegts.o mtv.o mxf.o nsvdec.o nutdec.o nut.o nuv.o ogg2.o oggparsevorbis.o oggparsetheora.o oggparseflac.o oggparseogm.o rtsp.o rmdec.o idroq.o segafilm.o siff.o smacker.o sol.o psxstr.o swf.o thp.o tiertexseq.o tta.o txd.o sierravmd.o wav.o wc3movie.o westwood.o wv.o yuv4mpeg.o file.o http.o rtpproto.o tcp.o udp.o -L"/c/libraries/ffmpeg"/libavutil -lavutil -lavcodec -L"/c/libraries/ffmpeg"/libavcodec -lz -lm -la52 -lfaad  -lws2_32 
c:/libraries/ffmpeg/libavcodec/libavcodec.a(cscd.o): In function `decode_frame':
c:/libraries/ffmpeg/libavcodec/cscd.c:161: undefined reference to `lzo1x_decode'
c:/libraries/ffmpeg/libavcodec/libavcodec.a(nuv.o): In function `decode_frame':
c:/libraries/ffmpeg/libavcodec/nuv.c:168: undefined reference to `lzo1x_decode'
c:/libraries/ffmpeg/libavcodec/libavcodec.a(cook.o): In function `scalar_dequant_float':
c:/libraries/ffmpeg/libavutil/random.h:45: undefined reference to `av_random_generate_untempered_numbers'
c:/libraries/ffmpeg/libavcodec/libavcodec.a(cook.o): In function `cook_decode_init':
c:/libraries/ffmpeg/libavcodec/cook.c:1069: undefined reference to `av_init_random'
c:/libraries/ffmpeg/libavcodec/libavcodec.a(mpc.o): In function `mpc7_decode_frame':
c:/libraries/ffmpeg/libavutil/random.h:45: undefined reference to `av_random_generate_untempered_numbers'
c:/libraries/ffmpeg/libavcodec/libavcodec.a(mpc.o): In function `mpc7_decode_init':
c:/libraries/ffmpeg/libavcodec/mpc.c:83: undefined reference to `av_init_random'
c:/libraries/ffmpeg/libavcodec/libavcodec.a(nellymoserdec.o): In function `decode_init':
c:/libraries/ffmpeg/libavcodec/nellymoserdec.c:401: undefined reference to `av_init_random'
c:/libraries/ffmpeg/libavcodec/libavcodec.a(nellymoserdec.o): In function `nelly_decode_block':
c:/libraries/ffmpeg/libavutil/random.h:45: undefined reference to `av_random_generate_untempered_numbers'
collect2: ld returned 1 exit status
make[1]: *** [avformat-51.dll] Error 1
make[1]: Leaving directory `/c/libraries/ffmpeg/libavformat'
make: *** [lib] Error 2
It seems like it can't find the libraries it's compiled itself or something similar. No idea what to do about it.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 28th October 2007, 04:25   #165  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
New compile of the test version. Includes a recent ffmpeg and it's now statically linked (flac cache not enabled since it didn't want to link).

Link
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 28th October 2007, 14:07   #166  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
Thx! I got it working for AAC and MP4/AAC, although i didn't test it very well. It seems that the MLP/TrueHD patches are not added to the SVN yet, but i will keep an eye on it.
Wilbert is offline   Reply With Quote
Old 29th October 2007, 20:43   #167  |  Link
tateu
Registered User
 
Join Date: Jan 2002
Location: Los Angeles, CA USA
Posts: 132
@Myrsloik,

You might want to try "strip -x libavcodec.a" on all the ffmpeg libs for the static compile. In my tests, that cuts the resulting dll size down to about 3MB.
tateu is offline   Reply With Quote
Old 30th October 2007, 22:26   #168  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
@Myrsloik,

Kurtnoise created a patch for E-AC3/MLP (ffmpeg)! Could you incorporate that in FFAudioSource?

patch: http://kurtnoise.free.fr/index.php?dir=misc/

Thanks again!
Wilbert is offline   Reply With Quote
Old 30th October 2007, 22:35   #169  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
If I did you would have no motivation to get it integrated into the main branch. The source is still available if someone really wants to make their own build with an "improved" ffmpeg and I don't mind answering compilation questions... AS LONG AS YOU CLEARLY LABEL IT AS NOT COMPILED BY ME. You could even get your own link in the first post! Apply now!
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 1st November 2007, 09:23   #170  |  Link
Kurtnoise
Swallowed in the Sea
 
Kurtnoise's Avatar
 
Join Date: Oct 2002
Location: Aix-en-Provence, France
Posts: 5,191
@Wilbert: Done... but not tested.

@Myrsloik: why using FLAC as external lib ? FFmpeg has his own FLAC decoder...

Last edited by Kurtnoise; 1st November 2007 at 11:01.
Kurtnoise is offline   Reply With Quote
Old 1st November 2007, 11:13   #171  |  Link
Leak
ffdshow/AviSynth wrangler
 
Leak's Avatar
 
Join Date: Feb 2003
Location: Austria
Posts: 2,441
Quote:
Originally Posted by Kurtnoise13 View Post
@Myrsloik: why using FLAC as external lib ? FFmpeg has his own FLAC decoder...
I was under the impression he also needed a FLAC encoder for the audio cache - does ffmpeg do FLAC encoding as well?

np: Prefuse-73 - Every Party Has A Winner And A Loser (Unrest)
__________________
now playing: [artist] - [track] ([album])
Leak is offline   Reply With Quote
Old 1st November 2007, 11:55   #172  |  Link
Kurtnoise
Swallowed in the Sea
 
Kurtnoise's Avatar
 
Join Date: Oct 2002
Location: Aix-en-Provence, France
Posts: 5,191
Quote:
Originally Posted by Leak View Post
I was under the impression he also needed a FLAC encoder for the audio cache - does ffmpeg do FLAC encoding as well?
yes it does...
Kurtnoise is offline   Reply With Quote
Old 1st November 2007, 22:16   #173  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
@Kurtnoise13,

http://rapidshare.com/files/66801815...mples.zip.html contains some samples: AAC, MP4/AAC and MLP.

The AAC, MP4/AAC played, but the sound was a bit garbled.

The MLP (44.1 kHz, 16 bit) didn't play at all, it gave the error: 'Audio decoding error'. Script:
Code:
v = BlankClip()
a = FFmpegSource("D:\Install\dvd-audio\TheCorrs\DVDAExplorer\Acapela1.mlp", vtrack=-2, atrack=-1)
AudioDub(v,a)
http://lists.mplayerhq.hu/pipermail/...er/036639.html contains a raw-mlp support patch. I don't know whether that was included in your patch? (Perhaps related, perhaps not )
Wilbert is offline   Reply With Quote
Old 2nd November 2007, 00:33   #174  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
The reason is very simple, I'm lazy.

Actually libflac has a nice api that allows sample accurate seeking all the time and is extremely simple to use. With libavformat seeking is much less fun and where you end up is usually a bit uncertain (if it wasn't, someone else probably would've made ffmpegsource before me).
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 2nd November 2007, 14:45   #175  |  Link
Kurtnoise
Swallowed in the Sea
 
Kurtnoise's Avatar
 
Join Date: Oct 2002
Location: Aix-en-Provence, France
Posts: 5,191
Quote:
Originally Posted by Wilbert View Post
I don't know whether that was included in your patch? (Perhaps related, perhaps not )
Yes, you're right. I forgot this. New build uploaded. Should be fine now...

About aac multichannel files, dunno why it doesn't work properly actually...I'll try something else later.
Kurtnoise is offline   Reply With Quote
Old 2nd November 2007, 22:37   #176  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
Quote:
Yes, you're right. I forgot this. New build uploaded. Should be fine now...
It works, i'm so excited!!!!!!!! Thanks you very much!

One additional request though 24 bit stuff is reported as 16 by AviSynth. I'm not sure whether it is converted to 16 bit down the road, or if the patch doesn't support 24 bit. I got an example here:

http://rapidshare.com/files/67023394...ples2.zip.html

Perhaps you can look at it. If the patch doesn't support it, i will contact Ian Caulfield.
Wilbert is offline   Reply With Quote
Old 2nd November 2007, 22:49   #177  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
From avcodec.h:
Code:
/* Currently unused, may be used if 24/32 bits samples are ever supported. */
/* all in native-endian format */
enum SampleFormat {
    SAMPLE_FMT_NONE = -1,
    SAMPLE_FMT_U8,              ///< unsigned 8 bits
    SAMPLE_FMT_S16,             ///< signed 16 bits
    SAMPLE_FMT_S24,             ///< signed 24 bits
    SAMPLE_FMT_S32,             ///< signed 32 bits
    SAMPLE_FMT_FLT,             ///< float
};
Further down...
Code:
    /**
     * audio sample format
     * - encoding: Set by user.
     * - decoding: Set by libavcodec.
     */
    enum SampleFormat sample_fmt;  ///< sample format, currently unused
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 2nd November 2007, 23:11   #178  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
That sounds bad. Does that mean that outputting 24 bit is still not supported in ffmpeg?
Wilbert is offline   Reply With Quote
Old 3rd November 2007, 01:36   #179  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
Quote:
Originally Posted by Wilbert View Post
That sounds bad. Does that mean that
outputting 24 bit is still not supported in ffmpeg?
Yep, ffmpeg convert anything to 16 bit and preserve the original channel mapping (of course the ac3/aac multichannel conversions are wrong channel mapped).

I think we need preserve the original precision (bitdepth) and use a standard channel mapping for decoder-encoder compatibility.

Wilbert, don't know this thread?
Justin answer about ffmeg bitdepth and multichannel behaviour, there are also a solution to work with NeroAacEnc stdin requested by you in other thread.

Last edited by tebasuna51; 3rd November 2007 at 01:44.
tebasuna51 is offline   Reply With Quote
Old 3rd November 2007, 09:11   #180  |  Link
Kurtnoise
Swallowed in the Sea
 
Kurtnoise's Avatar
 
Join Date: Oct 2002
Location: Aix-en-Provence, France
Posts: 5,191
From mlp_parser.c :

Code:
#ifdef CONFIG_AUDIO_NONSHORT
        avctx->bits_per_sample = mh.group1_bits;
        if (avctx->bits_per_sample > 16)
            avctx->sample_fmt = SAMPLE_FMT_S32;
#endif

Last edited by Kurtnoise; 3rd November 2007 at 09:14.
Kurtnoise 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 14:40.


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