VideoHelp Forum

+ Reply to Thread
Results 1 to 17 of 17
Thread
  1. Member ghazalo's Avatar
    Join Date
    Mar 2015
    Location
    Riyadh
    Search PM
    high all and sorry

    As I expect a lot speak about this subject just couldn't find specific one give direct solution either command line or batch file
    though I had trial with FFMPEG command but not always working seems to me mkvmerge better in the remuxing
    the command was
    Code:
    for %i in (*.ts) do ffmpeg -i %i -scodec copy -acodec copy -vcodec copy -f matroska %~ni.mkv
    so is there is any mkvmerge command to make the full folder instead of one by one through mkvtoolnix GUI. Just copying the content no encode or any changes.

    thanks

    the videos data
    Code:
    File size                                : 1.08 GiB
    Duration                                 : 20 min 45 s
    Overall bit rate mode                    : Variable
    Overall bit rate                         : 7 420 kb/s
    
    Video
    ID                                       : 1001 (0x3E9)
    Menu ID                                  : 3 (0x3)
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    Format profile                           : High@L4
    Format settings                          : CABAC / 4 Ref Frames
    Format settings, CABAC                   : Yes
    Format settings, Reference frames        : 4 frames
    Codec ID                                 : 27
    Duration                                 : 20 min 45 s
    Bit rate                                 : 6 924 kb/s
    Width                                    : 1 920 pixels
    Height                                   : 1 080 pixels
    Display aspect ratio                     : 16:9
    Frame rate                               : 25.000 FPS
    Standard                                 : Component
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : MBAFF
    Scan type, store method                  : Interleaved fields
    Scan order                               : Top Field First
    Bits/(Pixel*Frame)                       : 0.134
    Stream size                              : 1.00 GiB (93%)
    Color range                              : Limited
    Color primaries                          : BT.709
    Transfer characteristics                 : BT.709
    Matrix coefficients                      : BT.709
    
    Audio
    ID                                       : 256 (0x100)
    Menu ID                                  : 3 (0x3)
    Format                                   : MPEG Audio
    Format version                           : Version 1
    Format profile                           : Layer 2
    Codec ID                                 : 3
    Duration                                 : 20 min 45 s
    Bit rate mode                            : Constant
    Bit rate                                 : 128 kb/s
    Channel(s)                               : 2 channels
    Sampling rate                            : 48.0 kHz
    Frame rate                               : 41.667 FPS (1152 SPF)
    Compression mode                         : Lossy
    Stream size                              : 19.0 MiB (2%)
    Language                                 : English
    Quote Quote  
  2. I only have a few ts files handy to test, and they only have one video and one audio track. But the following works:

    Code:
    for %%F in (*.ts) do "G:\Program Files\MKVToolNix\mkvmerge.exe" --output "%%~nF.mkv" "%%~nxF"
    Change the path mkvmerge.exe.
    Quote Quote  
  3. Member ghazalo's Avatar
    Join Date
    Mar 2015
    Location
    Riyadh
    Search PM
    Originally Posted by jagabo View Post
    I only have a few ts files handy to test, and they only have one video and one audio track. But the following works:

    Code:
    for %%F in (*.ts) do "G:\Program Files\MKVToolNix\mkvmerge.exe" --output "%%~nF.mkv" "%%~nxF"
    Change the path mkvmerge.exe.
    thanks but didn't work

    i have also 1 audio no subs i want simple conversion (file type change)

    the command in my case like this as the MKVtoolnix in C drive


    Code:
    for %%F in (*.ts) do ""C:\Program Files\MKVtoolnix\mkvmerge.exe" --output "%%~nF.mkv" "%%~nxF"
    Quote Quote  
  4. You have two quotes at the start of C:\... There should only be one.

    Also note that the %% syntax is for use in a batch file. If you type it in at a CLI you should use a single %.

    Put a pause on the next line (of the batch file) so you can see any error messages.
    Quote Quote  
  5. Member ghazalo's Avatar
    Join Date
    Mar 2015
    Location
    Riyadh
    Search PM
    Originally Posted by jagabo View Post
    Put a pause on the next line (of the batch file) so you can see any error messages.
    Thank you very much jagabo

    it worked perfectly yes I use batch file
    so the copy and paste I made was wrong, that's why 2 quotes
    thanks man now made my life easier instead of making one by one in mkvtoolnix GUI
    can you write me the text so I can add the pause, it is important to see what is the mistake but the command screen you know disappear super fast

    is it like the attached photo?

    Image
    [Attachment 61474 - Click to enlarge]
    Quote Quote  
  6. Don't use quotes around pause.
    Quote Quote  
  7. Member ghazalo's Avatar
    Join Date
    Mar 2015
    Location
    Riyadh
    Search PM
    ok thanks
    Quote Quote  
  8. If you ever need to use some extra option which is available in MKVToolNix GUI, you can get the corresponding mkvmerge command line with “Multiplexer” => “Show command line” ; then adapt that command into a FOR ... DO ... script.

    Also, since the “Program Files” folder is natively included in the “PATH” variable, it should be unnecessary to put the complete path in the command / script, it should work with “mkvmerge” only (sans quotation marks).
    Code:
    for %%F in (*.ts) do mkvmerge ...
    Quote Quote  
  9. Under
    Preferences>Multiplexer>Adding new files>Create one new multiplex settings tab per file
    Highlight and drag all the files into the gui.
    Quote Quote  
  10. Member ghazalo's Avatar
    Join Date
    Mar 2015
    Location
    Riyadh
    Search PM
    Originally Posted by abolibibelot View Post
    If you ever need to use some extra option which is available in MKVToolNix GUI, you can get the corresponding mkvmerge command line with “Multiplexer” => “Show command line” ; then adapt that command into a FOR ... DO ... script.

    Also, since the “Program Files” folder is natively included in the “PATH” variable, it should be unnecessary to put the complete path in the command / script, it should work with “mkvmerge” only (sans quotation marks).
    Code:
    for %%F in (*.ts) do mkvmerge ...
    Ah thank you you mean I can turn any thing I made in GUI into command line using this ? i feel the command too long and actually didn't work lol
    Code:
    for %%a in (*.mkv) do "C:/Program Files/MKVToolNix\mkvmerge.exe" --ui-language en --output "test\%%~na.mkv" --language 0:und --default-track 0:yes --display-dimensions 0:1280x720 --language 1:jpn --default-track 1:yes --sub-charset 2:UTF-8 --language 2:ara --default-track 2:yes "%%~na.ts" --track-order 0:0,0:1,0:2
    i fixed it into this and works perfectly thanks
    Code:
    for %%a in (*.ts) do ("C:\Program Files\MKVtoolnix\mkvmerge.exe" -o "test\%%~na.mkv" --language 0:und --default-track 0:yes --display-dimensions 0:1280x720 --language 1:jpn --default-track 1:yes --sub-charset 2:UTF-8 --language 2:ara --default-track 2:yes "%%~na.ts" --track-order 0:0,0:1,0:2)



    Originally Posted by blud7 View Post
    Under
    Preferences>Multiplexer>Adding new files>Create one new multiplex settings tab per file
    Highlight and drag all the files into the gui.
    thanks. so you mean I can make multi files in the GUI without needing to learn the command lines?i tried but yet you need to go thorough each tab to do the command
    Last edited by ghazalo; 30th Oct 2021 at 02:53.
    Quote Quote  
  11. Yes you can summon multiple separate tabs from the GUI.
    Quote Quote  
  12. Member hech54's Avatar
    Join Date
    Jul 2001
    Location
    Yank in Europe
    Search PM
    Refusing to use something like MakeMKV does NOT make your genitals larger.
    Quote Quote  
  13. Member ghazalo's Avatar
    Join Date
    Mar 2015
    Location
    Riyadh
    Search PM
    Originally Posted by blud7 View Post
    Yes you can summon multiple separate tabs from the GUI.
    yes I did but i meant yet you need to make the steps for each tab separately, muxing or what i did doesn't go for all tabs in one step



    Originally Posted by hech54 View Post
    Refusing to use something like MakeMKV does NOT make your genitals larger.
    makeMKV? the program for DVD extracting(rip) which we are not extracting anything here, we are changing the file extension for full series in one step.
    Last edited by ghazalo; 31st Oct 2021 at 01:36.
    Quote Quote  
  14. Ah thank you you mean I can turn any thing I made in GUI into command line using this ? i feel the command too long and actually didn't work lol
    Code:
    for %%a in (*.mkv) do "C:/Program Files/MKVToolNix\mkvmerge.exe" --ui-language en --output "test\%%~na.mkv" --language 0:und --default-track 0:yes --display-dimensions 0:1280x720 --language 1:jpn --default-track 1:yes --sub-charset 2:UTF-8 --language 2:ara --default-track 2:yes "%%~na.ts" --track-order 0:0,0:1,0:2
    i fixed it into this and works perfectly thanksi fixed it into this and works perfectly thanks
    Code:
    for %%a in (*.ts) do ("C:\Program Files\MKVtoolnix\mkvmerge.exe" -o "test\%%~na.mkv" --language 0:und --default-track 0:yes --display-dimensions 0:1280x720 --language 1:jpn --default-track 1:yes --sub-charset 2:UTF-8 --language 2:ara --default-track 2:yes "%%~na.ts" --track-order 0:0,0:1,0:2)
    As for why the first version didn't work : one probable mistake is “*.mkv” instead of “*.ts” ; another could be mixing back slash and forward slash characters (but I checked, it works anyway). Otherwise the parentheses are probably unnecessary, and it should work with simply “mkvmerge” instead of the whole path to the executable, provided that the executable is located somewhere in the so-called “PATH” variable (which can be edited).
    As for the length of a single command in Windows CMD command prompt, it's not unlimited, but the limit is far higher than what is needed here :
    “The maximum length of any command line (or variable) within CMD is 8191 characters.
    For all versions of Windows, NTFS and FAT allows pathnames of up to 260 characters.”

    (From ss64.com -- an excellent resource to learn about shell commands.)
    (The second statement above is not entirely true, though, but that's beyond the scope of what's at stake.)



    @hech54
    Refusing to use something like MakeMKV does NOT make your genitals larger.
    That's rude, dude... Besides, having larger genitals is NOT necessarily an advantage — as Christuphuh Moltisanti used to say :
    “I need this like I need a third nut!”
    Quote Quote  
  15. Member ghazalo's Avatar
    Join Date
    Mar 2015
    Location
    Riyadh
    Search PM
    Originally Posted by abolibibelot View Post
    As for the length of a single command in Windows CMD command prompt, it's not unlimited, but the limit is far higher than what is needed here :
    “The maximum length of any command line (or variable) within CMD is 8191 characters.
    For all versions of Windows, NTFS and FAT allows pathnames of up to 260 characters.”

    (From ss64.com -- an excellent resource to learn about shell commands.)
    (The second statement above is not entirely true, though, but that's beyond the scope of what's at stake.)
    thanks a lot
    of course you are expert but what i meant i copied from the mkvtoolnix the command tab(window)and did some adjustment to go in the batch file as full folder (for...do) as you teach me but in compare to the first answer i received by (jagabo)and solved the issue the command was much shorter thus means the programmers such as you and him has direct commands better than copy what the mkvtoolnix command line gives

    but still solving the issue and i think in any future issues using this mechanism will be the solution right?

    many many thanks
    Quote Quote  
  16. thanks a lot
    of course you are expert but what i meant i copied from the mkvtoolnix the command tab(window)and did some adjustment to go in the batch file as full folder (for...do) as you teach me but in compare to the first answer i received by (jagabo)and solved the issue the command was much shorter thus means the programmers such as you and him has direct commands better than copy what the mkvtoolnix command line gives
    Oh I'm far from an “expert” or “programmer” ! I manage to make a few things work on this damn machine... sometimes I gather enough to be able to explain some stuff to another human being...
    As for the command line obtained from MKVToolNix, it should work as-is, but indeed it includes unnecessary characters (extra "" quotation marks, () parentheses, ^escape characters which are not required), with a bit of experience you can strip it down to keep only what's necessary and sufficient. You get a more streamlined command by selecting “don't escape” in the drop-down menu ; in this case you may have to add some (required) quotation marks or escape characters.
    Quote Quote  
  17. Member ghazalo's Avatar
    Join Date
    Mar 2015
    Location
    Riyadh
    Search PM
    Originally Posted by abolibibelot View Post
    I manage to make a few things work on this damn machine
    LOL

    thanks and cheers
    Quote Quote