Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Request] Add MKVToolNix spk #974

Closed
Celeamas opened this issue May 7, 2014 · 32 comments · Fixed by #4622
Closed

[Request] Add MKVToolNix spk #974

Celeamas opened this issue May 7, 2014 · 32 comments · Fixed by #4622
Labels
request request for new package

Comments

@Celeamas
Copy link

Celeamas commented May 7, 2014

MKVToolNix shall be usefull for syno users who wants to merge srt to mkv through script.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@Dr-Bean Dr-Bean added the request label May 7, 2014
@mbeebe43083
Copy link

I concur, especially if it is possible to make one with a GUI. I like to remove extra audio tracks to save space and it would be much faster if I didn't have to do it on the desktop

@Diaoul
Copy link
Member

Diaoul commented Jul 17, 2014

I had an attempt to compile it but it has a lot of dependencies. Maybe I can give it another shot.

@ghost
Copy link

ghost commented Nov 6, 2014

Here is a tutorial http://www.synology-forum.de/archive/index.html/t-21316.html?s=743ede6480e9ac0415f4a56f2c950051 maybe you can do something with it.

NB: have a DS214play

@BenjV
Copy link

BenjV commented Dec 1, 2014

Any progress here?
It would be very cool to be able to use mkvmerge on a Synology.

@cytec
Copy link
Member

cytec commented Dec 1, 2014

as far as i can see mkvtoolnix depends on expat, libogg, libvorbis, zlib, boost and optional libflac, lzo, bzip2 which are already available in cross/ also on libebml and libmatroska which are currently not available...

@cytec
Copy link
Member

cytec commented Dec 1, 2014

i gave it a short try and seems like since 5.1.0 it requires support for C++11 which like it seams at least the 4.3 toolchain doesn't have (don't know about 5.x toolchains)

@Dr-Bean
Copy link
Contributor

Dr-Bean commented Dec 1, 2014

If you have the packages setup already, then testing the 5.0 toolchains should be easy enough...those have been merged in after all ;)

@cytec
Copy link
Member

cytec commented Dec 1, 2014

should be... but sadly i had no time to merge the changes back to the branch i'm currently useing :/
hopefully i'll get that done that this week...

@ghost
Copy link

ghost commented Dec 10, 2014

@cytec And did you manage?

@cytec
Copy link
Member

cytec commented Dec 10, 2014

@fn002449 nope, seems to be a problem compiling boost

@BenjV
Copy link

BenjV commented Dec 11, 2014

I am sad to here this.
Would have been very usefull to have the mkvmerge available on my NAS.
Thanks for trying.

@ghost
Copy link

ghost commented Dec 11, 2014

Yeah, it's sad... thx for trying.

@Andbarz
Copy link

Andbarz commented Jan 5, 2015

You can simply use ffmpeg(which is already included in dsm):
to add sub.srt to movie.mp4 just use
ffmpeg -i "movie.mp4" -i "sub.srt" -c copy -map 0 -map 1 "movie.mkv"
For additional option(like setting a language for the subtitles) check the official ffmpeg documentation

@ghost
Copy link

ghost commented Jan 5, 2015

Ah!!! That is nice!! Thank you! I tried it and it works flawless.

Here is a code to add more than one subtitle to one mkv file
ffmpeg -i "old.movie.mp4" -i "dut.srt" -i "eng.srt" -c copy -map 0 -map 1 -map 2 -metadata:s:s:0 language=dut -metadata:s:s:1 language=eng "muxed.movie.mkv"

you can set -v (verbose level) and -y (if you want to overwrite the existing-file with output-file

Thx.

@BenjV
Copy link

BenjV commented Jan 9, 2015

I tested this on my i7 PC with a 1080 .mkv file.
With mkvmerge it took 45 sec to merge the subtitle and vidfeo into one file.
With ffmpeg it took about 45 minutes to do the same.

I don't think it will work on my DS414, it will take forever to do this with ffmpeg.

@ghost
Copy link

ghost commented Jan 9, 2015

Try putting the subtitle in the mkv container without re-encoding the video and audio stream.
That worked for me.

Example:
ffmpeg -v 32 -i "inputfile.mp4" -i "sub.srt" -vcodec copy -acodec copy -scodec srt "muxed.mkv"

PS: I had one strange behaviour. That muxing took very long, but after a restart of my NAS (DS214play) it was gone.

Op 9 jan. 2015 09:21 schreef "BenjV" notifications@github.com:

I tested this on my i7 PC with a 1080 .mkv file.
With mkvmerge it took 45 sec to merge the subtitle and vidfeo into one
file.
With ffmpeg it took about 45 minutes to do the same.

I don't think it will work on my DS414, it will take forever to do this
with ffmpeg.

Reply to this email directly or view it on GitHub
#974 (comment)
.

@BenjV
Copy link

BenjV commented Jan 9, 2015

It sure is faster but ffmpeg keep crashing with "unknown entry" while mkvmerge does it's job fine.
So still no luck.

@Andbarz
Copy link

Andbarz commented Jan 9, 2015

@BenjV You simply forgot or misspelled the ffmpeg option "-c copy" (without quotes).
That option means that the audio, video and subtitles streams will not be encoded, but copied over the new file

@BenjV
Copy link

BenjV commented Jan 9, 2015

@Brontoloo
I thought that I dit a copy paste of the command from your posting but I tried it again today en now it was much faster. So your probably right about that.
Not as fast as mkvmerge that did it in 29 sec and ffmeg in 55 sec but ffmpeg crashed when it was 95% finised.
So still no luck. Fast enough but crashing.

@lews-therin
Copy link

Hi, I would like to second this request. Can someone say anything about the latest status for this package? Can the boost compilation issue have a workaround?

@M0UL
Copy link

M0UL commented Jun 21, 2015

any progress on this?

@kratz00
Copy link
Contributor

kratz00 commented Nov 10, 2015

I gave it a shot. One problem is compiler support, from the official MKVToolNix README.md

A C++ compiler that supports several features of the C++11 standard: initializer lists, range-based "for" loops, right angle brackets, the "auto" keyword, lambda functions, the "nullptr" key word, tuples and alias declarations. For GCC this means at least v4.7.0; for clang v3.3 or later.

There are only a few tool chains which fulfil this requirement.
In my case, DS214+ aka armadaxp, the compiler is too old. The only version of MKVToolNix which should work with this compiler version is version 7.7.0. The current MKVToolNix version is 8.5.2.
I am not sure if it makes sense to support such an old version (version 7.7.0 was released end of February this year).

@cytec
Copy link
Member

cytec commented Mar 4, 2016

seems like DSM6 toolchains come with gcc 4.9 which should finally add C++11 support...

@cytec
Copy link
Member

cytec commented Mar 4, 2016

just in case someone want's to fiddle with DSM6 Toolchains already, this may be a starting point.
Produces valid binaries when PKG_VERS is changed back to 7.7.0

PKG_NAME = mkvtoolnix
PKG_VERS = 8.9.0
PKG_EXT = tar.xz
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://mkvtoolnix.download/sources
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)

DEPENDS  = cross/libogg cross/libvorbis cross/zlib cross/curl cross/flac cross/boost

HOMEPAGE = https://mkvtoolnix.download/index.html
COMMENT  = MKVToolNix is a set of tools to create, alter and inspect Matroska files under Linux, other Unices and Windows.
LICENSE  = GPLv2

GNU_CONFIGURE = 1

COMPILE_TARGET = myCompile
INSTALL_TARGET = myInstall

ADDITIONAL_CXXFLAGS = -std=c++11

include ../../mk/spksrc.cross-cc.mk

CONFIGURE_ARGS = --with-boost-libdir=$(STAGING_INSTALL_PREFIX)/lib --prefix=$(STAGING_INSTALL_PREFIX) --enable-gui=no


.PHONY: myCompile
myCompile:
    $(RUN) ./drake

.PHONY: myInstall
myInstall:
    $(RUN) ./drake install

@GoodOmens83
Copy link
Contributor

You look at optware-ng? It's the new bootstrap. They seem to have mkvtoolnix 8.8.0 working for the few platforms supported.

Checkout https://github.com/Optware/Optware-ng/blob/master/make/mkvtoolnix.mk

@cytec
Copy link
Member

cytec commented Mar 11, 2016

@Dr-Bean nope, didn't know about that... thanks i'll have a look.
The main problem with newer versions (at least for me) was that it depends on nlohmann-json which needs at least GCC 4.8 to build and therefor was not building successfully in any of my tests... see https://github.com/mbunkus/mkvtoolnix/tree/master/lib/nlohmann-json

EDIT: seems like optware-ng uses v 4.2.0 which is pretty old (released in 2010)

@GoodOmens83
Copy link
Contributor

@cytec mkvtoolnix 4.2.0?

No:

synology> ipkg install mkvtoolnix
Installing mkvtoolnix (8.8.0-1) to /opt/...
....
synology> mkvextract --version
mkvextract v8.8.0 ('Wind at my back') 32bit

But I'm on a x86 Synology nas

@goblix
Copy link

goblix commented Jul 2, 2016

@GoodOmens83

**nvm

gonna try this optware-ng and report back here. thanks for the link above

**confirmed optware-ng has mkvtoolnix 8.8.0-3
excellent

@ghost
Copy link

ghost commented Jul 3, 2016

**nvm
Its working :)

@balazsnyitray-seon
Copy link

Ok i installed mkvtoolnix via ipkg optware-ng. whats next? is there a gui? or command line only? what commands are possible?

@Diaoul
Copy link
Member

Diaoul commented Feb 26, 2017

Please use a forum for discussion unrelated to SynoCommunity, this is a bug tracker.

@hgy59 hgy59 mentioned this issue May 11, 2021
3 tasks
@hgy59
Copy link
Contributor

hgy59 commented May 11, 2021

closed by #4622

@hgy59 hgy59 closed this as completed May 11, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
request request for new package
Projects
None yet
Development

Successfully merging a pull request may close this issue.