i installed yt-dlp using "pip3 install --no-deps yt-dlp". in an empty directory on an Xubuntu 18.04.6 LTS based system. i tried "yt-dlp --format ts ${URL}" and got the message "Requested format is not available" and exits with status 1. changing "ts" to "mp4" and doing the command, again, and it begins downloading. i also tried "webm" and that fails the same as ts did. i was told in another thread i started that i should download to the "ts" format and that i should use yt-dlp instead of youtube-dl. does anyone know how to get yt-dlp to download to "ts" format, instead of "mp4"?
sorry, i cannot give out the URL.
this is in a new thread because it is a different kind of question.
+ Reply to Thread
Results 1 to 22 of 22
-
-
-
yt-dlp: error: no such option: --hls-prefer-mpegts
Code:lt2a/forums /home/forums 13> yt-dlp https://mpd -o --hls-prefer-mpegts https://mpd -o video.ts ERROR: Fixed output name but more than one file to download: video.ts lt2a/forums /home/forums 14> yt-dlp --version 2021.11.10.1 lt2a/forums /home/forums 15>
-
try --hls-prefer-native --hls-use-mpegts --fixup warn
https://forum.videohelp.com/threads/388974-how-to-use-youtube-dl-or-ffmpeg-to-download-video-in-ts -
-
this is what i get so far
Code:lt2a/forums /home/forums 4> yt-dlp --hls-prefer-native --hls-use-mpegts --fixup warn https://mpd -o video.ts [generic] mpd: Requesting header WARNING: [generic] Could not send HEAD request to https://mpd: <urlopen error [Errno -2] Name or service not known> [generic] mpd: Downloading webpage ERROR: [generic] Unable to download webpage: <urlopen error [Errno -2] Name or service not known> (caused by URLError(gaierror(-2, 'Name or service not known'),)) (caused by URLError(gaierror(-2, 'Name or service not known'),)) lt2a/forums /home/forums 5>
-
on https://mpd you can raplace with valid fresh mpd...
if you do not enter an mpd link how can you hope to download? -
what is the meaning of "mpd"? is that related to "url"? i thought "https://mpd" was some special URL. so as far as i knew, i was giving it some input. an example in the computer world i have experience in would have "$url" or "${url}" where the URL goes (but without the quotes). so, i am still too newbie here and still trying to learn. my TV experience ranges from master control operator to loading and tweaking 2 quadruplex tapes in RCA machines circa 1970s at a TV broadcast station.
when someone suggests an option to try on a command, i won't know if it is to be added somewhere or replace something. that's why whole complete commands would be better.
Code:yt-dlp -i "$url" --format ts "$savefile.ts"
-
i did this command:
Code:yt-dlp -i "$url" --hls-prefer-native --hls-use-mpegts --fixup warn save.ts
edit:
and i want the segments to start with an I-frame even if that affects the segment sizes a little. segments sizes should be about from 1 to 10 minutes, plus or minus a few seconds is OK.Last edited by Skaperen; 17th Nov 2021 at 02:25.
-
Code:
yt-dlp -f bv[ext=mp4]+ba[ext=m4a] --merge-output-format ts "URL"
You can replace m4a with aac, in case it doesn't workLast edited by lfer94; 17th Nov 2021 at 08:42.
-
sound is not an issue (yet). so, i will leave it with "m4a" for now.
i tried that command but i got message "Requested format is not available". i thought that ts could contain what mp4 contained so that yt-dlp would have ffmpeg take h.263 out of mp4 as it came in and put it in ts to save as a file. but that did not happen that way. maybe it is trying to get the website to use the ts and the website is rejecting that.
@lomero which old post tells about "mpd"? i assume this is an acronym. a search here for "mpd" gives many hits. looking at a few talks about URLs with ".mpd" at the end. my URL does not have "mpd" anywhere in it. -
Code:
[$sitename] $filname: Downloading webpage [$sitename] $filname: Downloading m3u8 information [info] Available formats for $filname: ID EXT RESOLUTION │ TBR PROTO │ VCODEC VBR ACODEC ABR ──────────────────────────────────────────────────────────────────── 0 mp4 426x240 │ 488k m3u8_n │ avc1.42c015 488k mp4a.40.2 0k 1 mp4 854x480 │ 1258k m3u8_n │ avc1.4d401f 1258k mp4a.40.2 0k 2 mp4 960x540 │ 2028k m3u8_n │ avc1.4d401f 2028k mp4a.40.2 0k 3 mp4 1280x720 │ 3396k m3u8_n │ avc1.4d401f 3396k mp4a.40.2 0k
-
Ok, so try downloading the video and audio separately
Code:yt-dlp -f bv --hls-prefer-native "URL" --no-part -o video.ts
Code:yt-dlp -f ba "URL" --no-part -o audio.m4a
Code:ffmpeg -i video.ts -i audio.m4a -c copy merged.ts
Last edited by lfer94; 19th Nov 2021 at 06:11.
-
It isn't DASH.
It isn't separate video+audio streams.
You can download a complete mp4 (or nothing at) 4 diff qualities.
If you download as .ts MediaInfo may report 'invalid file extension' - try it. -
Yes, you are right.
I thought it would work like "-vcodec copy -an" works in ffmpeg.
Hmm, I don't know. Better try with Streamlink. -
i get file "video.ts.part" but it is directly playable. so this works. now to segment it into pieces. maybe doing this after the download is done will work for me. pieces seems to be the only way to convert to webm in a way i can reboot in the middle (since the re-encoding is so slow).
thanks!!
Similar Threads
-
Need help for download with yt-dlp
By sibhus in forum Video Streaming DownloadingReplies: 26Last Post: 19th Feb 2024, 15:02 -
How do I download m4s segment videos and combine them to mp4 format ?
By shraman in forum Video Streaming DownloadingReplies: 110Last Post: 18th Jun 2023, 13:52 -
403 Forbidden Error from yt-dlp on mpd file download?
By influx in forum Video Streaming DownloadingReplies: 12Last Post: 5th Oct 2021, 14:48 -
How to Download Videos streaming from mms:// protocol with *.wmv format
By MediaFan in forum Video Streaming DownloadingReplies: 14Last Post: 25th Apr 2018, 10:59 -
how to download caption of streaming video in "srt" format?
By jj20 in forum SubtitleReplies: 6Last Post: 3rd Mar 2017, 10:01