Metztli I. T.  Blog

    Back to Metztli IT Main Site
Posted by jose on Sep 10 2007 in OS/2
  • « OS/2 Gradd video driver for Virtual Machine or older hardware.
  • Empathy based tricks scammers use. »

youtube-dl on OS/2

Have you ever wanted to download youTube videos from within your OS/2 environment?

Under my Linux Debian environment there is a small shell oriented utility that is called youtube-dl that will download the youTube video that you provide as argument.  For instance:

Shell

youtube-dl https://youtu.be/WYCFR-0N0b0

(Updated 08-21-2021 to get over issue introduced by Youtube CEO Polish CENSOR and ex-sister-in-law to Google's co-founder1!)

will download the Flash video file (extension may be flv).  Subsequently, an user may play the Flash video file, for example with mPlayer under OS/2.

Well here are some instructions that will permit you to download youTube files from within your OS/2 (or its reincarnation, eCS ), thanks to GNU General Public License software like Python, ported to OS/2 by Andrew MacIntyre and to Ricardo Garcia Gonzalez's Python script  that enpowers the user to fetch the videos.

And yes, I should not forget that what makes Python and the youTube-dl script to function under OS/2 is the (also) GNU GPL EMX enabler by Eberhard Mattes.  Is not the collaboration enabled by GNU's GPL wonderful!?

We begin by downloading the emx runtime for OS/2 from the Hobbes archive site, needed as the enabler --without it none of what follows would be possibe: emxrt.zip. 

And proceed to download the GNU Shell Utilities.  We need specifically, the env.exe and gnushu.dll found compressed in the GNU Shell Utilities collection.

Further, the need for an shell is necessary.  Minimally, you will need sh.exe, that you can extract from the Hobbes Public Domain of the Korn shell or from an older but excellent version of the above. I will be using the latter older version for this exercise. (UPDATE 12-21-2016; have not tried it but there is mksh recently available B)

Next, we download the Python interpreter binaries from Hobbes.  According to Ricardo, his Python script requires the Python interpreter version "2.4 or later."  We should be fine, since the Python binary version at Hobbes is 2.44.

Then we are ready to work.  Open an OS/2 window command prompt; by default your location in the OS/2 file sytem will be at the root drive.  I will assume for our purposes that your root drive is E: (where my virtual image of Warp 3 resides).  Proceed to create a working directory, then:

MKDIR WorkSpace

OS/2 MKDIR WorkSpace

 

We proceed to download the files that we referenced above into our E:\WokSpace directory.  After we do so, we proceed to verify that we have all the files that we will need:

DIR WokSpace 

 OS/2 2.11 DIR WorkSpace thumbnail

 Yo will notice an extra file, the PkWare free version of the OS/2 native utility pkzip.exe; of course, you may use any other extractor but make sure that you know how to extract directory paths also.

Thus, we begin our process.  We change directory to WorkSpace and proceed to extract our pkzip.exe (that I have highlighted);

CD WorkSpace

 pkos2250.exe

MOVE pkzip.exe \OS2\. 

 CD WokSpace and pkos2250.exe thumbnail

 As illustrated, we move the pkzip.exe utility to the OS2 directory so that we can execute it from anywhere in our directory structure.

Next we go back to the root drive E: and proceed to extract the highlighted EMX runtime:

CD .. 

pkzip /extr /dir WorkSpace\emxrt.zip

 Extract emxrt thumbnail

 So we have created a directory called emx where we will install all our utilities to make our youtube-dl work.

Note that if you want an OS/2 command window  larger than the default but not full screen, try:

MODE CO80,41 

(Note, above, that the argument to MODE is C followed by the letter O, then 8 followed by the number zero).

 Proceed to change your directory to emx by typing:

CD emx 

 pkzip /extr /dir \WorkSpace\sh-utils-2.0.zip

 Cd emx and Extract gnusutil thumbnail

The specific files that we will need for the specific task are among those highlighted; notwithstanding, becoming familiar with those unix utilities, will allow you to naturally use the powerful and free Linux operating system --you will not have to enter "activation codes" to use it, you will have higher resilency to viruses, and your environment will be much more stable than proprietary offerings.

 We continue and extract the next file:

pkzip /extr /dir \WorkSpace\ksh527rt.zip

 Extract ksh527rt.zip thumbnail

Again, the specific files that we will need are highlighted and, before extracting the Python binaries, let us move the highlighted files to their proper directories on E:\emx\bin and E:\emx\dll,

MOVE pdksh\ksh.exe \bin\.

MOVE pdksh\sh.exe \bin\. 

as illustrated in the above screenshot.  Additionally, once we are at it, let us move the files from the prior extraction of the file gnusutil.zip:

MOVE exe\*dll dll\.

 thus we move the two only dll files, gnuregex.dll and gnushu.dll,  in the exe directory to the proper directory E:\emx\dll.  We do the same with env.exe, moving it to E:\emx\bin directory:

MOVE exe\env.exe bin\. 

MOVE *dll env.exe to bin thumbnail 

Now we are ready to install the Python binaries by extracting the appropriate file:

 pkzip /extr /dir \WorkSpace\python-2.4.4-emx-bin-070101.zip

Extract Python binaries thumbnail 

 And, as above, we proceed to move the files with an .exe and .dll extension to their proper emx directory structure:

MOVE python244\*exe bin\.

MOVE python244\*dll dll\. 

DIR and MOVE Python EXEs and DLLs thumbnail 

 That is it!  We only have to copy and paste Ricardo Garcia Gonzalez's Python script into the OS/2 E.EXE or EPM.exe editor and save the file with a name like youtube-dl --because we like Unix short and cool names , do not we?!  But before we save the youtube-dl file in the E:\emx\bin directory, we must add something to make it execute under OS/2 --remember this file comes from Unix/Linux conventions.

Opening the original Python script in an OS/2 editor, it can be seen that only the modification of the very first line that contains the "sh bang" needs to be modifified to suit the OS/2 environment.

In other words, we change the very first directive:

#!/usr/bin/env python

to

#!/emx/bin/env.exe python 

 Sh bang modification to OS/2 thumbnail

remember above that we moved the env.exe and its supporting gnushu.dll into its respective directories under emx?

Ok, so after the modified file is saved in the directory E:\emx\bin, we are ready for the final phase of our exercise.  Let's create an OS/2 commad file so that we do not have to alter our important OS/2 CONFIG.SYS file; let us call it myPython.cmd and save it under E:\OS2 directory like we did with the pkzip.exe file, remember?

OS/2 command file myPython.cmd thumbnail 

As an aside, under my OS/2 2.11, I had to actually modify my CONFIG.SYS because the oldie operating system did not support dynamic LIBPATH environment variable statements that we enjoy in OS/2 Warp 3 and above. 

So after I modified OS/2 2.11 CONFIG.SYS and rebooted, I typed:

myPython.cmd 

 and the appropriate variables were set.  We need to verify if the Python interpreter is working since the youtube-dl script depends on it.  Hence I proceed to do that very thing and enter:

python 

 and my oldie OS/2 2.11 can not cope with it.

 Python failed on OS/2 2.11 thumbnail

Humm, I had just tested the shell and it worked...

Selecting the additional information radio button on the radio message, I can see that it is due to the DOSCALL1.DLL.  Warp 3 and above have an improved, totally modern equivalent that I should try best.

Python failed on OS/2 2.11 DOSCALL thumb nail 

 So I fire up my OS/2 Warp 3 Connect and perform the same procedure on as on my 2.11 version of OS/2.  I also add an extra line to my file myPython.cmd, and rename it to myPythonMod.cmd, so that the shell utility, sh.exe, needed by the youtube-dl will start on another OS/2 window shell with an nice title:

Warp 3 Connect modified Python CMD thumbnail 

 Now I open an OS/2 windowed command shell and enter:

myPythonMod

 The environment variables being set are echoed to the screen and at the end of myPythonMod.cmd the directive to start a sh.exe utility with an title is honored --openning another window with the sh.exe prompt:

#

myPythonMod.cms opens another sh.exe shell thumbnail 

Finally, we are ready to download our youTube flash video.  Yes, there is some work to set up but after it is done you can simply type as I will now do as an very simple example:

 youTube download thumbnail

Well the sh.exe may be replaced with ksh.exe and you would have a more friendly environment, needless to say.  Further, as can be deduced from the virtually infinite creativity of the open source communities --that can not be matched by proprietary vendors who spread fear uncertainty, and doubt (FUD)-- there are other ways to achieve the same goal.

Since I use as my default the EMX base for Unix/Linux like behaviour in my OS/2 environment, this is my approach only. I had pondered about the feasability of youtube-dl on OS/2 for some time now.  I had to wait for a long job to finish on another machine  and decided to use my time enabling OS/2 for one more modern use.  Indeed, I have come to the conclussion --hope that you share it with me-- that OS/2 rocks!


1 "Her sister Anne is the founder of the genetic-testing company 23andMe and was married to Google co-founder Sergey Brin." via NeoMcCarthyism as a smoke screen to hide the crisis of neoliberalism

DISCLAIMER:

Please do not hold me, or Metztli Information Technology, responsible if the information provided does not work in your environment --I do not guarantee that the procedure will perform adequately and may even render your machine unusable.

I have provided the information in good faith hoping that other computer users (especially OS/2ers) will benefit from it --but if you try it you do so at your own risk.

 

This entry was posted by Jose and filed under OS/2.

3 comments

Comment from: ultragear Visitor

ultragear

hi,
great instruction, but
the youtube-dl video isnt available anymore .. :)

where can i get this cool desktop background image
from your screen shots ?

02/10/09 @ 13:18

Comment from: Jose Member

Good day, ultragear-

The youtube video was only an example dating back to the time I created the post; the main point was to show the viability of OS/2 to download youTube videos with the Python script.

The background image that you are referring to is from the collection that came with OS/2 Warp Server for eBusiness (WSeB). OS/2 is not open source software (OSS); hence, the image is proprietary and can not be distributed freely. If you are interested in signing a petition to have OS/2 open sourced, you may find further information at http://www.os2world.com/petition

Happy ultragear selling!

02/11/09 @ 00:59

Comment from: Ehinarr Visitor

Ehinarr

Great post and OS/2 is still alive. Any updates on this? Tahnks

05/29/09 @ 13:13


Form is loading...

My blogs

  • Metztli IT's
  • Metztli Bits
  • Ixiptli
  • TIGroup
  • Amatl
  • Calli
May 2025
Mon Tue Wed Thu Fri Sat Sun
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  
 << <   > >>

NahuiFS: Reiser4 Wiki (link)

Reiser4 Official Reference wiki

Apache OpenOffice: Suite libre y gratuita para la oficina

OpenOffice download: Bajar suite de Oficina Abierta

Axitlani

Send Telegram to @metztli_it ?

Metztli Reiser4 based on Debian Amatlocuilin, i.e., Bookworm

Download Metztli Reiser4 Debian 12 Amatlocuilin, i.e., Bookworm, Installer
Click image to be directed to download for free Reiser4-enabled Debian-Installer netboot ISO image hosted at SourceForge

Tlacayotl: Человечество : Humanity : Humanidad

  • Israeli forces Genocidal Apartheid Zionists land thieves arrested 22-yro Palestinian activist Ahed Tamimi in the village of Nabi Saleh in the occupied West Bank.

  • - Ahed Tamimi (Arabic: عهد التميمي, romanized: ‘Ahad at-Tamīmī, also romanized Ahd; born 31 January 2001)] is a Palestinian activist from the village of Nabi Salih in the occupied West Bank in Palestine. She is best known for appearances in images and videos in which she confronts Israeli soldiers.
  • Over a week ago they arrested her father, Bassem Tamimi while he was trying to make his way to Jordan. The family still has no idea where he’s being held.
- Israeli soldiers raided Ahed Tamimi’s home, turned everything upside down and held her mother in another room, preventing her from being with her daughter.
Human Rights Abuses Telegram

Spanish Cartel : Cártel Español

Spanish Cartel : Cártel Español

Search

  • Home
  • Recently
  • Archives
  • Categories
  • Latest comments

Categories

Metztli I. T.  Blog

  • Current Trends
    • Cloud Computing
      • Platform as a Service
    • nginx
  • Linux
    • Applications
      • Office
        • Symphony
          • Apache OpenOffice
        • uninstall/install
    • Debian
    • Installation
    • Java
    • Reiser4
    • reiser5
    • system
  • OS/2
    • Applications
    • Google Web Toolkit
  • Social Nework
  • Spam/Scam
  • Virtualization
  • php7

XML Feeds

  • RSS 2.0: Posts, Comments
  • Atom: Posts, Comments
What is RSS?

Learn, support Nahuatl...


Powered by translatenahuatl.com

University of Oregon Wired Humanities' Nahuatl Dictionary appreciates your donation.
Rechercher directement un mot Nahuatl

Metztli IT's recent entries:

  • Debian Amatlocuilin, i.e., Bookworm, & Metztli Reiser4 5.17.13-1+reiser4.0.2 downgraded Linux Kernel
  • Tlacatecolotl: OS/2 for Symmetrical Multiprocessing(SMP) v2.11 HPFS386 on Headless VirtualBox 7.0.12
  • The Ritual of a Reiser4 Debianized Kernel Macuilli.Caxtolli_Omome.Matlactetl_Omome (5.17.12) Build
  • Tlahuizcalpanteuhctli
  • Reiser4 and Linux version Macuilli.Matlactli, i.e., 5.10
  • Reiser5 Moiocoiani: Metztli Reiser4, Software Framework Release Number (SFRN) 5.1.3 Debian installer
  • Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs
  • Build PHP 7.3.9̶ 10 ZTS and puppies...er, pthreads, on Metztli Reiser4: Как же мало нужно для счастья.
  • Build PHP 7.3.5̶ 6 for Nginx 1.17.0 on Metztli Reiser4 'the Debian Way' for Stretch Backports on AMD64.
  • Nginx at Metztli IT: ModSecurity v3 module, Engine X v1.15.9, and libmodsecurity3 Connector, Integrated Hack.

Open Source Power!

Powered by Nginx at Metztli IT

Powered by MariaDB

Protected by Zmanda

Recent comments

  • Artur on Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs
  • vato on Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs
  • Artur on Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs
  • Jordi L'Escala on Building A Reiser4-Patched Development Linux Kernel Package 'The Debian Way'.
  • hans on Building A Reiser4-Patched Development Linux Kernel Package 'The Debian Way'.
  • jess on OS/2 Warp Server for E-Business (WSEB) hosting b2evolution 2.4.2 "Palms" stable.
  • vato on Hecamalotl: OS/2 Hosting Drupal 7.0 RC1 Content Management System (CMS)
  • Per on Hecamalotl: OS/2 Hosting Drupal 7.0 RC1 Content Management System (CMS)
  • Alen on OS/2 Gradd video driver for Virtual Machine or older hardware.
  • Anonimo on Deploying b2evolution blog/CMS on Red Hat's Cloud OpenShift PaaS
Metztli Reiser4 on AMD Epyc Cloud Fabric

©2025 by Jose • Contact • Help • Forums software