Hey guys,
i found some scripts that "can" do this, but nothing works really well or stable.
Most of them uses mkvmerge/mkvtoolnix what is the best way i think.
Some of them just removes track1 what is not everytime the correct language.
So the script has to search for language codes.
I can not imagine that nobody here is interested in something like that
I have ~600 movies using around 5,5TB space, i already removed english audio tracks by hand and saved arround 500GB space !!!
In my case it would be great to post process this:
>Only MKV files and minimum file size like 3GB
>Find audio track with language "ger", remove all others
>Remove any subs, because Kodi handles that for me
>Keep chapters
>Remove old mkv when successful processed and use the same mkv name (when possible?)
Here is an example script:
http://lime-technology.com/forum/index. ... ic=22410.0
I cant get that one running, it doesnt find any tracks ...
Thanks !!!
[LINUX] Remove unwanted audio+subs
Re: [LINUX] Remove unwanted audio+subs
So a plain script. not a SABnzbd post processing script?
Find German audio (and subs):
Does that work for you?
Find German audio (and subs):
Code: Select all
ffmpeg -i *.mkv 2>&1 | grep -i Stream.*ger
Code: Select all
$ ffmpeg -i *.mkv 2>&1 | grep -i Stream.*ger
Stream #0:1(ger): Audio: ac3, 48000 Hz, stereo, fltp, 224 kb/s (default)
Stream #0:3(ger): Subtitle: dvd_subtitle (default)
Stream #0:4(ger): Subtitle: dvd_subtitle
Stream #0:5(ger): Subtitle: ssa
Re: [LINUX] Remove unwanted audio+subs
Oh sorry, no i mean a Sabnzbd pp script !
Yes that works fine.
Yes that works fine.
Re: [LINUX] Remove unwanted audio+subs
OK. So just for new downloads.synci wrote:Oh sorry, no i mean a Sabnzbd pp script !
What are you going to do with all the existing downloads? Leave them that way?
Re: [LINUX] Remove unwanted audio+subs
You mean my already downloaded series/movies ?
They are already demuxed by hand
They are already demuxed by hand
Re: [LINUX] Remove unwanted audio+subs
You have done it manually? How?
This is what works for me:
Inspection of the Audio (and Subtitle) Streams:
German Audio is 1, so leave that in. Remove all subs:
Checking:
Yes: only German audio, no subs.
Is that what you want?
What must be the name of the new MKV?
How does Kodi find the needed subtitles? (And why are Kodi's subtitles better than the ones delivered in the MKV?)
This is what works for me:
Inspection of the Audio (and Subtitle) Streams:
Code: Select all
$ ffmpeg -i movie-Ger-Jap-Dub.mkv 2>&1 | grep -i -e Audio: -e Subtitle:
Stream #0:1(ger): Audio: ac3, 48000 Hz, stereo, fltp, 224 kb/s (default)
Stream #0:2(jpn): Audio: ac3, 48000 Hz, stereo, fltp, 224 kb/s
Stream #0:3(ger): Subtitle: dvd_subtitle (default)
Stream #0:4(ger): Subtitle: dvd_subtitle
Stream #0:5(ger): Subtitle: ssa
Stream #0:6(eng): Subtitle: ssa
Code: Select all
$ mkvmerge -o new2.mkv -a 1 --nosubs movie-Ger-Jap-Dub.mkv
mkvmerge v6.7.0 ('Back to the Ground') 64bit built on Jan 9 2014 18:03:17
'movie-Ger-Jap-Dub.mkv': Using the demultiplexer for the format 'Matroska'.
'movie-Ger-Jap-Dub.mkv' track 0: Using the output module for the format 'AVC/h.264'.
'movie-Ger-Jap-Dub.mkv' track 1: Using the output module for the format 'AC3'.
The file 'new2.mkv' has been opened for writing.
Progress: 100%
The cue entries (the index) are being written...
Muxing took 16 seconds.
Code: Select all
$ ffmpeg -i new2.mkv 2>&1 | grep -i -e Audio: -e Subtitle:
Stream #0:1(ger): Audio: ac3, 48000 Hz, stereo, fltp, 224 kb/s (default)
Is that what you want?
What must be the name of the new MKV?
How does Kodi find the needed subtitles? (And why are Kodi's subtitles better than the ones delivered in the MKV?)
Re: [LINUX] Remove unwanted audio+subs
I have done it manually with mkvmerge on my windows system, everytime i downloaded a movie.sander wrote:You have done it manually? How?
Is that what you want?
What must be the name of the new MKV?
How does Kodi find the needed subtitles? (And why are Kodi's subtitles better than the ones delivered in the MKV?)
The name should be the same as original downloaded, after successful demuxing other pp script should start (nzbToCouchPotato)
Maybe the name doesnt matter, but just the demuxed mkv should stay. (Demuxing movie.mkv to movie_tmp.mkv -> OK -> Rename back to movie.mkv, overwrite?)
PreProcessing > Downloading > sab unrars > sab filter extensions > only mkv and nfo left in one dir > demuxing audio > nzbToCouchPotato for renaming and moving.
You are right, subs can stay, makes no sense.
Works great:
Code: Select all
ffmpeg -i movie.mkv 2>&1 | grep -i -e Audio: -e Subtitle:
Stream #0:1(ger): Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s (default)
Stream #0:2(eng): Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s
Stream #0:3(ger): Subtitle: subrip (default) (forced)
Stream #0:4(eng): Subtitle: subrip
mkvmerge -o new2.mkv -a 1 --nosubs movie.mkv
mkvmerge v7.5.0 ('Glass Culture') 64bit gebaut am Jan 4 2015 17:21:29
»movie.mkv«: Der Demultiplexer für das folgende Format wird benutzt: »Matroska«.
»movie.mkv« Spur 0: Das Ausgabemodul für das folgende Format wird benutzt: »AVC/h.264«.
»movie.mkv« Spur 1: Das Ausgabemodul für das folgende Format wird benutzt: »DTS«.
Die Datei »new2.mkv« wurde zum Schreiben geöffnet.
Fortschritt: 100%
Die Cue-Einträge (der Index) werden geschrieben …
Das Muxen dauerte 1 Minute 37 Sekunden.
ffmpeg -i new2.mkv 2>&1 | grep -i -e Audio: -e Subtitle:
Stream #0:1(ger): Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s (default)
My i7 Desktop needs around 3min for that process
Re: [LINUX] Remove unwanted audio+subs
Another idea what would be really great, i dont think its a big deal.
Attach movies nfo to the mkv, mkvmerge command should be this one:
"--attachment-mime-type" "text/plain" "--attachment-name" "movie.nfo" "--attach-file" "/location/movie.nfo"
Attach movies nfo to the mkv, mkvmerge command should be this one:
"--attachment-mime-type" "text/plain" "--attachment-name" "movie.nfo" "--attach-file" "/location/movie.nfo"
Re: [LINUX] Remove unwanted audio+subs
OK, prototype is working. See logging below. I'll post the code tomorrow.
Code: Select all
Language ger to be kept
Searching: /home/sander/Downloads/complete/44cfdaab-aee6-180f-338a-96a15cfa84b4.1
/home/sander/Downloads/complete/44cfdaab-aee6-180f-338a-96a15cfa84b4.1/blabla Zero 11 [Ger-Jap-Dub][Ger-Eng-Sub][AC3 2.0][1080p].mkv
cmd is ffmpeg -i "/home/sander/Downloads/complete/44cfdaab-aee6-180f-338a-96a15cfa84b4.1/blabla Zero 11 [Ger-Jap-Dub][Ger-Eng-Sub][AC3 2.0][1080p].mkv" 2>&1 | grep -i -e Audio:
Stream #0:1(ger): Audio: ac3, 48000 Hz, stereo, fltp, 224 kb/s (default)
Language found in stream 1
Go on
cleanmoviename /home/sander/Downloads/complete/44cfdaab-aee6-180f-338a-96a15cfa84b4.1/cleanedmovie.mkv
command is mkvmerge -o "/home/sander/Downloads/complete/44cfdaab-aee6-180f-338a-96a15cfa84b4.1/cleanedmovie.mkv" -a 1 --nosubs "/home/sander/Downloads/complete/44cfdaab-aee6-180f-338a-96a15cfa84b4.1/blabla Zero 11 [Ger-Jap-Dub][Ger-Eng-Sub][AC3 2.0][1080p].mkv"
mkvmerge v6.7.0 ('Back to the Ground') 64bit built on Jan 9 2014 18:03:17
'/home/sander/Downloads/complete/44cfdaab-aee6-180f-338a-96a15cfa84b4.1/blabla Zero 11 [Ger-Jap-Dub][Ger-Eng-Sub][AC3 2.0][1080p].mkv': Using the demultiplexer for the format 'Matroska'.
'/home/sander/Downloads/complete/44cfdaab-aee6-180f-338a-96a15cfa84b4.1/blabla Zero 11 [Ger-Jap-Dub][Ger-Eng-Sub][AC3 2.0][1080p].mkv' track 0: Using the output module for the format 'AVC/h.264'.
'/home/sander/Downloads/complete/44cfdaab-aee6-180f-338a-96a15cfa84b4.1/blabla Zero 11 [Ger-Jap-Dub][Ger-Eng-Sub][AC3 2.0][1080p].mkv' track 1: Using the output module for the format 'AC3'.
The file '/home/sander/Downloads/complete/44cfdaab-aee6-180f-338a-96a15cfa84b4.1/cleanedmovie.mkv' has been opened for writing.
Progress: 0%
Progress: 3%
Progress: 4%
Progress: 5%
Progress: 6%
Progress: 7%
Progress: 9%
Progress: 12%
Progress: 13%
Progress: 17%
Progress: 20%
Progress: 22%
Progress: 26%
Progress: 29%
Progress: 31%
Progress: 34%
Progress: 37%
Progress: 38%
Progress: 42%
Progress: 46%
Progress: 48%
Progress: 51%
Progress: 54%
Progress: 56%
Progress: 57%
Progress: 60%
Progress: 61%
Progress: 63%
Progress: 66%
Progress: 68%
Progress: 100%
The cue entries (the index) are being written...
Muxing took 16 seconds.
Re: [LINUX] Remove unwanted audio+subs
Wow thanks a lot !!!
I´ll try it now and maybe i can add the nfo feature, a quest for me but funny
I´ll try it now and maybe i can add the nfo feature, a quest for me but funny
Re: [LINUX] Remove unwanted audio+subs
Let me know the result.synci wrote:Wow thanks a lot !!!
I´ll try it now and maybe i can add the nfo feature, a quest for me but funny
Can you give more info about the .nfo file? What does it contain? Is there always just one .nfo, in the same directory as the .mkv?
Re: [LINUX] Remove unwanted audio+subs
I will.
Yes, normaly there is the mkv and just 1 nfo, thought it would be great to attach it to the mkv for future investigastions
Yes, normaly there is the mkv and just 1 nfo, thought it would be great to attach it to the mkv for future investigastions
Re: [LINUX] Remove unwanted audio+subs
So .. works great and fast, is it possible to auto delete the old mkv and just keep cleanedmovie.mkv ?
Or directly overwrite the original one and dont creating a new mkv ?
Now i have 2 mkvs in my dir, i think SickRage doesnt like that.
*EDIT* Just inspected code, i think its already on your TODO list ?
Or directly overwrite the original one and dont creating a new mkv ?
Now i have 2 mkvs in my dir, i think SickRage doesnt like that.
*EDIT* Just inspected code, i think its already on your TODO list ?
Re: [LINUX] Remove unwanted audio+subs
OK, deleting added. See same link (thus: https://raw.githubusercontent.com/sande ... nd-subs.py)