Alfs Kurmis | 1 Feb 04:37
Picon
Favicon

Re: [LAD] Mplayer (ffmpeg) decode to stdout

Tnx Robin
ffmpeg also works excellent as decoer.
With   ffmpeg -i /some/file -f u16le  -ar 44100 | myprog ...
i gotta horrable sound. Probably U mean  -f s16le !
 
So, i have rewrited my olde 2-fork mpg123 mixer as 1-fork ffmpeg "frontend"
http://martini.pudele.com/radio/programming/audio/ffmpegdec02.c
fundamentally without any changes, except
 #define PLAYER_BIN "/usr/bin/ffmpeg"
   execlp(PLAYER_BIN,PLAYER_BIN, "-i", mxk.trknamep, "-f", "s16le", "-ar","44100", "-v","0" ,"-", NULL);
 
Any loud output messages i drain out simple with close(2); after fork();
So far everything is OK, if i decode whole files.
 
It seems that ffmpeg during da decoding set terminal in canonical mode.
If i decode only part of file, and kill() em <at> middle of decoding,
ffmpeg does not restore normal terminal mode , and i do not see commands which i type.
Then helps (blind typed) command "reset".
I tried send several signals with kill() SIGKILL 2 SIGTSTP SIGQUIT SIGINT 15 ..., 
but none of em has handler for terminal restore.
 
I fixed this behavior with 
#include <termios.h>
struct termios tsave;   /*  ! ! ! F-king ffmpeg ! ! ! */
/* sets canonical input mode */
/*----*/void save_terminal(void)
/*----*/{ struct termios tbuf;
/*----*/  tcgetattr(0,&tbuf);
/*----*/  tsave=tbuf;
/*----*/}
 
/* restore the settings */
/*----*/void restore_terminal(void)
/*----*/{  tcsetattr(0,TCSANOW,&tsave);  }
 
I have tried close(0); where 0=stdin , after fork(); but program has frozen.
 
How do i decouple childs stdin from terminal or redirect em from /dev/null ?
 
 
Tnx in advance <at> all
 


That's probably why mplayer devs recommend using mkfifo (named pipe)
instead of stdout.. 'mencoder' can do it.

If you need to support a variety of unknown formats and codecs: ffmpeg
is an alternative and gstreamer might be one.

ffmpeg -i /some/file -f u16le -acodec pcm_s16le -ar 44100 - \
| jack-stdin system:playback_1 system:playback_2

on that note, `jack-stdout` can capture and pipe raw PCM data from any
JACK-application including `mplayer -ao jack /some/file`. YMMV.

HTH,
robin






----
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@...
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Robin Gareus | 1 Feb 17:02
Favicon
Gravatar

Re: [LAD] Mplayer (ffmpeg) decode to stdout

On 02/01/2012 04:29 AM, Alfs Kurmis wrote:
> 
> Tnx Robin
> ffmpeg also works excellent as decoer.
> With ffmpeg -i /some/file -f u16le -ar 44100 | myprog ...
> i gotta horrable sound. Probably U mean -f s16le !

Well, yes.
It does actually not make a difference if you also specify the
audio-codec (-acodec pcm_s16le). The format is the same for both.

[..]

> It seems that ffmpeg during da decoding set terminal in canonical mode.

There's some (undocumented) feature: pass '-d' as first argument to
ffmpeg. That makes ffmpeg shut up and not touch termios; it still works
with writing data to stdout:

 ffmpeg -d -i /some/file -f s16le -c 2 -ar 44100 pipe: | ...

kill -TERM `pidof ffmpeg`

HTH,
robin
Albert Graef | 2 Feb 01:59
Picon
Favicon

Re: [LAD] [LAA] ANN: faust-lv2 0.1 released

On 02/01/2012 12:16 PM, rosea.grammostola wrote:
> Interesting. Would be nice if you could use SuperCollider code (synths)
> as LV2 plugins too. Or is it naive to think that such a LV2 plugin
> (supercollider-lv2) would make much more sofsynths available for the
> linux platform?

That's certainly possible. But the synthdefs are only part of the story. 
Many SC instruments are highly customized and dynamic networks of signal 
processing components driven by sclang code. I'm not sure how you would 
map those to standalone components in an LV2-based environment where 
audio and control ports are (mostly) static.

Albert

--

-- 
Dr. Albert Gr"af
Dept. of Music-Informatics, University of Mainz, Germany
Email:  Dr.Graef@..., ag@...
WWW:    http://www.musikinformatik.uni-mainz.de/ag
Paul Winkler | 2 Feb 18:33
Favicon

[LAD] Idea for delay plugin authors...

It would be cool if somebody implemented this in a delay plugin UI:
https://groups.google.com/group/rec.audio.pro/browse_frm/thread/ffcc5332e2716ac3

--

-- 

Paul Winkler
Julius Smith | 3 Feb 04:59
Picon
Gravatar

Re: [LAD] [LAA] ANN: faust-lv2 0.1 released

I find SuperCollider SynthDefs to be a rich source of useful new
patches, but I always rewrite them in Faust for compatibility with
everything else.  The code usually looks very similar (because I write
Faust versions of the SC primitives used).  An interesting recent
example is the Risset bell, which started out as a Pd patch (surely
Max before that), then SuperCollider, and now Faust, which can be
compiled for any of the above. - jos

On Wed, Feb 1, 2012 at 4:59 PM, Albert Graef <Dr.Graef@...> wrote:
> On 02/01/2012 12:16 PM, rosea.grammostola wrote:
>>
>> Interesting. Would be nice if you could use SuperCollider code (synths)
>> as LV2 plugins too. Or is it naive to think that such a LV2 plugin
>> (supercollider-lv2) would make much more sofsynths available for the
>> linux platform?
>
>
> That's certainly possible. But the synthdefs are only part of the story.
> Many SC instruments are highly customized and dynamic networks of signal
> processing components driven by sclang code. I'm not sure how you would map
> those to standalone components in an LV2-based environment where audio and
> control ports are (mostly) static.
>
>
> Albert
>
> --
> Dr. Albert Gr"af
> Dept. of Music-Informatics, University of Mainz, Germany
> Email:  Dr.Graef@..., ag@...
> WWW:    http://www.musikinformatik.uni-mainz.de/ag
> _______________________________________________
> Linux-audio-dev mailing list
> Linux-audio-dev@...
> http://lists.linuxaudio.org/listinfo/linux-audio-dev

--

-- 
"Anybody who knows all about nothing knows everything" -- Leonard Susskind
Renato | 3 Feb 14:37
Picon
Gravatar

[LAD] basic g++ compiling of faust programs

Hi, just started looking into faust and I've got a very basic question.
I'm getting this error:

$ g++ -L/usr/lib/faust simple.cpp -o simple
simple.cpp:46:21: fatal error: gui/FUI.h: No such file or directory
compilation terminated.

where simple.cpp was generated by:
$ faust -a jack-qt.cpp simple.dsp -o simple.cpp

what am I missing? I also tried without the -L option or with -lFUI,
same error. FUI.h is indeed in /usr/lib/faust/gui/

best regards, 
renato
hermann | 3 Feb 14:54
Picon
Gravatar

Re: [LAD] basic g++ compiling of faust programs

Am Freitag, den 03.02.2012, 14:37 +0100 schrieb Renato:
> Hi, just started looking into faust and I've got a very basic question.
> I'm getting this error:
> 
> $ g++ -L/usr/lib/faust simple.cpp -o simple
> simple.cpp:46:21: fatal error: gui/FUI.h: No such file or directory
> compilation terminated.

you must include the path to faust lib also with -I$(LIB)/faust/
were $(LIB) is either /usr/local or /usr, depends on your install path.

When you use the makefile in the example directory, and have installed
faust into usr/ instead into usr/local, you must edit the makefile and
add
LIB := /usr/lib

at the end of the LIB definitions, here I put it into line 8.

greets
hermann

> 
> where simple.cpp was generated by:
> $ faust -a jack-qt.cpp simple.dsp -o simple.cpp
> 
> what am I missing? I also tried without the -L option or with -lFUI,
> same error. FUI.h is indeed in /usr/lib/faust/gui/
> 
> best regards, 
> renato
> _______________________________________________
> Linux-audio-dev mailing list
> Linux-audio-dev@...
> http://lists.linuxaudio.org/listinfo/linux-audio-dev
hermann | 3 Feb 15:13
Picon
Gravatar

Re: [LAD] basic g++ compiling of faust programs

Am Freitag, den 03.02.2012, 14:54 +0100 schrieb hermann:
> Am Freitag, den 03.02.2012, 14:37 +0100 schrieb Renato:
> > Hi, just started looking into faust and I've got a very basic question.
> > I'm getting this error:
> > 
> > $ g++ -L/usr/lib/faust simple.cpp -o simple
> > simple.cpp:46:21: fatal error: gui/FUI.h: No such file or directory
> > compilation terminated.
> 
> you must include the path to faust lib also with -I$(LIB)/faust/
> were $(LIB) is either /usr/local or /usr, depends on your install path.
> 

sorry, I mean /usr/local/lib or /usr/lib

:-)

> When you use the makefile in the example directory, and have installed
> faust into usr/ instead into usr/local, you must edit the makefile and
> add
> LIB := /usr/lib
> 
> at the end of the LIB definitions, here I put it into line 8.
> 
> greets
> hermann
>  
> > 
> > where simple.cpp was generated by:
> > $ faust -a jack-qt.cpp simple.dsp -o simple.cpp
> > 
> > what am I missing? I also tried without the -L option or with -lFUI,
> > same error. FUI.h is indeed in /usr/lib/faust/gui/
> > 
> > best regards, 
> > renato
> > _______________________________________________
> > Linux-audio-dev mailing list
> > Linux-audio-dev@...
> > http://lists.linuxaudio.org/listinfo/linux-audio-dev
> 
> 
> 
> _______________________________________________
> Linux-audio-dev mailing list
> Linux-audio-dev@...
> http://lists.linuxaudio.org/listinfo/linux-audio-dev
Renato Budinich | 3 Feb 15:17
Picon
Gravatar

[LAD] Fwd: Re: basic g++ compiling of faust programs

Forgot to send to list also:

On Fri, 3 Feb 2012 14:48:37 +0100
Nick Copeland <nickycopeland-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote:

>
> You probably need something like -I/usr/lib/faust which will give you
> the final path of /usr/lib/faust/gui/FUI.h, you might also want to
> try -I. if the headerfiles are also in $CWD/gui Either way, I am not
> certain you would find it with -L/-l (upper/lower case) sinceit looks
> like an include file rather than a library.
>

ok, it seems it gets past that but I get another error:

$ g++ -I/usr/lib/faust -o simple simple.cpp
In file included from simple.cpp:48:0:
/usr/lib/faust/gui/faustqt.h:34:24: fatal error: QApplication: No such file or directory
compilation terminated.

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@...
http://lists.linuxaudio.org/listinfo/linux-audio-dev
hermann | 3 Feb 15:30
Picon
Gravatar

Re: [LAD] Fwd: Re: basic g++ compiling of faust programs

Am Freitag, den 03.02.2012, 15:17 +0100 schrieb Renato Budinich:
> Forgot to send to list also:
> 
> On Fri, 3 Feb 2012 14:48:37 +0100
> Nick Copeland <nickycopeland@...> wrote:
> 
> >
> > You probably need something like -I/usr/lib/faust which will give
> you
> > the final path of /usr/lib/faust/gui/FUI.h, you might also want to
> > try -I. if the headerfiles are also in $CWD/gui Either way, I am not
> > certain you would find it with -L/-l (upper/lower case) sinceit
> looks
> > like an include file rather than a library.
> >
> 
> ok, it seems it gets past that but I get another error:
> 
> $ g++ -I/usr/lib/faust -o simple simple.cpp
> In file included from simple.cpp:48:0:
> /usr/lib/faust/gui/faustqt.h:34:24: fatal error: QApplication: No such
> file or directory
> compilation terminated.
> 

$ locate QApplication
/usr/include/qt4/QtGui/QApplication

-I/usr/include/qt4/QtGui/

Gmane