objective-c – 如何仅流式传输来自YouTube的视频的声音?

前端之家收集整理的这篇文章主要介绍了objective-c – 如何仅流式传输来自YouTube的视频的声音?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我想只传输来自YouTube的声音.我需要这个 IOS,但其他人可以.我在stackoverflow搜索,但我找不到.因为我不想使用其他软件,我只想直接通过代码流式传输YouTube视频的声音.也应该在背景下工作.

解决方法

Flashgot(对于Firefox)只能下载Youtube视频的音频.它暴露了音频的链接,如下所示:

https://r3—sn-p5qlsu7d.googlevideo.com/videoplayback?id=887ce37c617a3225&itag=141&source=youtube&requiressl=yes&gcr=ca&ratebypass=yes&mime=audio%2Fmp4&gir=yes&clen=4012348&lmt=1409362978343745&dur=125.828&signature=0A00B9B16BB6EF3192DF33EEF9B2AB67F66F501F.0B649D407144B914A7CC7BE00E795B5BD1B9D932&upn=VFAbXgDGSU8&key=cms1&fexp=900718%2C924231%2C924637%2C927622%2C930809%2C931354%2C932404%2C9405454%2C941004%2C943917%2C945066%2C947209%2C947218%2C948124%2C952302%2C952605%2C952901%2C955301%2C957103%2C957105%2C957201&sver=3&ip=24.235.37.181&ipbits=0&expire=1419930614&sparams=clen,source&cmbypass=yes&req_id=3eb2c618c54ca3ee&redirect_counter=2&cms_redirect=yes&mm=26&ms=tsu&mt=1419909012&mv=m

好的,这是一个很大的联系.这是相同的链接解剖成块:

https://r3---sn-p5qlsu7d.googlevideo.com/videoplayback?id=887ce37c617a3225
&itag=141
&source=youtube
&requiressl=yes
&gcr=ca
&ratebypass=yes
&mime=audio/mp4 #Here's where audio only is specified.
&gir=yes
&clen=4012348
&lmt=1409362978343745
&dur=125.828
&signature=0A00B9B16BB6EF3192DF33EEF9B2AB67F66F501F.0B649D407144B914A7CC7BE00E795B5BD1B9D932
&upn=VFAbXgDGSU8
&key=cms1
&fexp=900718,924231,924637,927622,930809,931354,932404,9405454,941004,943917,945066,947209,947218,948124,952302,952605,952901,955301,957103,957105,957201
&sver=3
&ip=24.235.37.181 #Oh,look. My IP address.
&ipbits=0
&expire=1419930614
&sparams=clen,source
&cmbypass=yes
&req_id=3eb2c618c54ca3ee
&redirect_counter=2
&cms_redirect=yes
&mm=26
&ms=tsu
&mt=1419909012
&mv=m

很有意思.这使得Flashgot只能下载音频并跳过视频,从而节省带宽.我错过了一些细节,就像FlashGame创建了这个链接一样,但是如果Flashgot有办法做到这一点,那么其他HTTP客户端也可以这么做.

原文链接:https://www.f2er.com/c/112460.html

猜你在找的C&C++相关文章