VideoHelp Forum
+ Reply to Thread
Results 1 to 22 of 22
Thread
  1. Member
    Join Date
    Oct 2021
    Location
    Wheeling WV USA
    Search Comp PM
    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.
    Quote Quote  
  2. try this:
    Code:
    yt-dlp https://mpd -o video.%(ext)s
    Quote Quote  
  3. Only for 'HLS Stream':

    yt-dlp --hls-prefer-mpegts ...
    Quote Quote  
  4. Member
    Join Date
    Oct 2021
    Location
    Wheeling WV USA
    Search Comp PM
    Originally Posted by lomero View Post
    try this:
    Code:
    yt-dlp https://mpd -o video.%(ext)s
    bash: syntax error near unexpected token `('
    Quote Quote  
  5. Member
    Join Date
    Oct 2021
    Location
    Wheeling WV USA
    Search Comp PM
    Originally Posted by LZAA View Post
    Only for 'HLS Stream':

    yt-dlp --hls-prefer-mpegts ...
    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>
    Quote Quote  
  6. Member
    Join Date
    Feb 2006
    Location
    United States
    Search Comp PM
    Originally Posted by Skaperen View Post
    Originally Posted by LZAA View Post
    Only for 'HLS Stream':

    yt-dlp --hls-prefer-mpegts ...
    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
    Quote Quote  
  7. Member
    Join Date
    Oct 2021
    Location
    Wheeling WV USA
    Search Comp PM
    Originally Posted by october262 View Post
    Originally Posted by Skaperen View Post
    Originally Posted by LZAA View Post
    Only for 'HLS Stream':

    yt-dlp --hls-prefer-mpegts ...
    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
    instead of the other options or in addition to them? or can you give a whole command example?
    Quote Quote  
  8. Member
    Join Date
    Oct 2021
    Location
    Wheeling WV USA
    Search Comp PM
    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>
    Quote Quote  
  9. on https://mpd you can raplace with valid fresh mpd...
    if you do not enter an mpd link how can you hope to download?
    Quote Quote  
  10. Member
    Join Date
    Oct 2021
    Location
    Wheeling WV USA
    Search Comp PM
    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"
    the command assumes the common shells in Linux and BSD.
    Quote Quote  
  11. Member
    Join Date
    Oct 2021
    Location
    Wheeling WV USA
    Search Comp PM
    i did this command:
    Code:
    yt-dlp -i "$url" --hls-prefer-native --hls-use-mpegts --fixup warn save.ts
    with shell variable "url" set to the URL. the download started going. but it did not save to file "save.ts". instead, it saved to a file it named with info from the web site plus ".mp4.part" appended to the name. and it was one single file that kept growing. i want to have it split into segments so i can convert each individually to webm and concatenate them together into one.

    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 03:25.
    Quote Quote  
  12. -i dont need on yt-dlp. is for ffmpeg
    and replace $url with valid mpd
    if you do not know what is mpd read some old post in this forum
    Quote Quote  
  13. Member
    Join Date
    Jan 2021
    Location
    Argentina
    Search PM
    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 work
    Last edited by lfer94; 17th Nov 2021 at 09:42.
    Quote Quote  
  14. Member
    Join Date
    Oct 2021
    Location
    Wheeling WV USA
    Search Comp PM
    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.
    Quote Quote  
  15. Member
    Join Date
    Jan 2021
    Location
    Argentina
    Search PM
    Execute yt-dlp -F URL and show us the results
    Quote Quote  
  16. Member
    Join Date
    Oct 2021
    Location
    Wheeling WV USA
    Search Comp PM
    Originally Posted by lfer94 View Post
    Execute yt-dlp -F URL and show us the results
    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
    the $ is where i am masking data i am obscuring. it's just a site name and a file name (missing an 'e') that is in the URL.
    Quote Quote  
  17. Member
    Join Date
    Jan 2021
    Location
    Argentina
    Search PM
    Originally Posted by Skaperen View Post
    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
    the $ is where i am masking data i am obscuring. it's just a site name and a file name (missing an 'e') that is in the URL.
    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
    And then merge them using ffmpeg

    Code:
    ffmpeg -i video.ts -i audio.m4a -c copy merged.ts
    If you keep getting the same error it's because the .ts extension doesn't exist in this case, as shown in "available formats" (mp4 only)
    Last edited by lfer94; 19th Nov 2021 at 07:11.
    Quote Quote  
  18. Member
    Join Date
    Oct 2021
    Location
    Wheeling WV USA
    Search Comp PM
    again, "Requested format is not available".

    so, the website has to offer the same container, not just the same encoding? yt-dlp doesn't know how to have ffmpeg re-container it or ffmpeg can't do it?
    Quote Quote  
  19. 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.
    Quote Quote  
  20. youtube-dl -f 3 --hls-prefer-native --hls-use-mpegts "URL" -o video.ts
    Quote Quote  
  21. Member
    Join Date
    Jan 2021
    Location
    Argentina
    Search PM
    Originally Posted by codehound View Post
    It isn't DASH.

    It isn't separate video+audio streams.

    You can download a complete mp4 (or nothing at) 4 diff qualities.
    Yes, you are right.

    I thought it would work like "-vcodec copy -an" works in ffmpeg.

    Originally Posted by Skaperen View Post
    so, the website has to offer the same container, not just the same encoding? yt-dlp doesn't know how to have ffmpeg re-container it or ffmpeg can't do it?
    Hmm, I don't know. Better try with Streamlink.
    Quote Quote  
  22. Member
    Join Date
    Oct 2021
    Location
    Wheeling WV USA
    Search Comp PM
    Originally Posted by LZAA View Post
    youtube-dl -f 3 --hls-prefer-native --hls-use-mpegts "URL" -o video.ts
    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!!
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!