So put the above in a file, and then source it with # fetch the frontend web page and parse the backend url out of it Grep '^*var\ swfArgs*=* | tidy -quiet -wrap 0 2>/dev/null # parse incoming html and return evaluable bash code setting the t and video_id variables You'll need to have tidy installed to run this code, although it might work anyway if you just take out the call to tidy I didn't try that. I ended up writing a few functions that you can put in a file. Looks like they've started randomizing the variable order, so a somewhat different approach is required. ![]() Movie-Aspect is 1.78:1 - prescaling to correct movie aspect. audio_setup: Can't open audio device /dev/dsp: Device or resource busyĪO: 44100Hz 2ch s16le (2 bytes per sample) Selected audio codec: afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio)) Selected video codec: vfm: ffmpeg (FFmpeg H.264) Opening video decoder: FFmpeg's libavcodec codec family Estimating duration from bitrate, this may be inaccurate Resolving v3.lscache2.c. for AF_INET.Ĭonnecting to server v3.lscache2.c.: 80. Resolving v3.lscache2.c. for AF_INET6.Ĭouldn't resolve name for AF_INET6: v3.lscache2.c. Mplayer -fs $(echo " $(curl -s $youtube_url | sed -n "/watch_fullscreen/s. It could be a lot prettier but I will probably follow up with another update when I figure out how to get rid of that pesky Grep. Updated line to work with current YouTube. Most streaming flash players use similar logic to YouTube. If any interest is shown I would be more than happy to provide similar commands for other sites. (I do however fully recommend clive if you wish to archive videos instead of streaming them) In some browsers you can replace $i with just a % or put this in a shell script so all YouTube IDs can be handed directly off to your media player of choice for true streaming without the need for Flash or a downloader like clive. FLV file on Youtube's server and will then will hand that over to mplayer (or vlc or whatever you want) to be streamed. Replace $i with any YouTube ID you want and this will scrape the site for the _real_ URL to the full quality. and tends to work far better than YouTube's ghetto proprietary flash player -) I am sure this can be done better but this does indeed work. ![]() so this a the solution I came up with for that. I found myself totally happy without X (and by extension without flash) and was able to do just about anything but watch YouTube videos. This is the result of a several week venture without X.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |