Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.

Archive with --merge on audio is merging video #45

Closed
MauroS5 opened this issue Aug 23, 2022 · 2 comments
Closed

Archive with --merge on audio is merging video #45

MauroS5 opened this issue Aug 23, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@MauroS5
Copy link

MauroS5 commented Aug 23, 2022

Recently I tried to download a series testing the new version 2.3.0, I can confirm that now is download Spanish dub.
But taking a look to file size is a monster, 10Gb per cap, thats totally impossible.
Taking a look to mkvToolNix I found the script is also merging the videos even with the --merge on audio

Merge on audio:
image

Merge on video:
image

Cleaning this "und" I got a totally fine 1.4Gb per cap

Seems like the ffmpeg command used is still merging the video but without the name of the language and it should not merge that video at all, at least when --merge is set on audio

@bytedream bytedream added the bug Something isn't working label Aug 23, 2022
@LordBex
Copy link
Contributor

LordBex commented Sep 2, 2022

Hallo mir ist dazu beim FFmpeg Befehl ein Fehler aufgefallen die .ts files beinhalten sowohl Audio als auch Video spur
und beim map werden immer alle spuren hinzugefügt wodurch auch die Video Spur 2 mal drinnen ist.
Habe das mal abgeändert mittels -map 1:1 so wird nur die audio Spur und nicht die Video Spur verwendet

Dann fiel mir auch noch auf, dass sich die metadaten 2 mal denn index 0 überschreiben
In meinem Beispiel wird der Japanischen Titel mit dem Deutschen Überschrieben.
Hier muss wohl eine offset rein für die Audiospur welche mit der Videospur hinzugefügt wird.

Vorher:

ffmpeg -y
-i "/var/folders/68/6v1w65fn5mq6b1xm4k254gv00000gn/T/ANIME S01E01.mkv_ja-JP_video_1272962764.ts" 
-i "/var/folders/68/6v1w65fn5mq6b1xm4k254gv00000gn/T/ANIME S01E01.mkv_de-DE_audio_3639397945.aac" 
-i "/var/folders/68/6v1w65fn5mq6b1xm4k254gv00000gn/T/ANIME S01E01.mkv_ar-ME_subtitle_901763341.ass" 
-i "/var/folders/68/6v1w65fn5mq6b1xm4k254gv00000gn/T/ANIME S01E01.mkv_en-US_subtitle_3683364588.ass" 
-map 0
-map 1
-map 2
-map 3
-map 4
....

-metadata:s:v:0 language="ja-JP"
-metadata:s:v:0 title="Japanese"

-metadata:s:a:0 language="ja-JP"    <- hier
-metadata:s:a:0 title="Japanese"

-metadata:s:a:0 language="de-DE"    <-  und hier ist jeweils 0
-metadata:s:a:0 title="German" 

-metadata:s:s:0 language="ar-ME"
-metadata:s:s:0 title=""

-metadata:s:s:1 language="en-US"
-metadata:s:s:1 title="English (US)"
...

-disposition:s:0 0
-c copy
-f matroska /var/folders/68/6v1w65fn5mq6b1xm4k254gv00000gn/T/2798654173

Nachher:

ffmpeg -y 
-i "/var/folders/68/6v1w65fn5mq6b1xm4k254gv00000gn/T/ANIME S01E01.mkv_ja-JP_video_1272962764.ts" 
-i "/var/folders/68/6v1w65fn5mq6b1xm4k254gv00000gn/T/ANIME S01E01.mkv_de-DE_audio_3639397945.aac" 
-i "/var/folders/68/6v1w65fn5mq6b1xm4k254gv00000gn/T/ANIME S01E01.mkv_ar-ME_subtitle_901763341.ass" 
-i "/var/folders/68/6v1w65fn5mq6b1xm4k254gv00000gn/T/ANIME S01E01.mkv_en-US_subtitle_3683364588.ass" 
...
-map 0 
-map 1:1      <- nur die audio spur wird hinzugefügt weil in der ts audio an der 2 stelle ist
-map 2 
-map 3 
-map 4 
...

-metadata:s:v:0 language="ja-JP" 
-metadata:s:v:0 title="Japanese" 

-metadata:s:a:0 language="ja-JP" 
-metadata:s:a:0 title="Japanese" 

-metadata:s:a:1 language="de-DE" 
-metadata:s:a:1 title="German" 

-metadata:s:s:0 language="ar-ME" 
-metadata:s:s:0 title="" 
...
-metadata:s:s:8 title="Spanish (Spain)" -disposition:s:0 0 -c copy -f matroska /var/folders/68/6v1w65fn5mq6b1xm4k254gv00000gn/T/3938389313

Habe das zum provisorischen Test bei
archiveFFmpeg in der for loop für die audio folgende Änderungen gemacht:

var temp = strconv.Itoa(i+len(videoFiles))
maps = append(maps, "-map",  temp + ":1")
metadata = metadata = append(metadata, fmt.Sprintf("-metadata:s:a:%d", i + 1), fmt.Sprintf("language=%s", locale)) 

Für das Laden der Audio Spur hätte ich noch einen Vorschlag:
Man könnte für die Audio Spur die Auflösung der Video Spur verringern da sie ohnehin wegfällt
Kam mir während ich mir das ganze angesehen habe

@bytedream
Copy link
Member

Fixed in release v2.3.1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants