Code: Select all
file <filename>Code: Select all
# emerge -pv ffmpeg mplayer
* Last emerge --sync was 160d 1h 3m 9s ago.
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild R ] media-video/ffmpeg-4.4-r1:0/56.58.58::gentoo USE="X alsa amr amrenc bzip2 cdio cpudetection dav1d doc encode gmp gnutls gpl iconv jack libdrm mp3 network openh264 postproc rubberband theora threads vaapi vpx x264 x265 xvid zlib (-appkit) -bluray -bs2b -chromaprint -chromium -codec2 (-cuda) -debug -fdk -flite -fontconfig -frei0r -fribidi -gcrypt -gme -gsm -hardcoded-tables -iec61883 -ieee1394 -jpeg2k -kvazaar -ladspa -libaom -libaribb24 -libass -libcaca -libilbc -librtmp -libsoxr -libtesseract -libv4l -libxml2 -lv2 -lzma (-mipsdspr1) (-mipsdspr2) (-mipsfpu) (-mmal) -modplug -openal -opencl -opengl -openssl -opus -oss -pic -pulseaudio -rav1e -samba -sdl -snappy -sndio -speex -srt -ssh -static-libs -svg -test -truetype -twolame -v4l -vdpau -vidstab -vorbis -vulkan -webp -zeromq -zimg -zvbi" ABI_X86="(64) -32 (-x32)" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext sse sse2 sse3 sse4_1 sse4_2 ssse3 -3dnow -3dnowext -fma4 -xop" FFTOOLS="aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart sidxindex trasher" VIDEO_CARDS="nvidia" 0 KiB
[ebuild R ] media-video/mplayer-1.4-r1::gentoo USE="X alsa bs2b cdio cdparanoia cpudetection dga dvd dvdnav enca encode iconv ipv6 jack jpeg libass mp3 network opengl osdmenu rtc shm truetype unicode xscreensaver xv xvid yuv4mpeg -a52 -aalib (-altivec) (-aqua) -bidi -bl -bluray -cddb -debug -doc -dts -dv -dvb -faac -faad -fbcon -ftp -ggi -gsm -joystick -ladspa -libcaca -libmpeg2 -lirc -live -lzo -mad -md5sum -mng -nas -openal -oss -png -pnm -pulseaudio -pvr -radio -rar -rtmp -samba -sdl (-selinux) -speex -tga -theora -toolame -tremor -twolame -v4l -vcd -vdpau (-vidix) -vorbis -x264 -xinerama -zoran" CPU_FLAGS_X86="mmx mmxext sse sse2 ssse3 -3dnow -3dnowext" VIDEO_CARDS="-mga" 0 KiB
Total: 2 packages (2 reinstalls), Size of downloads: 0 KiB
Code: Select all
$ mplayer foo.unknown_video
MPlayer 1.4-9.3.0 (C) 2000-2019 MPlayer Team
Playing foo.unknown_video.
libavformat version 58.76.100 (external)
libavformat file format detected.
[lavf] stream 0: subtitle (text), -sid 0
LAVF: no audio or video headers found - broken file?
No stream found.
Exiting... (End of file)Attempting to get the indicated video with wget results in "Connection refused".https:\/\/site\/videos\/directory_1\/directory_2\/directory_3\/video.mp4?validfrom=1644595194&validto=1645602394&rate=50000k&burst=50000k&hash=L3%2BBwTLIFA3UfTEYs2uqZ9LgkBw%3D
Code: Select all
youtube-dl https://www.youtube.com/watch?v=EngW7tLk6R8
and then immediately displays a command prompt ($) followed by four lines, namely[1] 24084
[2] 24085
whereupon I get no new command prompt - as I suppose it ($) was already printed before the four lines following it were output. By the way, "website" and "my_url" are place holders for the actual website and url.$ [website] 38971641: Downloading webpage
[website] 38971641: Downloading m3u8 information
[download] Destination: foo.unknown_video
[download] 100% of 892.00B in 00:00
results in the output of "ls" being sent to the xterminal before the four lines mentioned above. I suppose youtube-dl creates and puts two jobs in the background, evidenced by the outputyoutube-dl my_url ; ls
and those jobs are responsible for the four lines of output mentioned above (which took place after "ls" had finished).[1] 24084
[2] 24085
Code: Select all
youtube-dl 'https://foo.example/play?vid=abc123' ; lsCode: Select all
youtube-dl --restrict-filenames 'https://www.youtube.com/watch?v=i-x5SQmajnM'
Is 'youtube-dl' more than 160 days old now as well? :]dpaddy wrote:Code: Select all
# emerge -pv ffmpeg mplayer * Last emerge --sync was 160d 1h 3m 9s ago.
As hinted at elsewhere, you should sync your tree and apply pending updates.dpaddy wrote:Code: Select all
# emerge -pv ffmpeg mplayer * Last emerge --sync was 160d 1h 3m 9s ago.
Check whether emacs has a mode for playing video?dpaddy wrote:Opening foo.unknown_video in an editor (emacs)
That is weird. Even if the URL were to a path which the server refused to return, Connection refused should not happen. That should be reserved for "The server process is not running, so the peer kernel refused to accept the TCP connection."dpaddy wrote:reveals it to be meta data for a video (including a url) of the typeAttempting to get the indicated video with wget results in "Connection refused".https:\/\/site\/videos\/directory_1\/directory_2\/directory_3\/video.mp4?validfrom=1644595194&validto=1645602394&rate=50000k&burst=50000k&hash=L3%2BBwTLIFA3UfTEYs2uqZ9LgkBw%3D
You don't recognize the current time when printed as a Unix epoch?dpaddy wrote:I conjecture that the "validfrom" and "validto" are timestamps
Code: Select all
$ date -u -d @1644595194
Fri Feb 11 15:59:54 UTC 2022
$ date -u -d @1645602394
Wed Feb 23 07:46:34 UTC 2022Assuming you recounted the wget error correctly, you need to point wget to a server that is actually listening. The path is irrelevant if the server will not listen to you. The full output of wget would be helpful here. Anonymize the URL and hostname if you must, but show all the other status data.dpaddy wrote:Any ideas concerning how to modify the url (perhaps timestamps and hash) so as to enable wget to succeed?
Your shown URL, even anonymized, has significant shell metacharacters. Specifically, &, which was backgrounding the command. You ran the equivalent of:dpaddy wrote:Quoting the URL on the command-line does make a difference, thanks for that.
Code: Select all
youtube-dl https:\/\/site\/videos\/directory_1\/directory_2\/directory_3\/video.mp4?validfrom=1644595194 & # Placed into background. Note the badly truncated URL.
validto=1645602394 & # Backgrounded assignment. This is useless, but probably harmless.
rate=50000k & # Same.
burst=50000k & # Same.
hash=L3%2BBwTLIFA3UfTEYs2uqZ9LgkBw%3D # Foreground assignment. Useless, but probably harmless.As you wish. However, it would be much easier for us to help you if we had a working example. It need not be the specific video you are trying to fetch, but having it come from the same server software would help.dpaddy wrote:I would rather not.
Maybe, but based on how I decode them, they appear to be valid for days at a time, so even at human reaction speeds, you should have gotten correct results when doing this by hand.dpaddy wrote:Anyhow, I conjecture that the time stamps are the problem so if I could make a bash script that executes wget soon enough then I might succeed.
If you post the script, we could review it for you.dpaddy wrote:Through trial and error I managed to get a bash script
The thread would be of more use if you share the script, so that the next person does not need to reimplement it.dpaddy wrote:I would imagine that different sites may return different metadata, but perhaps this thread could nevertheless be of some use to others.