jeckman / YouTube-Downloader

PHP script for downloading videos from youtube; also parsing youtube feed into RSS enclosures for podcatchers
GNU General Public License v2.0
895 stars 473 forks source link

No format stream map found - was the video id correct? #396

Open Azicoly opened 5 years ago

Azicoly commented 5 years ago

Got this error - No format stream map found - was the video id correct? for this link 'nlj9fqTC-BU'

MCrissDev commented 5 years ago

I could reproduce this issue with the newer video uploads, but works fine with uploads from 1 year and older

Azicoly commented 5 years ago

@mCrissDev , you have any idea this can be fixed?

MCrissDev commented 5 years ago

Today i saw the issue too, yesterday same videos worked just fine. I will try to see what could be the problem

SergeyGrinyk commented 5 years ago

+ Do not work, as a rule, old videos that 3 years or more

SergeyGrinyk commented 5 years ago

Someone found out the reason?

jedixraja commented 5 years ago

same here

ghost commented 5 years ago

Yes, the system is not working! In my case, only Music Videos, or protected videos are not downloading. I think Youtube has updated their system and it is not only a Cipher Signature issue this time. Hope you can fix soon! In some web search I could see that others Youtube downloader system are not working too. So the update was general on Youtube.

chadul commented 5 years ago

Same here..

MCrissDev commented 5 years ago

Any news about this?

shujonmahmud commented 5 years ago

"No format stream map found - was the video id correct?" Error found again

I've checked that "url_encoded_fmt_stream_map" no longer available from "get_video_info" using the previous $video_info_url = 'https://www.youtube.com/get_video_info?&video_id=' . $input . '&asv=3&el=detailpage&hl=en_US'; but by changing this one: $video_info_url = 'https://www.youtube.com/get_video_info?&video_id=' . $input . '&sts=17488&hl=en&el=detailpage'; working again in /src/Provider/Youtube/Provider.php. But it's getting another error:

Warning: preg_match_all() expects parameter 2 to be string, array given in C:\xampp\htdocs\YouTube-Downloader-0.10\src\Provider\Youtube\SignatureDecipher.php on line 132

Fatal error: Uncaught Exception: Failed to get deciphers function in C:\xampp\htdocs\YouTube-Downloader-0.10\src\Provider\Youtube\SignatureDecipher.php:136 Stack trace: #0 C:\xampp\htdocs\YouTube-Downloader-0.10\src\Provider\Youtube\Format.php(161): YoutubeDownloader\Provider\Youtube\SignatureDecipher::extractDecipherOpcode('<!DOCTYPE html>...', Object(YoutubeDownloader\Logger\HandlerAwareLogger)) #1 C:\xampp\htdocs\YouTube-Downloader-0.10\src\Provider\Youtube\Format.php(259): YoutubeDownloader\Provider\Youtube\Format->parseUrl() #2 C:\xampp\htdocs\YouTube-Downloader-0.10\src\Application\ResultController.php(156): YoutubeDownloader\Provider\Youtube\Format->getExpires() #3 C:\xampp\htdocs\YouTube-Downloader-0.10\src\Application\App.php(83): YoutubeDownloader\Application\ResultController->execute() #4 C:\xampp\htdocs\YouTube-Downloader-0.10\getvideo.php(23): YoutubeDownloader\Application\App->runWithRoute('results') #5 {main} thrown in C:\xampp\htdocs\YouTube-Downloader-0.10\src\Provider\Youtube\SignatureDecipher.php on line 136

And I did't fix this problem yet. I am requesting to @jeckman please fix this issue.

attackwap commented 5 years ago

"No format stream map found - was the video id correct?" Error found again

I've checked that "url_encoded_fmt_stream_map" no longer available from "get_video_info" using the previous $video_info_url = 'https://www.youtube.com/get_video_info?&video_id=' . $input . '&asv=3&el=detailpage&hl=en_US'; but by changing this one: $video_info_url = 'https://www.youtube.com/get_video_info?&video_id=' . $input . '&sts=17488&hl=en&el=detailpage'; working again in /src/Provider/Youtube/Provider.php. But it's getting another error:

Warning: preg_match_all() expects parameter 2 to be string, array given in C:\xampp\htdocs\YouTube-Downloader-0.10\src\Provider\Youtube\SignatureDecipher.php on line 132 Fatal error: Uncaught Exception: Failed to get deciphers function in C:\xampp\htdocs\YouTube-Downloader-0.10\src\Provider\Youtube\SignatureDecipher.php:136 Stack trace: #0 C:\xampp\htdocs\YouTube-Downloader-0.10\src\Provider\Youtube\Format.php(161): YoutubeDownloader\Provider\Youtube\SignatureDecipher::extractDecipherOpcode('...', Object(YoutubeDownloader\Logger\HandlerAwareLogger)) #1 C:\xampp\htdocs\YouTube-Downloader-0.10\src\Provider\Youtube\Format.php(259): YoutubeDownloader\Provider\Youtube\Format->parseUrl() #2 C:\xampp\htdocs\YouTube-Downloader-0.10\src\Application\ResultController.php(156): YoutubeDownloader\Provider\Youtube\Format->getExpires() #3 C:\xampp\htdocs\YouTube-Downloader-0.10\src\Application\App.php(83): YoutubeDownloader\Application\ResultController->execute() #4 C:\xampp\htdocs\YouTube-Downloader-0.10\getvideo.php(23): YoutubeDownloader\Application\App->runWithRoute('results') #5 {main} thrown in C:\xampp\htdocs\YouTube-Downloader-0.10\src\Provider\Youtube\SignatureDecipher.php on line 136

And I did't fix this problem yet. I am requesting to @jeckman please fix this issue.

at localhost working bro this is i think maybe function curl need to be change

shujonmahmud commented 5 years ago

"No format stream map found - was the video id correct?" Error found again

I've checked that "url_encoded_fmt_stream_map" no longer available from "get_video_info" using the previous $video_info_url = 'https://www.youtube.com/get_video_info?&video_id=' . $input . '&asv=3&el=detailpage&hl=en_US'; but by changing this one: $video_info_url = 'https://www.youtube.com/get_video_info?&video_id=' . $input . '&sts=17488&hl=en&el=detailpage'; working again in /src/Provider/Youtube/Provider.php. But it's getting another error:

Warning: preg_match_all() expects parameter 2 to be string, array given in C:\xampp\htdocs\YouTube-Downloader-0.10\src\Provider\Youtube\SignatureDecipher.php on line 132 Fatal error: Uncaught Exception: Failed to get deciphers function in C:\xampp\htdocs\YouTube-Downloader-0.10\src\Provider\Youtube\SignatureDecipher.php:136 Stack trace: #0 C:\xampp\htdocs\YouTube-Downloader-0.10\src\Provider\Youtube\Format.php(161): YoutubeDownloader\Provider\Youtube\SignatureDecipher::extractDecipherOpcode('...', Object(YoutubeDownloader\Logger\HandlerAwareLogger)) #1 C:\xampp\htdocs\YouTube-Downloader-0.10\src\Provider\Youtube\Format.php(259): YoutubeDownloader\Provider\Youtube\Format->parseUrl() #2 C:\xampp\htdocs\YouTube-Downloader-0.10\src\Application\ResultController.php(156): YoutubeDownloader\Provider\Youtube\Format->getExpires() #3 C:\xampp\htdocs\YouTube-Downloader-0.10\src\Application\App.php(83): YoutubeDownloader\Application\ResultController->execute() #4 C:\xampp\htdocs\YouTube-Downloader-0.10\getvideo.php(23): YoutubeDownloader\Application\App->runWithRoute('results') #5 {main} thrown in C:\xampp\htdocs\YouTube-Downloader-0.10\src\Provider\Youtube\SignatureDecipher.php on line 136

And I did't fix this problem yet. I am requesting to @jeckman please fix this issue.

at localhost working bro this is i think maybe function curl need to be change

I think you are wrong because I am using this script to my website and for not working the script, my site's bounce rate, session, impressions all are down. you should check another YouTube link that needs a signature to download like below: https://www.youtube.com/watch?v=CevxZvSJLk8

attackwap commented 5 years ago

i try to server but no luck even i change url get_video_info, but at xampp localhost its work

butyzon4u commented 5 years ago

Does any one knows how to decipher encrypted video url?

On Sun, Aug 4, 2019, 4:34 PM attackwap notifications@github.com wrote:

i try to server but no luck even i change url get_video_info, but at xampp localhost its work

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jeckman/YouTube-Downloader/issues/396?email_source=notifications&email_token=AHDIAFIIBD32OL5RYTSQBBTQC3SH5A5CNFSM4H7EGKZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3QC6HY#issuecomment-518008607, or mute the thread https://github.com/notifications/unsubscribe-auth/AHDIAFMT7IBR6PVRDJ6A5XTQC3SH5ANCNFSM4H7EGKZQ .

chmas123chmas123 commented 5 years ago

certain video have age restriction you can use $video_info_url = 'https://www.youtube.com/get_video_info?&video_id=' . $input . '&asv=3&el=embedded&hl=en_US'; .......instead of $video_info_url = 'https://www.youtube.com/get_video_info?&video_id=' . $input . '&asv=3&el=detailpage&hl=en_US';

. . . . newly ....status is always ok in "https://www.youtube.com/get_video_info" even if "url_encoded_fmt_stream_map" be empty.. so script cannot detect correct '&el='

my script to solve that automatically parse_str($videoData, $videoData); if (!empty($videoData['url_encoded_fmt_stream_map']))

. . . . . http://filmyou.ir/utube/getvideo.php?videoid=d5zr26j8zF4&type=Download ====>not work

http://filmyou.ir/ut2/d5zr26j8zF4/work fine

attackwap commented 5 years ago

still not lucky for me

ghost commented 5 years ago

Worked! http://u2wap.herokuapp.com/download/CevxZvSJLk8

On Sun, Aug 11, 2019 at 7:13 PM attackwap notifications@github.com wrote:

still not lucky for me

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jeckman/YouTube-Downloader/issues/396?email_source=notifications&email_token=AFLKCEHEDP2GY2UTR4BPAALQD7X5XA5CNFSM4H7EGKZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4A6YOI#issuecomment-520219705, or mute the thread https://github.com/notifications/unsubscribe-auth/AFLKCEDNCBFP2PITCAYIKTLQD7X5XANCNFSM4H7EGKZQ .

attackwap commented 5 years ago

Worked! http://u2wap.herokuapp.com/download/CevxZvSJLk8 On Sun, Aug 11, 2019 at 7:13 PM attackwap @.***> wrote: still not lucky for me — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#396?email_source=notifications&email_token=AFLKCEHEDP2GY2UTR4BPAALQD7X5XA5CNFSM4H7EGKZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4A6YOI#issuecomment-520219705>, or mute the thread https://github.com/notifications/unsubscribe-auth/AFLKCEDNCBFP2PITCAYIKTLQD7X5XANCNFSM4H7EGKZQ .

good but not answer this issue

Izvekov commented 5 years ago

Is there a solution to the problem? http://filmyou.ir/utube/getvideo.php?videoid=https://www.youtube.com/watch?v=ippdJpqHBRo .Many mistakes

toslaw commented 5 years ago

Is there a solution to the problem? http://filmyou.ir/utube/getvideo.php?videoid=https://www.youtube.com/watch?v=ippdJpqHBRo .Many mistakes any solution yet ???

knpau commented 5 years ago

This video is private. You can't download it.

toslaw commented 5 years ago

mine does not download any video, all video give me no format stream map found, ...any help on that

knpau commented 5 years ago

Decipher function is broken, disable it, you still can download most of the videos. Set it to false.

// in config/custom.php return [ 'enable_youtube_decipher_signature' => false,

adamwoo2444 commented 5 years ago

@vladikvenger hey please help us. Tell us how you manage to solve this issue.

jswails commented 5 years ago

i have tested a number of vids tonight. does seem to be just a restricted or age restriction video issue. especially with music. didnt have any issues with non music Im am quoting below a possible fix for those with issues that was already posted but further up the chain. take a look at that.

certain video have age restriction you can use $video_info_url = 'https://www.youtube.com/get_video_info?&video_id=' . $input . '&asv=3&el=embedded&hl=en_US'; .......instead of $video_info_url = 'https://www.youtube.com/get_video_info?&video_id=' . $input . '&asv=3&el=detailpage&hl=en_US';

. . . . newly ....status is always ok in "https://www.youtube.com/get_video_info" even if "url_encoded_fmt_stream_map" be empty.. so script cannot detect correct '&el='

my script to solve that automatically parse_str($videoData, $videoData); if (!empty($videoData['url_encoded_fmt_stream_map']))

. . . . . http://filmyou.ir/utube/getvideo.php?videoid=d5zr26j8zF4&type=Download ====>not work

http://filmyou.ir/ut2/d5zr26j8zF4/work fine

adamwoo2444 commented 5 years ago

@jswails thank you so much for the fix. Can you tell where we have to change the code? line number or file.

Thanks

BelleNottelling commented 5 years ago

These changes are already active. Edit: just the URL change as age restriction workaround

adamwoo2444 commented 5 years ago
Screen Shot 2019-08-31 at 5 00 29 PM

404 error :(

adamwoo2444 commented 5 years ago

@BenNottelling @jswails can you tell me where i have to change. I tried changing url but it did not workout.

toslaw commented 5 years ago

Mine will work fine but after a while, the same download link will bring out the no format stream map found error ...

kindly help

adamwoo2444 commented 5 years ago

@toslaw can you tell me what changes you made?

adamwoo2444 commented 5 years ago

@jeckman if you can provide help :)

muiton commented 5 years ago

@adamwoo2444, I think that this project is abandoned!!! 😅

miadsaadidi commented 5 years ago

@vladikvenger @vladikvenger It worked for you but didn't share anything! keep the competition low, isn't it? I don't understand how someone accept to get a whole script for FREE but can't share a line or 2 of code?!! @chmas123chmas123 if url_encoded_fmt_stream_map is empty what to do? if (!empty($videoData['url_encoded_fmt_stream_map'])){ $any_suggestion_here ? }

I've changed the line: $video_info_url = 'https://www.youtube.com/get_video_info?&video_id=' . $input . '&asv=3&hl=en_US'; with: $video_info_url = 'https://www.youtube.com/get_video_info?&video_id=' . $input . '&sts=17488&hl=en&el=detailpage'; thanks to @shujonmahmud , it works but the download file is empty! [0B]. file to edit : \src\Provider\Youtube\Provider.php

toslaw commented 5 years ago

@toslaw can you tell me what changes you made?

@adamwoo2444 I didn't change any code, it works sometimes and also give the error sometimes

muiton commented 5 years ago

@miadsaadidi everyone wants less competition and to be honest, there were like thousands Youtube Download, but now only few working Youtube Downloader sites are available.

toslaw commented 5 years ago

@chmas123chmas123 please help with a fix, yours is kindof working fine

adamwoo2444 commented 5 years ago

i believe you are the only help @jeckman 😄

jeckman commented 5 years ago

@adamwoo2444 If you're waiting on me to help, you might want to seek other projects.

To be clear, my original usage of YouTube Downloader was to be able to download episodes of video podcasts using youtube as a delivery mechanism to my iPad, which I thought other users might find helpful.

I never had any need for "cipher signature" decryption, and the original version did not include it.

I'm not actively using YouTube-Downloader any more. Every once in a while I use my installation to download a video for watching offline, but I am not a consistent user.

I've also not been much of an active developer since the original release: most of the active contributions at this point are from other folks, who contributed the cipher signature approach, the restructuring of the project to make it more portable, etc.

I am happy to accept working, clean change requests from the community and apply them to the project, but I've got neither the time nor the inclination to rewrite significant portions of it myself.

I'm tempted to just declare that it no longer works with cipher-signature-protected videos and rip out all the references to cipher signature - but it isn't actually even clear to me what the actual issues are at this point. There are always lots of people posting "videos that don't work" but not enough detail to really narrow down the issue.

Is it:

Just triaging and testing the issues itself takes time that I don't have.

I see a lot of code suggestions in these threads but no pull requests, and even if they were made into pull requests I have zero sense of whether they will actually work for the people who are running into issues.

So, until and unless something changes substantially - in the sense of someone showing up with a well written pull request and demonstrated success with that pull request - this problem will continue.

butyzon4u commented 5 years ago

Well spoken. I completely understand you. I believe most folks have managed to get their script working. Regarding what you said. How can one make a working script available for others to use?

On Tue, Sep 3, 2019, 2:42 PM John Eckman notifications@github.com wrote:

@adamwoo2444 https://github.com/adamwoo2444 If you're waiting on me to help, you might want to seek other projects.

To be clear, my original usage of YouTube Downloader was to be able to download episodes of video podcasts using youtube as a delivery mechanism to my iPad, which I thought other users might find helpful.

I never had any need for "cipher signature" decryption, and the original version did not include it.

I'm not actively using YouTube-Downloader any more. Every once in a while I use my installation to download a video for watching offline, but I am not a consistent user.

I've also not been much of an active developer since the original release: most of the active contributions at this point are from other folks, who contributed the cipher signature approach, the restructuring of the project to make it more portable, etc.

I am happy to accept working, clean change requests from the community and apply them to the project, but I've got neither the time nor the inclination to rewrite significant portions of it myself.

I'm tempted to just declare that it no longer works with cipher-signature-protected videos and rip out all the references to cipher signature - but it isn't actually even clear to me what the actual issues are at this point. There are always lots of people posting "videos that don't work" but not enough detail to really narrow down the issue.

Is it:

  • No videos work anymore, for anyone? That seems clearly untrue
  • No cipher-signature protected videos work anymore - that may be true
  • Some cipher-signature protected videos work, some don't - or they work for some installs and not others? - that seems to be true
  • Some people's installations fail for other reasons - ip limiting, geo-restrictions, missing PHP library - that is certainly true

Just triaging and testing the issues itself takes time that I don't have.

I see a lot of code suggestions in these threads but no pull requests, and even if they were made into pull requests I have zero sense of whether they will actually work for the people who are running into issues.

So, until and unless something changes substantially - in the sense of someone showing up with a well written pull request and demonstrated success with that pull request - this problem will continue.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jeckman/YouTube-Downloader/issues/396?email_source=notifications&email_token=AHDIAFMP4QORSZFYP5UOZPLQHZLSTA5CNFSM4H7EGKZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5YBZBI#issuecomment-527441029, or mute the thread https://github.com/notifications/unsubscribe-auth/AHDIAFIX3NHLN2MOR3SHR7LQHZLSTANCNFSM4H7EGKZQ .

adamwoo2444 commented 5 years ago

thank @jeckman . Can you recommend different services you mentioned .Thanks

Izvekov commented 5 years ago

Thanks for the changes. Most earned, but there are videos that continue to produce "No format stream map found - was the video id correct?" For example, this https://www.youtube.com/watch?v=9cskiLgHBeI

Maybe there will be an opportunity to fix the code a little more? Thank.

adamwoo2444 commented 5 years ago

Thanks for the changes. Most earned, but there are videos that continue to produce "No format stream map found - was the video id correct?" For example, this https://www.youtube.com/watch?v=9cskiLgHBeI

Maybe there will be an opportunity to fix the code a little more? Thank.

What changes you made will you please tell us.Thank you

Izvekov commented 5 years ago

The latest version https://github.com/jeckman/YouTube-Downloader throws errors when you try to get a video LhhoDAW_m30 the following Error

Notice: Undefined index: format in /yt/src/Application/ResultController.php on line 101 Notice: Undefined index: adaptive_fmts in /yt/src/Provider/Youtube/VideoInfo.php on line 412 Fatal error: Call to a member function getUrl() on a non-object in /yt/src/Application/ControllerAbstract.php on line 252

Izvekov commented 5 years ago

Proposal. If in different countries different videos are not played, can we connect the servers and if the server in one country can not get a direct link, then pass the request to another, who can get such a link for this video?

miadsaadidi commented 5 years ago

@Azicoly it works for me. image

Izvekov commented 5 years ago

Do you use the same code? And I have on three different servers one and the same mistake.

miadsaadidi commented 5 years ago

I have the lastest version, unless there was an update this week.

adamwoo2444 commented 5 years ago

it did not work on my app

miadsaadidi commented 5 years ago

what do you have on line 101 /yt/src/Application/ResultController.php? can you edit the file with sublime text and share the code line 101? the same thing for /yt/src/Provider/Youtube/VideoInfo.php on line 412