VideoHelp Forum
+ Reply to Thread
Results 1 to 8 of 8
Thread
  1. With the GUI if you open any file it generates the .meta file and you can save it as a file and pass on for the batch scripts, etc.

    It looks something like this

    Code:
        MUXOPT --no-pcr-on-video-pid --new-audio-pes --vbr  --cut-start=10000ms --vbv-len=500
        V_MPEG4/ISO/AVC, "C:\file.m2ts", insertSEI, contSPS, track=4113
        A_DTS, "C:\file.m2ts", track=4352, lang=eng
        S_HDMV/PGS, "C:\file.m2ts", fps=23.976, track=4608, lang=eng
    How do you skip the GUI part (don't use it) and generate the file with the command line version of TSMuxer?

    All I found is that you have to manually set the .meta file by setting up each line for each stream, which makes no sense because you get this auto-generated for you with the GUI, but can't with command line?
    Quote Quote  
  2. You can use echo and redirecting sign(s) to create script and later you can use command 'call' to run this script from batch.
    Check this site - it is one of the best if not the best site dedicated to dos scripting.

    https://www.robvanderwoude.com/redirection.php

    Bellow example of script i use to create help file for ffmpeg, it should give you impression how to create script from script.
    Code:
    @echo off
    @echo --------------- > ff_help_full.txt
    @echo ffmpeg version >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @ffmpeg.exe -hide_banner -version >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo ffmpeg -buildconf >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @ffmpeg.exe -hide_banner -buildconf >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo * >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo ffmpeg -pix_fmts >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @ffmpeg.exe -hide_banner -pix_fmts >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo * >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo ffmpeg -sample_fmts >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @ffmpeg.exe -hide_banner -sample_fmts >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo * >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo ffmpeg -filters >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @ffmpeg.exe -hide_banner -filters >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo * >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo ffmpeg -formats >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @ffmpeg.exe -hide_banner -formats >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo * >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo ffmpeg -codecs >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @ffmpeg.exe -hide_banner -codecs >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo * >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo ffmpeg -decoders >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @ffmpeg.exe -hide_banner -decoders >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo * >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo ffmpeg -encoders >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @ffmpeg.exe -hide_banner -encoders >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo ffmpeg -bsfs >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @ffmpeg.exe -hide_banner -bsfs >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo * >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo ffmpeg -devices >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @ffmpeg.exe -hide_banner -devices >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo * >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo ffmpeg -sources device >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @ffmpeg.exe -hide_banner -sources device >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo * >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo ffmpeg -sinks device >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @ffmpeg.exe -hide_banner -sinks device >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo * >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo ffmpeg -hwaccels >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @ffmpeg.exe -hide_banner -hwaccels >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo * >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo ffmpeg -protocols >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @ffmpeg.exe -hide_banner -protocols >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo * >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo ffmpeg -layouts >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @ffmpeg.exe -hide_banner -layouts >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo * >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo ffmpeg full help >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @ffmpeg.exe -hide_banner -h full >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo * >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo ffmpeg -colors >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @ffmpeg.exe -hide_banner -colors >> ff_help_full.txt
    @echo --------------- >> ff_help_full.txt
    @echo * EOH * >> ff_help_full.txt
    
    @timeout 30
    btw - i don't understand why tsmuxer by default not use video PID also for PCR - this quote odd...
    Last edited by pandy; 6th May 2019 at 06:17.
    Quote Quote  
  3. How do you tell TSMuxer to give you one of the lines, eg. "V_MPEG4/ISO/AVC, "C:\file.m2ts", insertSEI, contSPS, track=4113" so you could echo it to a file?
    Quote Quote  
  4. Originally Posted by midts View Post
    How do you tell TSMuxer to give you one of the lines, eg. "V_MPEG4/ISO/AVC, "C:\file.m2ts", insertSEI, contSPS, track=4113" so you could echo it to a file?
    You need to do something like:

    Code:
    @echo "V_MPEG4/ISO/AVC, "C:\file.m2ts", insertSEI, contSPS, track=4113" >yourscript.meta
    @call tsmuxer.exe yourscript.meta outfilename
    look at the tsMuxeR help:

    Code:
    Examples:
        tsMuxeR <media file name>
        tsMuxeR <meta file name> <out file/dir name>
    
    tsMuxeR can be run in track detection mode or muxing mode. If run tsMuxeR  with
    only  one argument  then tsMuxeR  display  input track information  required to
    construct  meta  file.  If run tsMuxeR  with two arguments tsMuxeR start muxing
    or demuxing process.
    
    Meta file format:
    File MUST has extension .meta.  This file  define files you want to  multiplex.
    First line of meta file contain additional parameters that apply to all tracks.
    In this case the line should begin with the word MUXOPT.
    
    Following lines indicate a list of tracks  and their parameters.  The format is
    as follows:   <code name>,   <file name>,   <parameters>   Parameters are comma
    separated. Each parameter indicates the name and value.
    Example of META file:
    
    MUXOPT --blu-ray
    V_MPEG4/ISO/AVC, D:/media/test/stream.h264, fps=25
    A_AC3, D:/media/test/stream.ac3, timeshift=-10000ms
    
    In this example one AC3 audio stream and one H264 video stream are  multiplexed
    to BD disk.  Input file name can reference to elementary stream or track inside
    container.
    
    Supported input containers:
    - TS/M2TS/MTS
    - EVO/VOB/MPG/MPEG
    - MKV
    - MOV/MP4
    - MPLS (Blu-ray media play list file)
    
    Names of codecs in the meta file:
    - V_MPEGH/ISO/HEVC  H.265/HEVC
    - V_MPEG4/ISO/AVC   H.264/AVC
    - V_MPEG4/ISO/MVC   H.264/MVC
    - V_MS/VFW/WVC1     VC1
    - V_MPEG-2          MPEG2
    - A_AC3             AC3/AC3+/TRUE-HD
    - A_AAC             AAC
    - A_DTS             DTS/DTS-Express/DTS-HD
    - A_MP3             MPEG audio layer 1/2/3
    - A_LPCM            raw pcm data or PCM WAV file
    - S_HDMV/PGS        Presentation graphic stream (BD subtitle format)
    - S_TEXT/UTF8       SRT subtitle format.  Encoding MUST be  UTF-8/UTF-16/UTF-32
    
    Each track may has addition parameters.  Track parameters do not  have dash. If
    parameter value has several words, parameter must be enclosed in quotes.
    
    Common additional parameters for any type of track:
    - track             track number if input file is container.
    - lang              track language. MUST contains exact 3 letters.
    
    Additional parameters for audio tracks:
    - timeshift         Shift audio track to future (positive value) or to past.
                        Measured at milliseconds.
    - down-to-dts       Available only for DTS-HD tracks. Filter out HD part.
    - down-to-ac3       Available only for TRUE-HD tracks. Filter out HD part.
    - secondary         Mux as secondary audio.  Available for DD+ and DTS-Express.
    
    Additional parameters for video tracks:
    - fps               Video fps. If not defined, default value auto detected from
                        a source stream if present. If not, default value 23.976.
    - delPulldown       Remove pulldown from the track if exists.  This option lead
                        to fps change from 30 to 24 if pulldown exists.
    - ar                Override video aspect ratio. 16:9, 4:3 e.t.c.
    
    Additional parameters for H.264 video tracks:
    - level             Overwrite  level in the H264 stream.  Note:  option  update
                        headers only. The H264 stream may not meet the requirements
                        of a lower level.
    - insertSEI         If original   stream  does not contain  SEI picture timing,
                        SEI buffering period or VUI parameters,  then add this data
                        to the stream. This option is recommended for BD muxing.
    - forceSEI          Add SEI picture timing, buffering period and VUI parameters
                        to the stream. Rebuild data If data already exist. 
    - contSPS           If original video doesn't contain  repetitive SPS/PPS  then
                        SPS/PPS will be added to the stream before  each key frame.
                        This option is recommended for BD muxing.
    - subTrack          Used  for  combined  AVC/MVC  tracks  only.  TsMuxeR always
                        demultiplex  such  tracks to separate  AVC and MVC streams.
                        This parameter defined reference to AVC part(if value=1) or
                        or to MVC part (if value=2).
    - secondary         Mux as secondary video (PIP).
    - pipCorner         Corner for PIP video. Allowed values: "TopLeft","TopRight",
                        "BottomRight", "BottomLeft". 
    - pipHOffset        PIP window horizontal offset from the corner in pixels.
    - pipVOffset        PIP window vertical offset from the corner in pixels.
    - pipScale          PIP window scale factor. Allowed values: "1", "1/2", "1/4",
                        "1.5", "fullScreen".
    - pipLumma          Allow PIP window to be transparent. Transparent colors  are
                        lumma colors in range [0..pipLumma]. 
    
    Additional parameters for PG and SRT tracks:
    
    - video-width       The width of the video in pixels.
    - video-height      The height of the video in pixels.
    - fps               Video fps.  Recommended  to  define this parameter for more
                        carefully timing processing.
    - 3d-plane          Parameter  defines  number  of  the '3D offset track' which
                        placed  inside  MVC  track.  Each message has individual 3D
                        offset. This information  stored  inside 3D offset track.
    
    Additional parameters for SRT tracks:
    
    - font-name         Font name to render.
    - font-color        Font color. Color can be defined in hexadecimal or  decimal
                        format. If color 24 bit long  (for instance 0xFF00FF)  it's
                        define RGB components.  IF color 32 bit long  (for instance
                        0x80FF00FF) it's define ARGB components.
    - font-size         Font size in pixels.
    - font-italic       Italic display text.
    - font-bold         Bold display text.
    - font-underline    Underlined text.
    - font-strikeout    Strikethrough text.
    - bottom-offset     Distance from the lower edge while displaying text.
    - font-border       Outline width.
    - fadein-time       Time in ms for smooth subtitle appearance.
    - fadeout-time      Time in ms for smooth subtitle disappearance.
    - line-spacing      Interval between lines. Default value 1.0.
    
    tsMuxeR  supports  addition  tag inside  SRT track.  The syntax  and parameters
    coincide with HTML: <b>, <i>, <u>, <strike>, <font>. Default relative font size
    (used in these tags) - 3.  For example:
    
    <b><font size=5 color="deepskyblue" name="Arial"><u>Test</u>
    <font size= 4 color="#806040">colored</font>text</font>
    </b>
    
    Global addition parameters placed in the first line of the META file  (MUXOPT).
    All parameters in this group started with two dashes:
    
    --pcr-on-video-pid  Do not allocate separate PID for PCR, use an existing video
                        PID.
    --new-audio-pes     Use bytes 0xfd instead of 0xbd for AC3, True-HD, DTS and
                        DTS-HD. Parameter is auto activated for BD muxing.
    --vbr               Use variable bitrate.
    --minbitrate        Sets the lower limit of the vbr bitrate.  If the stream has
                        a  smaller bitrate  then NULL  packets will be inserted  to
                        hold the limit.
    --maxbitrate        The upper limit of the vbr bitrate.
    --cbr               Muxing mode  with a fixed bitrate.  Options --vbr and --cbr
                        should not be used together.
    --vbv-len           The  length  of the  virtual  buffer  in milliseconds.  The
                        default value  is 500.  Typically, this  option  is used in
                        together with --cbr. The parameter is similar to  the value
                        of  vbv-buffer-size  in  the  x264  coder,  but  defined in
                        milliseconds instead of kbit.
    --no-asyncio        Do not  create  a separate thread  for writing.  Also, this
                        option  disable  flag  FILE_FLAG_NO_BUFFERING  for writing.
                        Deprecated option.
    --auto-chapters     Number.  Insert a chapter every <nn> minutes. Used only for
                        BD/AVCHD mode.
    --custom-chapters   A semicolon delimited list of string in format hh:mm:ss.zzz
    --demux             In this mode selected audio  and video tracks are stored as
                        separate files instead of muxing. utput name must be folder
                        name.  All selected  effects  (such as change  of level for
                        h264) are processed.  When demux,  certain types  of tracks
                        always get changed on storing into a file:
                        - Subtitles in a Presentation Graphic Stream  are converted
                          into sup format.
                        - PCM audio are saved as WAV files.
    --blu-ray           Mux to BD diks. If output file name is folder,  bluray disk
                        is created as folder on HDD.  For BD3D disks ssif files are
                        not  created at  this  case.  If output file name  has .iso
                        extension, then BD disk is created as image file.
    --avchd             Mux to AVCHD disk.
    --cut-start         Trim the beginning of the file.  Value should be  completed
                        with  "ms"  (the number of milliseconds),  "s" (seconds) or
                        "min" (minutes).
    --cut-end           Trim  the end of the file.  Value should be  completed with
                        "ms" (the number of milliseconds), "s" (seconds) or "min"
                        (minutes).
    --split-duration    Split output to several files.The time specified in seconds
    --split-size        Split  output to several files.  Values  should be  written
                        using one of the following postfix: Kb,kib, mb,mib, gb,gib.
    --right-eye         Use base video stream for right eye. Used for 3DBD only.
    --start-time        Timestamp of the first video frame. May be defined as 45Khz
                        clock (just a number) or as time in format hh:mm:ss.zzz
    --mplsOffset        The number of the first MPLS file.  Used for  BD disk mode.
    --m2tsOffset        The number of the first M2TS file.  Used for  BD disk mode.
    --insertBlankPL     Add extra  short playlist.  Used for cropped video muxed to
                        BD disk.
    --blankOffset       Blank playlist number.
    --label             Disk label for muxing to ISO file.
    --extra-iso-space   Allocate extra space  in 64K units  for ISO  disk  metadata
                        (file and directory names). Normally, tsMuxeR allocate this
                        space automatically. But if split condition generates a lot
                        of small files, extra ISO space may be required to define.
    If files (source) are different then whole process will be more tricky, you need to analyse file, then process outcome of analysis and based on this create new meta called by script. plain dos is quite limited environment for more advanced processing thus you may wish to use or power shell or at least try to use some editor able to parse data - quite commonly for this a SED is used.
    Quote Quote  
  5. So like I wrote, you're stuck doing the .meta part manually. You load up the .m2ts in the GUI and it auto-generates the:

    Code:
        V_MPEG4/ISO/AVC, "C:\file.m2ts", insertSEI, contSPS, track=4113
        A_DTS, "C:\file.m2ts", track=4352, lang=eng
        S_HDMV/PGS, "C:\file.m2ts", fps=23.976, track=4608, lang=eng
    Why can't I call the .m2ts file with command line tool and print it all out? Now you have to manually do each and every line so you could echo it. Why can't I analyze it all with the command line? Why GUI analyze it for you automatically, but not the command line?
    Quote Quote  
  6. Originally Posted by midts View Post
    So like I wrote, you're stuck doing the .meta part manually. You load up the .m2ts in the GUI and it auto-generates the:

    Code:
        V_MPEG4/ISO/AVC, "C:\file.m2ts", insertSEI, contSPS, track=4113
        A_DTS, "C:\file.m2ts", track=4352, lang=eng
        S_HDMV/PGS, "C:\file.m2ts", fps=23.976, track=4608, lang=eng
    Why can't I call the .m2ts file with command line tool and print it all out? Now you have to manually do each and every line so you could echo it. Why can't I analyze it all with the command line? Why GUI analyze it for you automatically, but not the command line?
    Read help to tsMuxer - obviously you can analyse file with tsMuxer and based on this generate meta file - GUI has embedded parser for analysed data and editor to create meta file. If you do not wish to use GUI you need to substitute some functionality in different way.
    Quote Quote  
  7. I still can't figure out how. Which command? If you run just default "tsmuxer.exe file.m2ts" the info it gives is incomplete, not same format and not same as what's show in the GUI.
    Quote Quote  
  8. So your proper question is: how to analyse file source with tsMuxeR.exe and based on this create meta file.
    As i don't have m2ts file then i analysed different source and seem all important information is present.
    So next question is how to select fields and values and create meta file - as i wrote previously SED or GREP (if present) or some similar tool is required.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!