Page 1 of 1

Explicitly specify input format for conversion

Posted: 11 Mar 2011 21:21
by tyblc
I have a system generating media files without file name extensions. They come in different formats and all need to be converted to mp3.

VLC does not manage to always recognize the input file format correctly. It will sometimes crash or work endlessly and never quit. If I rename the file to include the correct extension (e.g. .aac) VLC will behave better, but since the files are generated, managed and registered externally, I would like to not rename them if possible.

Is it possible to specify the input format as a parameter; or is the file name the only way to specify this? I think there must be a way of specifying this because for streams, there is no file name associated with them.

I use following snippet to convert:

Code: Select all

vlc.exe --intf dummy file "--sout=#transcode{acodec=mp3,ab=96,channels=1,samplerate=22050}:duplicate{dst=std{access=file,mux=raw,dst=outfile.mp3}}" vlc://quit
Also, is it possible to not have to specify the sample rate in the transcode statement and let VLC know that it should take the same sample rate as the input. If I don't specify a sample rate, it will say "Failed to find conversion filter for resampling".

Re: Explicitly specify input format for conversion

Posted: 13 Mar 2011 16:39
by Jean-Baptiste Kempf
Use --demux option