Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Subtitles from external webvtt files are ignored for on-demand profile #150

Open
matmoi opened this issue Jun 16, 2017 · 0 comments
Open

Comments

@matmoi
Copy link
Contributor

matmoi commented Jun 16, 2017

Example: mp4dash --verbose --subtitles video.mp4 [+format=webvtt,+language=eng]subs.vtt

Subtitle files are simply dropped in mp4-dash.py

Proposed fix:
Source/Python/utils/mp4-dash.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Source/Python/utils/mp4-dash.py b/Source/Python/utils/mp4-dash.py
index 18df29d..3b39b5d 100755
--- a/Source/Python/utils/mp4-dash.py
+++ b/Source/Python/utils/mp4-dash.py
@@ -1389,7 +1389,7 @@ def main():
# for on-demand, we need to first extract tracks into individual media files
if options.on_demand:
(audio_sets, video_sets, subtitles_sets, mp4_files) = SelectTracks(options, media_sources)

  •    media_sources = []
    
  •    media_sources = filter(lambda x: x.format == "webvtt", media_sources) #Keep subtitles
       for track in sum(audio_sets.values()+video_sets.values(), []):
           print 'Extracting track', track.id, 'from', GetMappedFileName(track.parent.media_source.filename)
           track_file = tempfile.NamedTemporaryFile(dir = options.output_dir, delete=False)
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant