Giter Site home page Giter Site logo

Comments (5)

sleepycatcoding avatar sleepycatcoding commented on May 27, 2024

Actually I found a way to accomplish this by using audio_only() and video_only(), but this requires two requests to the manifest file. I do not know if reqwest caches requests to the same file.

from dash-mpd-rs.

emarsden avatar emarsden commented on May 27, 2024

You can use DashDownloader::new(url).keep_audio().keep_video(). This doesn't in fact disable the muxing step but will keep the audio and video as separate files (assuming they are separate content streams).

from dash-mpd-rs.

sleepycatcoding avatar sleepycatcoding commented on May 27, 2024

You can use DashDownloader::new(url).keep_audio().keep_video(). This doesn't in fact disable the muxing step but will keep the audio and video as separate files (assuming they are separate content streams).

If I were to use keep_audio() and keep_video(), is there a way to fetch paths to the files?

EDIT:

Seems the paths are only printed to stdout.

dash-mpd-rs/src/fetch.rs

Lines 2048 to 2057 in 2135788

if downloader.keep_audio {
println!("Audio stream kept in file {tmppath_audio}");
} else if fs::remove_file(tmppath_audio).is_err() {
log::info!("Failed to delete temporary file for audio segments");
}
if downloader.keep_video {
println!("Video stream kept in file {tmppath_video}");
} else if fs::remove_file(tmppath_video).is_err() {
log::info!("Failed to delete temporary file for video segments");
}

from dash-mpd-rs.

emarsden avatar emarsden commented on May 27, 2024

Indeed, there's no API to retrieve that information. Perhaps it would be better to change the interface to something like keep_audio_as(audio-pathname) .

from dash-mpd-rs.

sleepycatcoding avatar sleepycatcoding commented on May 27, 2024

Indeed, there's no API to retrieve that information. Perhaps it would be better to change the interface to something like keep_audio_as(audio-pathname) .

Created a draft PR for this: #26.

from dash-mpd-rs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.