-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
orf:on - keep or download reports as separate videos #10142
Comments
With |
If you pass the URL of an individual segment (Beitrag) you can also use
I don't think the suggestions by dirkf would work for this video, as no concatenation happens due to a non-segmented version existing. If there is really a demand for this, someone could add an extractor arg. |
On closer examination, what seproDev said. Ofc there are tools outside the scope of this project for detecting and removing ad breaks if you are left with the single-file version. |
Thank you, but both answers don't address my suggestion. For the given example, I'd expect 13 video files. In other examples, I'd shorten some of these video files (e.g. with AVIDemux) and concat them to the whole video. So I'd not expect yt-dlp to detect and remove ad breaks. Having the segments in separate files would just make life much easier. |
So you're asking for the extractor arg to override selecting a single video instead of the multi_video segment playlist, when both are available? |
I'm not sure I fully understand your question. I am even not sure, this option already exists and I didn't find it yet.
No matter what type of video I am downloading, yt-dlp downloads them as a single video - which is already very fine! |
What you want is currently not possible with yt-dlp. The current logic always uses the non-segmented video if it is available. There exist videos where this version does not exist and with I assume something like this is what you want: diff --git a/yt_dlp/extractor/orf.py b/yt_dlp/extractor/orf.py
index f1403d920..21adb9faa 100644
--- a/yt_dlp/extractor/orf.py
+++ b/yt_dlp/extractor/orf.py
@@ -550,7 +550,8 @@ def _real_extract(self, url):
return self._extract_video_info(segment_id, selected_segment)
# Even some segmented videos have an unsegmented version available in API response root
- if not traverse_obj(api_json, ('sources', ..., ..., 'src', {url_or_none})):
+ if (self._configuration_arg('prefer_segmented_version', [False])[0]
+ or not traverse_obj(api_json, ('sources', ..., ..., 'src', {url_or_none}))):
return self.playlist_result(
(self._extract_video_info(str(segment['id']), segment) for segment in segments),
video_id, **self._parse_metadata(api_json), multi_video=True) Then you could run:
to download all individual segments without concatenation. |
Thanks - I'm not sure how I could try this patch. As far as I can understand this, this might work. If this is included in the next (or a future) nightly build, I could try as soon as this is available. |
Might it not be reasonable for the extractor to assume that, if |
Probably a new parameter for |
I don't think |
Should this patch be part of |
No. The issue will be closed once this has been addressed. |
When I started a download today with the version 2024.06.22.232706 and the URL https://on.orf.at/video/14231734/formel-1-grosser-preis-von-spanien without the extractor argument but with "-k", the files were kept separately. I realized a relevant detail: The names of the files should be prefixed with a number so the correct order of these files is obvious. Would it be possible to implement this? |
This is the responsibility of the user; you can use an output template that includes |
DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE
Checklist
Region
Austria
Example URLs
https://on.orf.at/video/14229684
Provide a description that is worded well enough to be understood
Some videos at ORF-ON are provided with separate reports ("Fernsehbeitrag" in German), a typical example is the news "Zeit im Bild". I'd like to have (optional) a separate video for each report as it helps post processing in some cases. One typical example are reports ending with advertisements and if the reports are separate video files, it's relatively easy to remove the advertisements and rejoin the remaining parts to one video file.
Currently all reports are stored as one video file, this is working properly and it would be good if this possibility is kept as there are also videos where no post processing is needed.
Provide verbose output that clearly demonstrates the problem
yt-dlp -vU <your command line>
)'verbose': True
toYoutubeDL
params instead[debug] Command-line config
) and insert it belowComplete Verbose Output
The text was updated successfully, but these errors were encountered: