📄 iso13818ts.1
字号:
then for each program one line of description andfor each stream within that program another line is printed.When \fInum\fR=2, then for each descriptor there is printed one more line.The following values are compiled:.RS.TP\fIprogs\fRNumber of programs in target stream..TP\fIprog\fRProgram number within target stream..TP\fIpmt\fRPMT PID for the program..TP\fIpcr\fRPCR PID for the program..TP\fIstreams\fRNumber of streams in the program.A number in parantheses may be added that denotes how many of thesestreams are not PES data streams, but have been added by use of the\fB\-\-sipid\fR option to the PMT..TP\fIstream\fRStream PID..TP\fItype\fRStream type (according to ISO 13818-1 table 2-29)..TP\fIsid\fRPES stream ID..TP\fIfile\fRSource file contents type (PES=0, PS=1, TS=2)..TP\fIsource\fRStream index in source file (SID for PS, PID for TS)..TP\fInum\fRSource file reference number (-1 if none)..TP\fIname\fRSource file name..TP\fIdescr\fRDescriptor tag..TP\fIlen\fRDescriptor length, number of data bytes in the descriptor..TP\fIdata\fRDescriptor data, bytewise..RE.TP\fB\-S\fR, \fB\-\-statistics\fR \fItime\fROrder output load statistics to be generated about every\fItime\fR msec.Switch off with \fItime\fR=0.The statistics are written to \fIstderr\fR linewise,the following values are calculated:.RS.TP\fInow\fRInternal clock in msec..TP\fIout\fRNumber of bytes written to stdout since last statistics,and number of write operations needed..TP\fIbuf\fRNumber of bytes in the output buffers (lower and upper bound)..TP\fItime\fRTime in msec, for how long the contents of theoutput buffers should suffice (lower and upper bound)..TP\fIburst\fRSize of write burst, i.e. number of bytes prepared tobe written in a single write operation (lower and upper bound)..RE.TP\fB\-\-badtiming\fRIn conjunction with a program stream originating from a DVB-sdigital TV receiver card, You might want to automaticallycorrect broken PCR values produced by that card, toavoid discontinuities in the output..TP\fB\-\-conservativepids\fR [\fInum\fR]Though PIDs are only of significance to internally linkelementary streams in a transport stream, for test purposesit might be desired to keep PIDs across multiplexing(range 0..1, default is 1, initial is 0)..SH OVERVIEWThe multiplexer is designed to run uninterrupted andbe controlled via \fIstdin\fR and \fIstderr\fR.It is designed to process data in real time,i.e. if the processing is not performed fastenough (e.g. because of low system performance),errors in the resulting data may occur, namelyconcerning the timing.The multiplexer may be invoked interactively withthe streams to process given as command line optionsor with the commands to be processed typed into\fIstdin\fR during operation.The latter type of usage is also designed for usewith an user interface front-end, that maytranslate some GUI input to iso13818ts commandsand filter its responses to be presented to the useras appropriate..PThree different types of input are supported:Paketized elementary streams (PES),Program streams (PS),Transport streams (TS)..PNumeric parameters may be given in decimal (e.g. 31)or in hex (e.g. 0x1F)..SH DETAILSThe output file or device does not change throughout thetime the program runs. The input files, however, may vary.Also the contents of an input file may vary, but not itstype. E.g., a file opened as program stream must containvalid program stream data up to its end (and includingany files that are appended to this file with \fB\-\-append\fR)..PAll basic PSI is evaluated contiguously, and changes inthe configuration (changing PID, etc.) are taken intoaccount and tracked. Thus a stream should not get lostsimply because its PID is changed in the middle of thebroadcast..PWhen remultiplexing a transport stream, the user cannotrely on the original PIDs to be the same in the output stream.Usually output PIDs are different from input PIDs.This is because all basic PSI is composed from scratch for theoutput stream, with exception of the descriptors.These are not evaluated but only copied and reusedas appropriate..PFor each output program one stream within this programmust contain PCR time stamps. The strategy in selectingwhich stream shall carry the PCR is, first see if thereis one input stream that contains PCR, if none is found,use the stream for which data packets are found first.Note, that for a simple mono TV program this is notnecessarily the video stream..PWhen using the command \fB\-\-si\fR,PID collisions may occur with source stream PIDsas well as with target stream PIDs..brFor source collisions, data streams win,i.e. if a packet is encountered,that matches the PAT and PMT description of the input fileas well as the range given by \fB\-\-si\fR,the latter match is ignored and the packet isprocessed as PES data packet(or PMT packet, if appropriate)..brFor target collisions, the \fB\-\-si\fR range wins,i.e. the attempt is made not to assign PIDs totarget data streams (or PMT streams),that are covered by a range given by \fB\-\-si\fR.If this attempt fails, e.g. because the full rangewas given with \fI\-\-si 0x0010 0x1FFE\fR,the potential collision is accepted, because thereis no easy algorithm to get around it.Instead, the user should avoid covering the full rangewith \fB\-\-si\fR and preferredly only state thosePIDs, which actually will contain SI packets..PNote, that no collision check is done for PIDs,that are given with the \fB\-\-sipid\fR command.This is because these PIDs are assumed to becovered by a corresponding \fB\-\-si\fR..SH EXAMPLESTo convert a program stream file x.PS to a transport stream file x.TS,with program number 42, transport stream id 23and PAT and PMT generated about every half second:.IP$ iso13818ts --fpsi 500 --ident 23 --ps x.PS 42 > x.TS.PPIf the program stream doesn't contain correct PSI,the single streams may be extracted one by one. Assumingone video stream (0xE0) and mono audio (0xC0):.IP$ iso13818ts --fpsi 500 --ident 23 --ps x.PS 42 0xE0 --ps = 42 0xC0 > x.TS.PPTo bundle two streams originating from video devices andsend them out to a streaming device, e.g.:.IP$ iso13818ts -F 500 -P /dev/video0 0x7300 -P /dev/video1 0x7301 > /dev/xdvb0.PPTo remultiplex a transport stream containing two TV programswith program numbers 4711 and 4712, with the audio streams (0xC0)of the TV programs exchanged:.IP$ iso13818ts -F 500 --file 1 /dev/rdvb0 --ts 1 4711 4711 0xE0 --ts 1 4712 4712 0xE0 --ts 1 4711 4712 0xC0 --ts 1 4712 4711 0xC0 > /dev/xdvb0.PPTo invoke the multiplexer for interactive use, it mustbe put in all-time-busy-mode. Subsequently, commands canbe fed to \fIstdin\fR, e.g. to do the same as with thefirst example:.IP$ iso13818ts --busy > x.TS.brfpsi 500 ident 23.brps x.PS 42.PPThis instance of the multiplexer will not cease when theend of file in x.PS is reached. To stop the multiplexer,either \fBquit\fR or \fBbusy 0\fR may be typed to \fIstdin\fR..PTo output a movie repeatedly (e.g. seven times):.IP$ iso13818ts -F 500 --ps thepurpleroseofcairo.PS 777 --repeat = 7 > /dev/xdvb0.PPNote, that if during the movie is processed, the command.IPclose thepurpleroseofcairo.PS.PPis issued, and supposed it is not yet processed the seventh time,it is not closed, but restarted immediately..PTo concatenate two movies and output them in sequence:.IP$ iso13818ts -F 500 --ps rambo1.PS 789 --append = rambo2.PS > /dev/xdvb0.PPNote, that a file can only be appended to a file, that isyet in use (i.e. being processed). Thus, it is not possibleto append a third movie (rambo3.PS) from within the commandline. Instead, the processing of the second movie must beawaited, and then the following command can be fed to \fIstdin\fR:.IPappend rambo2.PS rambo3.PS.PPTo add data from a DSMCC carousel to the output, a DSMCCcarousel generator must be started seperately. The carouselmust generate the DSMCC data as a series of transportstream packets that contain private sections. The PIDs used bythe carousel must be known (e.g. 0x10..0x1F). Supposed use ofthe DSMCC carousel data provider \fIrepeatts\fR:.IP$ mkfifo dsmcc_pipe.br$ repeatts 8000 2000 dsmcc_data.TS > dsmcc_pipe &.br$ iso13818ts -F 500 --busy --ts dsmcc_pipe --si = 0x10 0x1F > /dev/xdvb0.brps x.PS 42.brps y.PS 43.br\&....PPIf the source is a transport stream with broken ormissing PSI (i.e. PAT/PMT), and if further it canbe assumed, that there is only one program to be foundin the stream, then the \fIsource program number\fRcan be specified as \fB0\fR. With the followingexample, one video and one audio stream are extracted(the first one found, if more than one exist)and output as \fItarget program number\fR 42:.IP$ iso13818ts -F 500 -T deficient.TS 0 42 0xE0 -T = 0 42 0xC0 > complete.TS.PP.SH "KNOWN PROBLEMS"The program might not work in conjunction with device driversthat do not deliver or accept data unless a first read or writeis done on the device. E.g., for a MPEG video data source, thatdoes not produce output without being triggered by being readfrom, this program will await the readability of the firstdata infinitely. On the other hand it is obvious that the drivershould not encode data as long as there is no application thatwill read this data.One possibly solution to this dilemma is to patch such a driverto interpret the \fIpoll\fR command as an order for data, thustriggering the read mechanisms. Analogous considerations holdfor polling the output device and writing to it..PPaketized elementary streams do not necessarily containusable time stamps, so when multiplexing raw PES, streamsbelonging together may be out of sync. This is especiallynoteworthy in case streams shall be demultiplexed and thenagain multiplexed in some way. Results will always be betterwhen this remultiplexing takes place entirely within themultiplexer, because that way timing information won't get lost..SH BUGSEnd of action sometimes is not detected correctly, whichcauses the multiplexer to hang.Nevertheless, it then can be stopped by the \fBquit\fR command..PChanging configuration is not printed if the changeis solely a descriptor coming from a source file..SH "SEE ALSO".BR repeatts (1),.BR iso13818ps (1),.BR ISO\ 13818-1 ,.BR ETSI\ EN\ 300\ 468 ..SH AUTHOROskar Schirmer (schirmer@scara.com).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -