Utilities
Common CLI Parameters
All utilities support the following command line parameters:
–help, -h
Display help in the console and exit.
–version, -v
Display the version in the console and exit.
vodconvert
Command Line Arguments
–type
Default value: mp4
The conversion type, may take the following values:
- mp4 — MP4 container, DASH playlist generation,
- ss — MP4 container, DASH + SmoothStreaming playlists generation,
- ts — MPEG2-TS container, HLS playlist generation.
–add_stream, -a
Required: yes
Adding a track, see “Parameters for Adding a Track”.
–output_directory, -d
Default value: ./
The output directory.
–fragment_duration, -f
Default value: 30
The fragment duration in seconds.
–creation_time
Default value:current time
Creation/modification time in seconds from midnight on January 1, 1904, in UTC (see ISO/IEC 14496-12 8.3.2). Only for MP4.
–mpd_file_name, -m
Required: yes
The name of the output MPD file.
–manifest_file_name
The name of the output Smooth Streaming manifest.
–variant_file_name
The name of the output HLS variant playlist.
–key_server_url
Default value: empty string
URL of the key generation server.
–signer_name
Default value: empty string
The name of the message signer to request the keys.
–signer_key
Default value: empty string
Signer’s AES Key, in hex.
–signer_iv
Default value: empty string
Signer’s AES Initialization Vector, in hex.
–content_id
Default value: empty string
Content ID, in hex.
–key_rotation
Default value: –
If specified, the content will be encrypted with a key update every key_rotation_interval seconds. If not, one key will be used for all fragments.
–cbcs
Default value: 0 (CBCS encryption is not enabled)
Number of encrypted blocks in CBCS scheme pattern.
If this value is set, then pattern [N:10-N] will be used. According to the CBCS standard, totally ten (10) blocks should be used for the pattern. That’s why only one number (the first one) should be set to define the pattern.
The recommended and default pattern is [1:9]. It is used by Apple FairPlay DRM.
–recrypt
Default value: empty string
Used to encrypt MP4 chunks on-the-fly using the SmartMEDIA Recryptor service. For example, from the Common Encryption ‘cenc’ (AES-CTR) scheme to the ‘cbcs’ (AES-CBC Pattern Encryption) scheme. This allows a single copy of encrypted content to be stored and played by players using both Widevine DRM (‘cenc’) and Apple FairPlay DRM (‘cbcs’). The prefix is added before the URI of the encrypted chunks in HLS media playlists so that the client requests the chunks from the SmartMEDIA Recryptor service. The prefix is only added if the chunks are encrypted with the ‘cenc’ scheme for Widevine DRM.
When a prefix is used, a special suffix “/[start]-[end].mp4” (e.g. “media.mp4/0-814.mp4”) is added to the URI instead of the #EXT-X-BYTERANGE element. To the player and the HTTP server it looks like a request for a separate file, not a ‘byte range’ request. This is necessary because when re-encrypting and repacking the size of the MP4 chunk may change. Then the “Content-Range” range in the response will not match the “Range” range in the HTTP request and this will lead to an error and stop the player. Imitating individual files in a playlist solves this problem, although the chunks may physically be written to a single file on disk and SmartMEDIA Recryptor accesses them using ‘byte ranges’. This setting is used only for HLS and does not affect DASH generation.
If a non-empty prefix is passed, the MP4 chunks are recorded a special way with preparation for on-the-fly re-encryption:
- the #EXT-X-KEY element containing the Key ID in Apple CMAF format is added to HLS media playlists;
- Key ID and PSSH are added to MP4 chunks;
- the Subsamples structure (BytesOfClearData/BytesOfProtectedData) is stored without alignment to 16, as for ‘cbcs’ scheme.
–wait_i_frame, -w
Default value: true
Drop data from the input TS file until the first IFrame appears.
–key_rotation_interval
Default value: 3600
The key update period when key_rotation is enabled.
–segmentation
Default value: Base
The type of fragment segmentation, has three possible values: base, template, list. See Segmentation Types
–add_styp
Default value: absent
Add the ‘styp’ box into the output MP4 segments.
–add_sidx
Default value: absent
Add ‘sidx’ box to resulting mp4 fragments.
–timescale, -t
Default value: 0
Allows you to bring timescale value to the specified value for MP4. If set to 0, the timescale remains unchanged (equal to 90000 for video and sample rate for audio).
The default Smooth Streaming timescale value is 10,000,000 and some devices may not support values other than this.
–sd_key_only
Default value: absent
Use a single key (SD-video) to encrypt all video/audio tracks. Required option when generating Smooth Streaming manifest with data encryption.
–disable_senc
Default value: absent
Do not add ‘senc’ box into the output MP4 segments.
–disable_synchronization
Default value: absent
Disables the synchronization of segments in time.
The output file paths must be specified relative to the output_directory parameter. If you specify key_server_url, it is necessary to specify the other parameters (signer_name, signer_key, signer_iv, content_id) required for encryption.
–drop_nal_filler_data
Default value: true
Flag to drop NAL units with the FILLER_DATA type when remuxing the H264 and H265 streams. Some SmartTV models are not able to play streams with the FILLER_DATA units correctly, so they are dropped by default. If you need to keep these units in the stream for some reason, set the flag to false.
Parameters for Adding a Track
Parameters are separated by commas and are specified as parameter = value:
MP4/SmoothStreaming
input
Required: yes
The input file.
adaptation
Adaptation@id, if not specified. It is set automatically according to its type, and for audio it is also based on the language.
track
Required: yes
The track type and number in the input file, e.g. vid0, aud3, sub0.
bandwidth
Default value: 0
The input stream bitrate. If not specified (or 0), it is determined automatically. Is ignored for subtitles.
output
Required: yes/-
The name of the output file for the specified track. Is ignored for external subtitles.
hls_output
HLS playlist output for the specified track.
dir
Default value: ./
The path to the directory to be used as an output for MP4 chunks and HLS playlist for the specified track.
lang
The language of the specified track. If not specified, it is determined automatically, if possible.
itype
The input file type, can be ts, mp4, dts, vtt or dvdsub. If not specified, it is determined by the input file extension.
mime
Adaptation@mimeType. If not specified, it is determined based on the input file and track.
codecs
Representation@codecs. Ignored for all tracks except subtitles.
index
The Initialization@sourceURL value for subtitles in dvdsub format, in which the path to the index file is sent.
segmentation
Default value: base
The segmentation type (see description below).
manifest_url
Default value: QualityLevels({bitrate})/Fragments(video={start time})
Required: –
Value of the Url attibite of the StreamIndex element in SmoothStreaming manifests.
thumbnails
Required: –
Thumbnail generation settings.
Thumbnail images are generated from the I-frames of the video stream. Vodconvert can generate multiple thumbnail images of different sizes per each I-frame and put them into corresponding directories. For each resoluton/format configuration should be described as “:x”; multiple formats can be concatenated by the & sign.
Example: “high:1920×1080&low:640×480”.
thumbnails_mosaic
Required: –
Dimensions of the thumbnail mosaic configured with the thumbnails option as a string “x”
MPEG2-TS
input
Required: yes
The input TS file.
bandwidth
Default value: 0
Required: yes
The input file bitrate.
iframes_bandwidth
Default value: 0
Required: yes/-
The input stream IFrame bitrate.
output
Required: yes
The name of the output HLS media playlist file.
output_iframes
The name of the output HLS IFrames playlist file. If not specified, it is not saved.
playlist_ts_name
Required: yes/-
The name of the TS file used in playlists when generating in byte_ranges mode.
byte_ranges
Default value: 0
0 or 1. If 0, split the source file into chunks; if 1, add the Byte-Range value for each chunk to the playlist.
Types of DASH Segmentation
The type of DASH content segmentation is specified by the segmentation parameter and can take the following values:
Value |
Description |
base |
One file, displayed in the MPD file using SegmentBase |
template |
A set of files, displayed in the MPD file using SegmentTemplate |
list |
A set of files, displayed in the MPD file using SegmentList |
The data can be contained either in one common file (base) or in a set (template or list), each fragment and initialization data in which will be stored separately. In the case of a set, the output files are named according to the pattern specified in the output parameter. For example, for output=my_film_audio_rus$Number$.mp4 output file names will be:
- my_film_audio_rus.mp4 — initialization data;
- my_film_audio_rus1.mp4 — the first fragment;
- my_film_audio_rus2.mp4 — the second fragment,
- etc.
If the template type is selected, then the my_film_audio_rus$Number$.mp4 template will also be used in MPD files.
You can use these placeholders in templates:
- $Number$ — the segment number starting with 0;
- $Time$ — the start time of the segment (DTS);
- $Bandwidth$ — the stream bitrate specified by the bandwidth parameter.
Features for MP4
Currently, MP4 input files containing information about samples in the ‘stbl’ box are supported. Split files are not supported.
Features for DTS Audio
DTS audio can be input either as a track in a .ts file or as a separate .dts file without any container. The DTS track in the .ts file will be recognized if in its ‘StreamInfo’ in the PMT a Registration descriptor (ETSI TS 101 154, section 4.1.8.24 “DTS registration descriptor”) with format_id ‘DTS1’, ‘DTS2’ or ‘DTS3’ will be present.
Command Line Examples
Example for Single-Bitrate DASH (mp4) Content
Copy Code Bash (Unix Shell) |
vodconvert -a input=/video/SER_SD04016/bw300000/video.ts,adaptation=0,track=vid0,output=SER_vid.mp4 -a input=/video/SER_SD04016/bw300000/video.ts,adaptation=1,track=aud0,bandwidth=30000,output=SER_aud.mp4 -m SER.mpd -d /video/nginx/vodconvert/ |
Execution result:
Copy Code Bash (Unix Shell) |
[2015-09-09 13:17:53.207885] [0x00007f388a75a780] [info] [default] For track: vid0 from /video/SER_SD04016/bw300000/video.ts generated output file: /video/nginx/vodconvert/SER_vid.mp4 [2015-09-09 13:17:53.208765] [0x00007f388a75a780] [info] [default] For track: aud0 from /video/SER_SD04016/bw300000/video.ts generated output file: /video/nginx/vodconvert/SER_aud.mp4 [2015-09-09 13:17:53.260771] [0x00007f388a75a780] [info] [default] Generated MPD file: /video/nginx/vodconvert/SER.mpd |
Example for Splitting Files into Fragments
The $Number$ pattern string must be escaped depending on the command shell. For example, in the case of bash, this is done using single quotes. The characters ‘ ‘ and ‘ = ‘ are utility when parsing the vodconvert parameters, so they must be replaced with “” and “= ” in the parameter values (see the example with the Smooth Streaming manifest generation).
Copy Code Bash (Unix Shell) |
vodconvert –type mp4 -a ‘input=/video/dash/oblivion.mp4,track=vid0,output=s1_vid$Number$.mp4’ -a ‘input=/video/dash/oblivion.mp4,track=aud0,output=s1_aud$Number$.mp4’ -m s1.mpd -d /video/nginx/mp4_to_dash/ –segmentation template |
Example for Multi-Bitrate DASH (mp4) content
Copy Code Bash (Unix Shell) |
vodconvert –type mp4 -a input=/video/SER_SD04016/bw1000000/video.ts,adaptation=0,track=vid0,output=SER_vid1000000.mp4 -a input=/video/SER_SD04016/bw1500000/video.ts,adaptation=0,track=vid0,output=SER_vid1500000.mp4 -a input=/video/SER_SD04016/bw300000/video.ts,adaptation=0,track=vid0,output=SER_vid300000.mp4 -a input=/video/SER_SD04016/bw600000/video.ts,adaptation=0,track=vid0,bandwidth=600000,output=SER_vid600000.mp4 -a input=/video/SER_SD04016/bw850000/video.ts,adaptation=0,track=vid0,bandwidth=850000,output=SER_vid850000.mp4 -a input=/video/SER_SD04016/bw300000/video.ts,adaptation=1,track=aud0,bandwidth=30000,output=SER_aud0.mp4 -m SER.mpd -d /video/nginx/vodconvert/ |
Example for Encrypted Multi-Bitrate DASH (mp4) Content
Copy Code Bash (Unix Shell) |
vodconvert –type mp4 -a input=/video/SER_SD04016/bw1000000/video.ts,adaptation=0,track=vid0,bandwidth=1000000,output=SER_vid1000000.mp4 -a input=/video/SER_SD04016/bw1500000/video.ts,adaptation=0,track=vid0,bandwidth=1500000,output=SER_vid1500000.mp4 -a input=/video/SER_SD04016/bw300000/video.ts,adaptation=0,track=vid0,bandwidth=300000,output=SER_vid300000.mp4 -a input=/video/SER_SD04016/bw600000/video.ts,adaptation=0,track=vid0,bandwidth=600000,output=SER_vid600000.mp4 -a input=/video/SER_SD04016/bw850000/video.ts,adaptation=0,track=vid0,bandwidth=850000,output=SER_vid850000.mp4 -a input=/video/SER_SD04016/bw300000/video.ts,adaptation=1,track=aud0,bandwidth=30000,output=SER_aud0.mp4 -m SER.mpd -d /video/nginx/vodconvert/ –key_server_url “http://license.uat.widevine.com/cenc/getcontentkey/widevine_test” –content_id “3031323334353637” –signer_name “widevine_test” –signer_key “1ae8ccd0e7985cc0b6203a55855a1034afc252980e970ca90e5202689f947ab9” –signer_iv “d58ce954203b7c9a9a9d467f59839249” |
Example for the CBCS encyption and DAHS+HLS playlists generation for Apple FairPlay
Input files for each track will be recorded to the separated directory.
Copy Code Bash (Unix Shell) |
vodconvert –type mp4 -a input=src/vid_bw1500000.mp4,track=vid0,adaptation=1,output=‘vid_$Number$.mp4’,hls_output=playlist_vid.m3u8,dir=video/bw1500000/ -a input=src/vid_bw1600000.mp4,track=vid0,adaptation=2,output=‘vid_$Number$.mp4’,hls_output=playlist_vid.m3u8,dir=video/bw1600000/ -a input=src/vid_bw2000000.mp4,track=vid0,adaptation=3,output=‘vid_$Number$.mp4’,hls_output=playlist_vid.m3u8,dir=video/bw2000000/ -a input=src/aud_eng_096.mp4,track=aud0,adaptation=4,output=‘aud_$Number$.mp4’,hls_output=playlist_aud.m3u8,dir=audio/eng_096/ -a input=src/aud_eng_128.mp4,track=aud0,adaptation=5,output=‘aud_$Number$.mp4’,hls_output=playlist_aud.m3u8,dir=audio/eng_128/ -a input=src/aud_eng_192.mp4,track=aud0,adaptation=6,output=‘aud_$Number$.mp4’,hls_output=playlist_aud.m3u8,dir=audio/eng_192/ -m Manifest.mpd –variant_file_name master.m3u8 -d enc -f 10 –segmentation list –cbcs 1 –content_id “446570656368654d6f64655f6362637331” –key_server_url “http://10.65.50.66:8082/cenc/getkey” –signer_name vodconvert –signer_key 6e63cbfcc15b3d3ab2e64434b9729aabbd5c18b721e131d2ad1807e7eab4e633 –signer_iv 78a8a6671f3007da70e532f3d873ec3e |
Example for Adding External Subtitles in VTT Format
Copy Code Bash (Unix Shell) |
vodconvert –type mp4 -m playlist.mpd -a input=spart_h264_aac.ts,adaptation=0,track=vid0,bandwidth=300000,output=spart_vid0.mp4 -a input=spart_h264_aac.ts,track=aud0,bandwidth=300000,output=spart_aud0.mp4 -a input=spart.vtt,adaptation=333,track=sub0,lang=en,itype=vtt,mime=text/vtt,codecs=wvtt |
Example for Smooth Streaming Manifest Generation (Video Only)
Copy Code Bash (Unix Shell) |
vodconvert –type ss -a input=input_file.ts,adaptation=0,track=vid0,output=QualityLevels($Bandwidth$)/Fragments(video\=$Time$),bandwidth=1200000,manifest_url=QualityLevels({bitrate})/Fragments(video\={start time}) -m out_dash.mpd –manifest_file_name Manifest –segmentation=list |
Example for Smooth Streaming Manifest Generation (Video and Audio) with legacy SmartTV Support
Copy Code Bash (Unix Shell) |
vodconvert –type ss -a input=input_file.ts,adaptation=0,track=vid0,output=QualityLevels_bw$Bandwidth$/Fragments_video_$Time$,bandwidth=1200000,manifest_url=QualityLevels_bw{bitrate}/Fragments_video_{start time},adaptation=0 -a input=input_file.ts,adaptation=0,track=aud0,output=QualityLevels_bw$Bandwidth$/Fragments_audio_$Time$,bandwidth=100000,manifest_url=QualityLevels_bw{bitrate}/Fragments_audio_{start time},adaptation=1 -m st.mpd –manifest_file_name Manifest –segmentation=list -t 10000000 |
Example for Smooth Streaming Manifest Generation with Data Encryption
Copy Code Bash (Unix Shell) |
vodconvert –type ss -f 1 -a input=input_file.ts,adaptation=0,track=vid0,output=QualityLevels($Bandwidth$)/Fragments(video\=$Time$),bandwidth=1200000,manifest_url=QualityLevels({bitrate})/Fragments(video\={start time}),adaptation=0 -a input=input_file.ts,adaptation=0,track=aud0,output=QualityLevels($Bandwidth$)/Fragments(audio\=$Time$),bandwidth=100000,manifest_url=QualityLevels({bitrate})/Fragments(audio\={start time}),adaptation=1 -m st.mpd –manifest_file_name Manifest –segmentation=list –key_server_url “http://license.server.com/cenc/getkey” –signer_name “widevine_test” –signer_key “1ae8ccd0e7985cc0b6203a55855a1034afc252980e970ca90e5202689f947ab9” –signer_iv “d58ce954203b7c9a9a9d467f59839249” –content_id=“73796D6D657472ffaa” -t 10000000 –sd_key_only |
Example for HLS (MPEG2-TS) Playlist Generation Without Creating Chunks
Copy Code Bash (Unix Shell) |
vodconvert –type ts -a input=/some/path/input_file.ts,bandwidth=1200000,output=playlist.m3u8,playlist_ts_name=input_file.ts,byte_ranges=1 –variant_file_name variant.m3u8 |
Example for HLS (MPEG2-TS) Playlist Generation with Creating Chunks and IFrames Playlists
Copy Code Bash (Unix Shell) |
vodconvert –type ts -a input=/some/path/input_file.ts,bandwidth=1200000,iframes_bandwidth=300000,output=playlist.m3u8,output_iframes=iframes.m3u8 –variant_file_name variant.m3u8 |
Example for Thumbnail Generation
Copy Code Bash (Unix Shell) |
vodconvert –type mp4 -a input=/some/path/input_file.ts,track=vid0,bandwidth=1200000,output=vid0.mp4,thumbnails=tmb_high:0x0&tmb_low:320×240,thumbnails_mosaic=2×2 -m playlist.mpd -d /video/nginx/dash/ –segmentation template |
cets
Command Line Arguments
–input, -i
URL of the data source to be encrypted or the path to the file with the content (not necessarily absolute).
–output, -o
URL for the output encrypted content or the path to the file (not necessarily absolute).
–key_server_url
URL of the Widevine server from which the keys will be requested.
–signer_name
The signer of the message to the Widevine server (request sender ID).
–signer_key
Hex string, the key to encrypt the message to the Widevine server; the key can be 16, 24 or 32 bytes in size.
–signer_iv
Hex string, initialization vector to encrypt the message to the Widevine server; IV must be 16 bytes in size; respectively, the string — 32 bytes.
–max_encryptor_buffer_size
The maximum allowed size of the encoder buffer. Due to the peculiarities of the ECM generation algorithm according to ISO/IEC 23001-9, it is necessary to buffer the full PES packet before encryption starts. This parameter limits the buffer size, so as not to accumulate content indefinitely in the absence of a PES header in the stream.
–read_buffer_size
The size of the data block to read.
–packets_between_pssh
The number of packets between adjacent PSSH in the output stream.
–packets_between_audio_ecm
The number of packets between adjacent ECM in the audio track.
–msec_between_audio_ecm
The duration of audio between adjacent ECM.
–widevine_key_type
Corresponds to the type field in the key request. The supported values is: SD, HD, AUDIO. If the parameter is set, then when encrypting all tracks of the stream, the specified type will be transferred by the type field of the key request. If not set, the type will be selected according to the track type (SD for video, AUDIO for sound).
–content_id_string
The encrypted content ID specified as an arbitrary ASCII string (for example, my_content).
–content_id_hex
The encrypted content ID specified as a hex string (for example, FF7755FA1AFE11)
–content_id_base64
The content ID specified as a base64 string.
Each channel configuration must have one (and only one) of the content_id_string, content_id_hex, content_id_base64 parameters. These parameters allow you to set the content ID in a user-friendly way.
The source_url and sink_url parameters are required. For more information about the URL format, see “Input and Output URL Formats”.
Command Line Example
Copy Code Bash (Unix Shell) |
cets –key_server_url “http://my.widevine.server.org/cenc/getkey” –signer_name “widevine_test” –signer_key “1aedeadbeefdeadbeef03a55855a1034afc252980e970ca90e5202689f947ab9” –signer_iv “d58cedeadbeefdeadbeef67f59839249” –content_id_string my_content -i plaintext.ts -o encrypted.ts |
scanTs
Command Line Arguments
–skip, -s
The number of TS packets to skip before the analysis starts. The default is 0.
–no-frames
Do not print information about IFrames in the stream, as well as payload errors.
–no-pes
Do not print information about PES packets.
–no-pcr
Do not print information about each PCR change (at the same time, PCR count and PCR jumps count will be performed).
–no-err
Do not print stream errors.
–no-warn
Do not print stream warnings (for example, CC jumps).
–input-file, -f
The input file.
You can specify the input_file parameter at the end of the argument list without naming it. For example, scanTs –no-pcr my.ts
Note: the offset of the IFrame beginning/end relative to the packet in which the IFrame beginning/end was detected, outputs within the track containing the IFrame. So, the record
IFrame stop 1 iFrame track packets behind in stream
for video means that the IFrame did not end in this video packet, but in the previous one. At the same time, there may be other packets between these two packets. So if you need to quickly view the length of the IFrame, it is easier to use idxFromTs + idxdump.
Execution Example
Copy Code Bash (Unix Shell) |
Scanning file sd_1971_Dzhentelmeny_udachi_film.ts Packet num | PID | PCR | PTS | info 0 | 0 | 0.000 | N/A | PAT PMT PID: 256 1 | 256 | 0.000 | N/A | PMT v PID 4113 a PID 4352 ECM PID 32 2 | 32 | 0.000 | N/A | ECM 4 | 0 | 0.000 | N/A | PAT PMT PID: 256 5 | 256 | 0.000 | N/A | PMT v PID 4113 a PID 4352 ECM PID 32 7 | 0 | 0.000 | N/A | PAT PMT PID: 256 8 | 256 | 0.000 | N/A | PMT v PID 4113 a PID 4352 ECM PID 32 10 | 0 | 0.000 | N/A | PAT PMT PID: 256 11 | 256 | 0.000 | N/A | PMT v PID 4113 a PID 4352 ECM PID 32 13 | 0 | 0.000 | N/A | PAT PMT PID: 256 14 | 256 | 0.000 | N/A | PMT v PID 4113 a PID 4352 ECM PID 32 16 | 0 | 0.000 | N/A | PAT PMT PID: 256 17 | 256 | 0.000 | N/A | PMT v PID 4113 a PID 4352 ECM PID 32 19 | 0 | 0.000 | N/A | PAT PMT PID: 256 20 | 256 | 0.000 | N/A | PMT v PID 4113 a PID 4352 ECM PID 32 22 | 0 | 0.000 | N/A | PAT PMT PID: 256 23 | 256 | 0.000 | N/A | PMT v PID 4113 a PID 4352 ECM PID 32 25 | 0 | 0.000 | N/A | PAT PMT PID: 256 26 | 256 | 0.000 | N/A | PMT v PID 4113 a PID 4352 ECM PID 32 28 | 0 | 0.000 | N/A | PAT PMT PID: 256 29 | 256 | 0.000 | N/A | PMT v PID 4113 a PID 4352 ECM PID 32 31 | 0 | 0.000 | N/A | PAT PMT PID: 256 32 | 256 | 0.000 | N/A | PMT v PID 4113 a PID 4352 ECM PID 32 34 | 0 | 0.000 | N/A | PAT PMT PID: 256 35 | 256 | 0.000 | N/A | PMT v PID 4113 a PID 4352 ECM PID 32 37 | 0 | 0.000 | N/A | PAT PMT PID: 256 38 | 256 | 0.000 | N/A | PMT v PID 4113 a PID 4352 ECM PID 32 40 | 0 | 0.000 | N/A | PAT PMT PID: 256 41 | 256 | 0.000 | N/A | PMT v PID 4113 a PID 4352 ECM PID 32 43 | 0 | 0.000 | N/A | PAT PMT PID: 256 44 | 256 | 0.000 | N/A | PMT v PID 4113 a PID 4352 ECM PID 32 46 | 0 | 0.000 | N/A | PAT PMT PID: 256 47 | 256 | 0.000 | N/A | PMT v PID 4113 a PID 4352 ECM PID 32 49 | 4097 | 599.500 | N/A | PCR 50 | 4113 | 599.500 | 600.000 | IFR video +PTS +DTS IFrame start 53 | 4113 | 599.500 | 600.080 | IFR video +PTS +DTS IFrame stop 1 iFrame track packets behind in stream 95 | 4352 | 599.500 | 600.000 | PES audio +PTS 96 | 4352 | 599.500 | 600.021 | PES audio +PTS 97 | 4113 | 599.500 | 600.040 | PES video +PTS 100 | 4352 | 599.500 | 600.043 | PES audio +PTS 101 | 4097 | 599.604 | N/A | PCR 102 | 4352 | 599.604 | 600.064 | PES audio +PTS 103 | 32 | 599.604 | N/A | ECM 104 | 4113 | 599.604 | 600.200 | PES video +PTS +DTS 105 | 4352 | 599.604 | 600.085 | PES audio +PTS 106 | 4352 | 599.604 | 600.107 | PES audio +PTS 107 | 4113 | 599.604 | 600.160 | PES video +PTS +DTS 114 | 4113 | 599.604 | 600.120 | PES video +PTS 119 | 4352 | 599.604 | 600.128 | PES audio +PTS 120 | 4352 | 599.604 | 600.149 | PES audio +PTS |
tsSnoop
Command Line Arguments
–input, -i
The source file path (the first positional parameter).
–format
The input data format. If not specified, determined by file extension.
–bytes-count
The number of bytes per string when outputting source data.
–skip-data
Skip the output of the source data.
–drop-pid
Program identifiers (PID) to be dropped during output (for TS only). Multiple values (in decimal) are separated by a space.
Command Line Example
Copy Code Bash (Unix Shell) |
tsSnoop legend_audio.mp4 –skip-data | less -r tsSnoop legend_video.1 -f mp4 | less -r tsSnoop -i spart.ts –bytes-count 128 –drop-pid 5413 | less -r |
Execution Example for TS
Copy Code Bash (Unix Shell) |
0x000000bc #1 Packet PID: 0000(0x0000) 47 40 00 10 00 00 b0 0d 01000111 01000000 00000000 00010000 00000000 00000000 10110000 00001101 G@…… 00 01 c1 00 00 00 01 f0 00000000 00000001 11000001 00000000 00000000 00000000 00000001 11110000 …….. 00 2a b1 04 b2 ff ff ff 00000000 00101010 10110001 00000100 10110010 11111111 11111111 11111111 .*…… ff ff ff ff ff ff ff ff 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 …….. ff ff ff ff ff ff ff ff 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 …….. ff ff ff ff ff ff ff ff 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 …….. ff ff ff ff ff ff ff ff 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 …….. ff ff ff ff ff ff ff ff 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 …….. ff ff ff ff ff ff ff ff 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 …….. ff ff ff ff ff ff ff ff 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 …….. ff ff ff ff ff ff ff ff 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 …….. ff ff ff ff ff ff ff ff 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 …….. ff ff ff ff ff ff ff ff 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 …….. ff ff ff ff ff ff ff ff 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 …….. ff ff ff ff ff ff ff ff 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 …….. ff ff ff ff ff ff ff ff 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 …….. ff ff ff ff ff ff ff ff 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 …….. ff ff ff ff ff ff ff ff 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 …….. ff ff ff ff ff ff ff ff 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 …….. ff ff ff ff ff ff ff ff 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 …….. ff ff ff ff ff ff ff ff 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 …….. ff ff ff ff ff ff ff ff 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 …….. ff ff ff ff ff ff ff ff 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 …….. ff ff ff ff 11111111 11111111 11111111 11111111 …. transport_error_indicator: 0 payload_unit_start_indicator: 1 transport_priority: 0 PID: 0 transport_scrambling_control: 0 adaptation_field_control: 0 payload_control: 1 continuity_counter: 0 PAT table_id: 0 sectionSyntaxIndicator: 1 zeroBit: 0 reserved: 3 section_length: 13 transport_stream_id: 1 reserved: 3 version_number: 0 current_next_indicator: 1 section_number: 0 last_section_number: 0 Program: program_number: 1 reserved: 7 PID: 4096 |
Execution Example for MKV
Copy Code Bash (Unix Shell) |
0x0000016b id: 0x1654ae6b, size: 187 16 54 ae 6b 01 00 00 00 00010110 01010100 10101110 01101011 00000001 00000000 00000000 00000000 .T.k…. 00 00 00 bb ae 01 00 00 00000000 00000000 00000000 10111011 10101110 00000001 00000000 00000000 …….. 00 00 00 00 31 d7 81 01 00000000 00000000 00000000 00000000 00110001 11010111 10000001 00000001 ….1… 73 c5 81 01 9c 81 00 22 01110011 11000101 10000001 00000001 10011100 10000001 00000000 00100010 s……“ b5 9c 83 72 75 73 86 85 10110101 10011100 10000011 01110010 01110101 01110011 10000110 10000101 …rus.. 41 5f 41 41 43 83 81 02 01000001 01011111 01000001 01000001 01000011 10000011 10000001 00000010 A_AAC… e1 01 00 00 00 00 00 00 11100001 00000001 00000000 00000000 00000000 00000000 00000000 00000000 …….. 0d 9f 81 02 b5 88 40 e7 00001101 10011111 10000001 00000010 10110101 10001000 01000000 11100111 ……@. 70 00 00 00 00 00 ae 01 01110000 00000000 00000000 00000000 00000000 00000000 10101110 00000001 p……. 00 00 00 00 00 00 78 d7 00000000 00000000 00000000 00000000 00000000 00000000 01111000 11010111 ……x. 81 02 73 c5 81 02 9c 81 10000001 00000010 01110011 11000101 10000001 00000010 10011100 10000001 ..s….. 00 22 b5 9c 83 65 6e 67 00000000 00100010 10110101 10011100 10000011 01100101 01101110 01100111 .“…eng 86 8f 56 5f 4d 50 45 47 10000110 10001111 01010110 01011111 01001101 01010000 01000101 01000111 ..V_MPEG 34 2f 49 53 4f 2f 41 56 00110100 00101111 01001001 01010011 01001111 00101111 01000001 01010110 4/ISO/AV 43 83 81 01 23 e3 83 84 01000011 10000011 10000001 00000001 00100011 11100011 10000011 10000100 C…#… 02 62 5a 00 e0 01 00 00 00000010 01100010 01011010 00000000 11100000 00000001 00000000 00000000 .bZ….. 00 00 00 00 12 b0 82 02 00000000 00000000 00000000 00000000 00010010 10110000 10000010 00000010 …….. d0 ba 82 02 40 54 b0 82 11010000 10111010 10000010 00000010 01000000 01010100 10110000 10000010 ….@T.. 04 00 54 ba 82 02 40 63 00000100 00000000 01010100 10111010 10000010 00000010 01000000 01100011 ..T…@c a2 ad 01 64 00 1e ff e1 10100010 10101101 00000001 01100100 00000000 00011110 11111111 11100001 …d…. 00 1d 67 64 00 1e ac d9 00000000 00011101 01100111 01100100 00000000 00011110 10101100 11011001 ..gd…. 40 b4 12 6f fc 01 00 00 01000000 10110100 00010010 01101111 11111100 00000001 00000000 00000000 @..o…. b4 40 00 00 03 00 40 00 10110100 01000000 00000000 00000000 00000011 00000000 01000000 00000000 .@….@. 00 0c 83 c5 8b 65 80 01 00000000 00001100 10000011 11000101 10001011 01100101 10000000 00000001 …..e.. 00 05 68 eb ec b2 2c 00000000 00000101 01101000 11101011 11101100 10110010 00101100 ..h…, Tracks ID: 0x1654ae6b Size: 187 TrackEntry #0 ID: 0xae Size: 49 TrackNumber: 1 TrackUID: 1 TrackType: 2 FlagLacing: 0 Language: rus CodecID: A_AAC Audio ID: 0xe1 Size: 13 SamplingFrequency: 48000 Channels: 2 TrackEntry #1 ID: 0xae Size: 120 TrackNumber: 2 TrackUID: 2 TrackType: 1 FlagLacing: 0 DefaultDuration: 40000000 Language: eng CodecID: V_MPEG4/ISO/AVC CodecPrivate: 0x0164001effe1001d6764001eacd940b4126ffc010000 b440000003004000000c83c58b658001000568ebecb22c Video ID: 0xe0 Size: 18 PixelWidth: 720 PixelHeight: 576 DisplayWidth: 1024 |
rpcClient
Command Line Arguments
–server, -s
The IP address of the RPC server.
–port, -p
The IP port on the remote server.
–timeout, -t
The time to wait for a remote server response, in milliseconds.
After starting the utility waits for commands of the following form:
<command_name> [<argument1>][] […] <Enter>
Service commands (available regardless of RPC server):
- exit — exit the utility;
- info — the list of requests supported by RPC server.
Command Line Example
Copy Code Bash (Unix Shell) |
$ ./rpcClient -s 127.0.0.1 -p 49977 [2015-11-12 18:04:34.952735] [0x00007f0d70caf780] [info] [default] Smartmedia RPC client version: 4.0.0-rc3 [2015-11-12 18:04:34.953143] [0x00007f0d70caf780] [debug] [JSONRPC] request, server: 127.0.0.1, port: 49977 [2015-11-12 18:04:34.953689] [0x00007f0d6f648700] [debug] [JSONRPC] completeRequest smartmedia> info [2015-11-12 18:04:38.525070] [0x00007f0d70caf780] [debug] [JSONRPC] request, server: 127.0.0.1, port: 49977 [2015-11-12 18:04:38.525575] [0x00007f0d6f648700] [debug] [JSONRPC] completeRequest [2015-11-12 18:04:38.525826] [0x00007f0d70caf780] [debug] [JSONRPC] request, server: 127.0.0.1, port: 49977 [2015-11-12 18:04:38.526608] [0x00007f0d6f648700] [debug] [JSONRPC] completeRequest Method name: GetConfig Description: Return main configuration file data Method name: GetEvents Description: return events with bigger or equal number than specified Method name: GetMethodDescription Description: Return description of specified method Method name: GetMethods Description: Return all supported methods Method name: GetServiceName Description: Return service name Method name: GetUptime Description: Return service uptime in seconds Method name: GetVersion Description: Return version smartmedia> GetEvent 0 0 command “GetEvent” not found smartmedia> GetEvents 0 0 [2015-11-12 18:04:52.293135] [0x00007f0d70caf780] [debug] [JSONRPC] request, server: 127.0.0.1, port: 49977 [2015-11-12 18:04:52.294046] [0x00007f0d6f648700] [debug] [JSONRPC] completeRequest { “result”: [ { “id”: “0”, “sessionID”: “1447340620”, “time”: “1447340650.382918”, “channel”: “CH_TEST_1 (239.65.41.4:5002)”, “description”: “1.0094309488932292”, “type”: “ReadBitrate” }, { “id”: “1”, “sessionID”: “1447340620”, “time”: “1447340650.383557”, “channel”: “CH_TEST_1 (239.65.40.4:5001)”, “description”: “1.4366689046223959”, “type”: “ReadBitrate” }, { “id”: “2”, “sessionID”: “1447340620”, “time”: “1447340650.383876”, “channel”: “CH_TEST_1 (239.65.42.4:5003)”, “description”: “0.49479471842447914”, “type”: “ReadBitrate” }, { “id”: “3”, “sessionID”: “1447340620”, “time”: “1447340680.383085”, “channel”: “CH_TEST_1 (239.65.41.4:5002)”, “description”: “1.0091440836588541”, “type”: “ReadBitrate” }, { “id”: “4”, “sessionID”: “1447340620”, “time”: “1447340680.383651”, “channel”: “CH_TEST_1 (239.65.40.4:5001)”, “description”: “1.8082071940104167”, “type”: “ReadBitrate” }, { “id”: “5”, “sessionID”: “1447340620”, “time”: “1447340680.38397”, “channel”: “CH_TEST_1 (239.65.42.4:5003)”, “description”: “0.49642028808593752”, “type”: “ReadBitrate” } ] } smartmedia> exit |