vlc --audio-track 1 --sub-track 2 test_svcd_pal.bin
vlc --audio-track 1 --sub-track 2 test_svcd_pal.bin
— corresponds to audio-track 2 and sub-track 3 from GUI, i.e., -1 from GUI to use on command line
vlc --audio-track 1 --sub-track 2 avseq01_pal.mpg
From VideoLAN wiki
The VLC Streaming-Howto document is the current complete guide to the VideoLAN streaming solution. Further details and examples are going to be added here soon.
Format a file into a .mpg, mpeg ps encapsulation, mp2v video [4 mbps].
For audio, mp2a 2-channel 192K works well. If you need more channels, use a52 and increase the bitrate; budget 64 or 96K/channel (2 channels 192K, 6 channel 384K,…
A DVD format file should be 720x480 resolution for NTSC (US), or 720x586 resolution for PAL.
Set the —sout-transcode-fps to match your target, using 30 for NTSC, 25 for PAL.
Set the —sout-ffmpeg-keyint to 16 (possibly not needed, but I use this and it works)
Use the —aspect-ratio switch to control things. For instance, a Webcam or framegrabber with 640x480 or 320x240 resolution has an —aspect-ratio of 4:3. You need to specify this so that the transcoding doesn't make the output video "fat", stretch things to fit the wider DVD width. Standard DVD "letterbox" has an aspect ratio of 16:9.
Here is a sample, in Windows. The .asf source movie is 640x480 frame grabber.
vlc C:\Movies\DiveModules1to3_2Mbps.asf —sout=#transcodemp2v,vb=4096,scale=1,acodec=mp2a,ab=192,channels=2:duplicatestd{access=file,mux=ps,url="C:\TEMP\Dive1_3_out.mpg"} —aspect-ratio "4:3" —sout-transcode-width 720 —sout-transcode-height 480 —sout-transcode-fps 30 —sout-ffmpeg-keyint 16
For Windows, working free tools are DVDHive and CDBurnerXP Pro. These tools are available at:
Download and install both apps.
Launch DVD Hive
[…]
"Write Disc" — click it, and the image will be burned.
documented on: 2005.04.11
Something like that :
transcode -z -i /dev/video0 -p /dev/dsp -x v4l,v4l --import_v4l "0,France 2" -c 0-00:30:00 -y xvid -o record.xvid
You can use the vlc release provided by the DebianPackage:vlc in the Debian unstable.
server command line :
vlc -vvv v4l:/dev/video0:norm=secam:frequency=543250:size=320x240:channel=0:adev=/dev/dsp:audio=0 --sout '#transcode{vcodec=mp4v,acodec=mpga,vb=3000,ab=256,vt=800000,keyint=80,deinterlace}:std{access=udp,mux=ts,url=192.168.0.2}' --ttl 1
To be able to change the tv channel, use several v4l: urls in the command line with the needed frequencies and select your channel in the vlc playlist.
You can use the vlc httpd interface to change the channel remotely.
client command line :
vlc -vvv udp://
Links
Stream from an acquisition card or a webcam Transcode
This document describes how to use the complete VideoLAN streaming solution.
v2.0, 2003-09-04
Table of Contents 1. Introduction
1.1. What is the VideoLAN project ? 1.2. What is a codec ? 1.3. How can I use VideoLAN ? 1.4. Command line usage
Install the required software and hardware
2.1. Install VLC 2.2. Install VLS
Receive and save a stream
3.1. Receive a stream with VLC 3.2. Save a stream with VLC 3.3. Receive a stream with a set-top-box
Stream a file
4.1. Stream a file with VLC 4.2. Stream a file with VLS
Stream a DVD
5.1. Stream a DVD with VLC 5.2. Stream a DVD with VLS
Stream a DVB channel (satellite or digital terrestial TV)
6.1. Install the DVB drivers 6.2. Stream with VLS 6.3. Stream with VLC
Stream from an MPEG encoding card
7.1. Stream with the Hauppauge WinTV-PVR-250 card 7.2. Stream with the Visiontech Kfir card
Stream from an acquisition card or a webcam
8.1. Install the Video for Linux drivers 8.2. Stream with VLC 8.3. Stream with VLS
Advanced use of VLC's stream output (transcoding, multiple streaming, etc…)
9.1. The syntax 9.2. Examples
VLC can save the stream to the disk. In order to do this, use the Stream Output of VLC : you can do it via the graphical interface, or you can add to the command line the following argument : —sout file/muxer:stream.xyz
where :
muxer is one of the formats supported by VLC's stream output, i.e. :
+ avi for AVI format ,
+ ogg for OGG format ,
+ ps for MPEG2-PS format ,
+ ts or ts_dvbpsi for MPEG2-PS format (the latter uses libdvbpsi for the task) .
and stream.xyz is the name of the file you want to save the stream to, with the right extension.
VLS can stream MPEG files that meet two critera :
the file must be MPEG PS (Program Stream) or MPEG TS (Transport Stream), that contain video and audio multiplexed. VLS cannot stream MPEG ES (Elementary Stream), i.e. a file with only audio or video .
In order to know if an MPEG file is MPEG PS, MPEG TS or MPEG ES, read the file with VLC and look at the messages (select in the menu View / Messages, or use the command line vlc -vvv) .
Transcode the input stream and send it to a multicast IP address with the associated SAP announce :
% vlc -vvv input_stream --sout '#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128,deinterlace}:standard{access=udp,mux=ts,url=239.255.12.42,sap=TestStream}'
Display the input stream, transcode it and send it to a multicast IP address with the associated SAP announce :
% vlc -vvv input_stream --sout '#duplicate{dst=display,dst="transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128,deinterlace}:standard{access=udp,mux=ts,url=239.255.12.42,sap=TestStream}"}'
Transcode the input stream, display the transcoded stream and send it to a multicast IP address with the associated SAP announce :
% vlc -vvv input_stream --sout '#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128,deinterlace}:duplicate{dst=display,dst=standard{access=udp,mux=ts,url=239.255.12.42,sap=TestStream}}'
Introduction
What is the VideoLAN project ? What is a codec ? How can I use VideoLAN ? Command line usage
Modules and options for VLC
The modules Access modules Demuxers Codec modules Video outputs Video filters modules Audio outputs Interface modules OS support modules Miscellaneous Compilation Options
Installing VLC
Installing VLC Uninstalling VLC
The command line interface
Introduction Opening streams Modules selection Stream Output Other Options
The HTTP interface
Introduction The RPN evaluator The macros
Other interfaces
Graphical user interfaces Control Interfaces
The Mozilla plugin
Install the plugin Build HTML pages that use the plugin
VLC tries to select the most appropriate interface, input and output modules, among the ones available on the system, according to the stream it is given to read. However, you may wish to force the use of a specific module with the following options (for the complete list of modules, see the Modules and options for VLCmodules section) :
--intf <module> allows you to select the interface module.
--extraintf <module> allows you to select extra interface modules that will be launched in addition to the main one.
--aout <module> allows you to select the audio output module.
--vout <module> allows you to select the video output module.
--filter <module> allows you to add a video filter module.
--memcpy <module> allows you to choose a memory copy module.
the stream output has a powerful architecture that uses modules. Each module has capabilities, and you can chain the modules to enhance the possibilities.
Here is the list of the modules currently available:
standard "sends" the stream via an access output module: for example, UDP, file, HTTP, … You will probably want to use this module at the end of your chains.
transcode allows you to transcode the audio and the video of the input stream "on the fly" (if your computer is powerful enough).
duplicate allows you to create a second chain, where the stream will be handled in an independant way.
display allows you to display the input stream, as VLC would normally do. Used with the duplicate module, this allows you to view the stream as you send it.
rtp streams over RTP (one UDP port for each elementary stream).
es allows you to make separate Elementary Streams (ES) out of an input stream.
Each of these modules may take options. Here is the syntax that you must use:
% vlc input_stream --sout '#module1{option1=...,option2=...}:module2{option1=...,option2=...}:...'
For example, to transcode a stream and send it, use:
% vlc input_stream --sout '#transcode{options}:standard{options}'
standard (alias std)
Sends a stream.
Options:
access: how to send: file, udp, rtp, http.
mux: which muxer (ie, which format) will be used. It can be one of avi (for AVI format) ogg (for OGG format) ps (for MPEG2-PS format) ts (for MPEG2-TS format).
url: if you use the file access, it will be the location where to store the stream; if you use another access, it will be the unicast or multicast IP address where you want to stream.
transcode
Changes the codec and/or bitrates for a stream.
Options:
acodec: the new audio codec. It can be one of mpga (MPEG audio layer 2), a52 or ac3 (AC3 sound) or vorb (Vorbis).
ab: audio bitrate in Kbps.
vcodec: the new video codec. It can be one of mp4v (MPEG4), mpgv (MPEG1), DIV1, DIV2, DIV3 (DivX 1,2,3), H263 (H263), I263 (H263I), WMV1 or WMV2 (Windows Media Video 1 or 2), MJPG (MJPEG), MJPB (MJPEGB).
width: video width.
height: video height.
vb: video bitrate in kbps.
vt: video bitrate tolerance in bps.
deinterlace: deinterlace the stream.
croptop: number of pixels removed from the top of the video.
cropbottom: number of pixel removed from the bottom of the video.
cropleft: number of pixels removed from the left of the video.
cropright: number of pixels removed from the right of the video.
hq: high quality transcoding (uses more CPU).
qmin: minimum video quantiser scale (VBR)
qmax: maximum video quantiser scale (VBR).
--noaudio disables audio output. --mono forces VLC to treat the stream in mono audio. --volume <integer> sets the level of audio output. --aout-rate <integer> sets the audio output frequency (Hz). --desync <integer> compensates desynchronization of audio (ms). --headphone activates headphone virtual spatialization effect. --headphone-dim sets headphone characteristic dimension.
--novideo disables video output. --greyscale turns video output into greyscale mode. --fullscreen sets fullscreen video. --nooverlay disables hardware acceleration for the video output. --width, --height <integer> sets the video window dimensions. --zoom <float> adds a zoom factor. --aspect-ratio <mode> forces source aspect ratio. --spumargin <integer> forces SPU subtitles postion.
Extraction, Insertion, & Streaming Support (http://www.dealdatabase.com/ forum/forumdisplay.php?f=48)
stealthdave 04-07-2005
Now that we have some fantastic ty and vstream modules for VLC (thanks, Neal!), we can now use vlc to give us an mpeg fit for DVD, VCD and SVCD use!
To convert a ty stream from the tivo via vstream, first download and install the ty and vstream modules for vlc on your platform. (Currently Win32, Mac OS X, and Linux x86 binaries are available, as well as source code.) Next, open a command prompt use the following command:
$ vlc -I rc tivo://tivo/123456 ':sout=#transcode {acodec=mpga,ab=224,samplerate=48000}:std {access=file,mux=ps,url=stream.mpg}' vlc:quit
The #transcode part is the key. This example will give you a nice, standard mpeg-II audio track at 224kbps and a DVD-friendly 48kHz sample rate. For (S)VCD, you'll want to change that to ab=192,samplerate=44100. Want a nice AC3 stream? No problem! Use a52,ab=384,samplerate=48000. If you don't want to do any transcoding, just use 'sout:stdfile…'.
To break it down:
the "-I rc" tells vlc to use the "remote control" interface, but really all we want to do is not start the gui.
tivo://tivo/123456 is the link to the stream you want to convert. If you don't have vstream, you can load a ty file (your program.ty) or possibly even use an mfs ftp link as well (ftp://tivo:3105/ty/123456.ty for example; this is untested).
The "sout:#…" line tells vlc what to do with the stream, and it's important to keep this line in quotes.
o transcode tells vlc how to convert the audio (or video if desired) o std (or 'standard') tells vlc what to do with the stream, in this case save it to a file
"vlc:quit" tells vlc to, well, quit. :)
You can even do full transcoding by specifying a video codec, ala vcodec=xvid,vb=800 (don't forget to change the muxer, too). This will obviously take a lot more processor time, though, whereas just transcoding the audio is pretty easy stuff for most pcs. For more transcoding options, check out http://www.videolan.org.
Note for Mac OS X users: To use vlc from the command-line, you need to use the file that is burried within VLC.app. If you have VLC in your main Applications folder, your command-line will look like this:
$ /Applications/VLC.app/Contents/MacOS/VLC -I rc test.ty ':sout=#transcode {acodec=mpga,ab=224,samplerate=48000}:std {access=file,mux=ps,url=stream.mpg}' vlc:quit
Now you can extract and convert streams to mpeg on the Mac! Thanks to tx413 for not only creating the necessary vlc modules, but also the idea to use vlc for converting the streams to standard mpegs with transcoded audio. My next project will be to create a java-based gui so that you can point-and- click extract your programs on any platform supporting Java and VLC.
Stealth Dave
lgkahn 04-08-2005 11:42 PM
I figured out what was wrong your post is wrong on post 1 of this thread.. it is missing the /ty
the command should be this:
start /wait vlc -I rc tivo/ty://tivo1/187343 ":sout=#transcode {acodec=mpga,ab=224,samplerate=48000}:std {access=file,mux=ps,url=godfatheriii.mpg}" vlc:quit
not
start /wait vlc -I rc tivo//tivo1/187343 ":sout=#transcode {acodec=mpga,ab=224,samplerate=48000}:std {access=file,mux=ps,url=godfatheriii.mpg}" vlc:quit
then it works fine
Newsgroups: gmane.comp.video.videolan.vlc.general Date: 2004-07-26
> > When I do : > > > > vlc -v -I rc --sout="#transcode{vcodec=theo,vb=512,scale=0.5,acodec=vorb,ab=64,channels=2}:duplicate{dst=std{access=file,mux=ogg,url=\"out.ogg\"}}" "my.avi" vlc:quit > > > > It runs along creating a nice big ogg file, but at completion, that file > > gets set to size 0 :(. > > vlc:quit is a playlist item like another one so the global --sout option > applies to it as well, thus overwritting your previous file. > What you want is to use "sout" as an input option by using ":sout=" instead > of "--sout=", and moving the option just after your first input (input > options apply to the input/playlist item preceding them). > Most global options (vlc -H --advanced) that have an effect on > inputs/playlist items can also be used as input options.
Hi Gildas,
Just reporting that your instruction was the answer. Transcoded file remains :).
FYI I used :
vlc -v -I rc "in.avi" ":sout=#transcode{vcodec=theo,vb=512,scale=0.5,acodec=vorb,ab=64,channels=2}:std{access=file,mux=ogg,url=\"my.ogg\"}" vlc:quit
thanks,
James B. MacLean
In the MPEG-2 standard, there are two types of audio video synchronization, TS and PS. TS is Transport Stream which are aimed for communication and broadcasting applications. PS is Program Stream which can be used for storage applications such as DVD. Therefore, it is recommended to select each type according to application and playback specifications.
VLS can stream MPEG files that meet two critera :
the file must be MPEG PS (Program Stream) or MPEG TS (Transport Stream), that contain video and audio multiplexed. VLS cannot stream MPEG ES (Elementary Stream), i.e. a file with only audio or video .
In order to know if an MPEG file is MPEG PS, MPEG TS or MPEG ES, read the file with VLC and look at the messages (select in the menu View / Messages, or use the command line vlc -vvv) .
If you see a line :
[00000107] main module debug: using demux module "ts_dvbpsi"
it means the file is MPEG TS .
If you see a line :
[00000109] main module debug: using demux module "ps"
it means the file is MPEG PS .
If you see a line :
[00000109] main module debug: using demux module "es"
it means the file is MPEG ES, VLS can't stream it. .
the sequence header of the video must repeat itself regularly, which is often the case with MPEG-2, but very rare with MPEG-1. There is no easy way to know if the sequence header is repeated regularly. Files with a .vob extension are normally MPEG-2 files and files with .mpg or .mpeg extension or usually MPEG-1 files .
You can download this streamable MPEG-2 PS file for your tests : presentation_short.vob .