User Tools

Site Tools


howto:save-streams

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
howto:save-streams [2021/12/05 18:57] Wulf Rajekhowto:save-streams [2025/02/24 12:12] (current) Wulf Rajek
Line 1: Line 1:
-====== Saving Audio/Video Streams ======+====== Saving Audio/Video/Photo Streams ====== 
 + 
 +===== streamrip ===== 
 + 
 +https://pypi.org/project/streamrip/ 
 +https://github.com/nathom/streamrip 
 + 
 +{{:howto:pasted:20231106-230922.png?600}} 
 + 
 +<code>pip3 install streamrip --upgrade</code> 
 + 
 +on Mint22 with pipx: 
 +<code> 
 +pipx install streamrip 
 +# or  
 +pipx upgrade streamrip 
 +# or for development version 
 +pipx install git+https://github.com/nathom/streamrip.git@dev 
 +</code> 
 + 
 +config in folder ~/.config/streamrip will not be removed when uninstalling through pipx
  
 ===== deemix ===== ===== deemix =====
Line 22: Line 42:
 #!/bin/bash #!/bin/bash
 echo "Downloading latest version..." echo "Downloading latest version..."
-wget https://download.deemix.app/0:/server/linux-x86_64-latest +wget https://download.deemix.app/server/linux-x64-latest 
-echo "Backing up old version..." +if [ -f "linux-x64-latest" ]; 
-sudo rm -rf /opt/deemix-server-old +then 
-sudo mv /opt/deemix-server /opt/deemix-server-old +    echo "Backing up old version..." 
-sudo mkdir /opt/deemix-server +    sudo rm -rf /opt/deemix-server-old 
-sudo mv linux-x86_64-latest /opt/deemix-server/deemix-server +    sudo mv /opt/deemix-server /opt/deemix-server-old 
-sudo chmod 755 /opt/deemix-server/deemix-server +    sudo mkdir /opt/deemix-server 
-echo "Restarting deemix server..." +    sudo mv linux-x64-latest /opt/deemix-server/deemix-server 
-systemctl --user restart deemix +    sudo chmod 755 /opt/deemix-server/deemix-server 
-echo "Done!"+    echo "Restarting deemix server..." 
 +    systemctl --user restart deemix 
 +    echo "Done!" 
 +else 
 +    echo "Download failed, not updating!" 
 +fi
 </code> </code>
  
Line 66: Line 91:
  
 Download/update bash script: Download/update bash script:
-<code dfiupdate.sh>+<code bash dfiupdate.sh>
 #!/bin/bash #!/bin/bash
  
Line 86: Line 111:
 Automatically monitor and/or download new releases of artists. Automatically monitor and/or download new releases of artists.
  
 +https://github.com/digitalec/deemon
  
  
Line 106: Line 132:
 sudo mv redtube.py /usr/local/lib/python3.8/dist-packages/youtube_dl/extractor/redtube.py sudo mv redtube.py /usr/local/lib/python3.8/dist-packages/youtube_dl/extractor/redtube.py
 </code> </code>
 +
 +Workaround/Tip: per-site configuration files
 +https://github.com/ytdl-org/youtube-dl/issues/29523
 +
 +Version 2021.12.17 requires the following youtube patch as of February 2023:
 +https://github.com/ytdl-org/youtube-dl/issues/31530#issuecomment-1433470254
 +Change youtube.py
 +(Debian package /usr/lib/python3/dist-packages/youtube_dl/extractor/youtube.py)
 +(PIP install /usr/local/lib/python3.8/dist-packages/youtube_dl/extractor/youtube.py)
 +change:
 +<code>
 +'uploader_id': self._search_regex(r'/(?:channel|user)/([^/?&#]+)', owner_profile_url, 'uploader id') if owner_profile_url else None,
 +</code>
 +to:
 +<code>
 +'uploader_id': self._search_regex(r'/(?:channel/|user/|@)([^/?&#]+)', owner_profile_url, 'uploader id', default=None),
 +</code>
 +
 ===== mediasave Chrome ===== ===== mediasave Chrome =====
 Mediasave Browser addon (Chrome) Mediasave Browser addon (Chrome)
Line 120: Line 164:
  
 Uses external service to record the stream. No Filenames/ID3tags preserved! Uses external service to record the stream. No Filenames/ID3tags preserved!
 +
 +===== Instagram downloader =====
 +
 +https://github.com/instaloader/instaloader
 +
 +===== JDownloader =====
 +
 +https://jdownloader.org/download/index
 +
 +
 +===== Saving DRM streams =====
 +
 +https://forum.videohelp.com/threads/415503-%5Brelease%5D-AllHellGui
 +https://github.com/vinefeeder/HellYes
 +
 +<code>
 +mkdir hellyes6
 +cd hellyes6
 +wget https://files.videohelp.com/u/301890/hellyes6.zip
 +unzip hellyes6.zip
 +rm hellyes6.zip
 +cd HellYesGui
 +python -m venv venv
 +venv/bin/pip install -r requirements.txt
 +</code>
 +
 +download the following 4 and copy binaries to any directory in the path, e.g. to ~/.local/bin
 +# uses N_m3u8DL-RE, ffmpeg, mkvmerge and mp4decrypt 
 +# see https://github.com/nilaoda/N_m3u8DL-RE
 +# see https://www.videohelp.com/software/ffmpeg
 +# see https://www.bento4.com/downloads/
 +# see https://www.videohelp.com/software/MKVToolNix
 +
 +
 +Start it using the venv python interpreter:
 +<code>
 +venv/bin/python allhell3gui.py
 +</code>
 +
 +Usage as following:
 +  * open debug console in browser (F12) and open network tab
 +  * add regexp:widevine|acquire|license|mpd  to the search 
 +  * open https://www.channel4.com/ or other desired video page and play the video
 +  * copy the found GET mpd entry and paste into the MPD URL field
 +  * copy the found POST entry as cURL and paste into the cURL of License Request field
 +  * add a video name
 +  * press get Keys
 +  * press download video
 +
 +
 +
 +====== Screen Recording ======
 +
 +===== SimpleScreenRecorder =====
 +
 +<code>sudo apt-get install simplescreenrecorder</code>
 +
 +====== Video Editing ======
 +
 +===== OpenShot =====
 +
 +Stable PPA (Contains only official releases)
 +<code>
 +sudo add-apt-repository ppa:openshot.developers/ppa
 +sudo apt update
 +sudo apt install openshot-qt python3-openshot 
 +</code>
 +
 +<code>sudo apt-get install openshot</code>
 +
 +===== LosslessCut =====
 +
 +https://github.com/mifi/lossless-cut
 +
 +<code bash losslesscut.sh>
 +#!/bin/bash
 +if [ "$LOGNAME" != "root" ]
 +then
 +    echo "LosslessCut updater needs to be run as root!"
 +    exit
 +fi
 +
 +#get latest LosslessCut version number
 +latest_web=$(curl https://api.github.com/repos/mifi/lossless-cut/releases/latest -s|sed -n 's/"tag_name": "v\([0-9]\.[0-9]*\.[0-9]*\)",/\1/p'| sed -e 's/^[[:space:]]*//')
 +#convert version numbers to integers for comparison
 +web=$(echo "$latest_web"  | sed 's/\.//g')
 +
 +if [ -f /opt/losslesscut/version.txt ];
 +then 
 +    current_ver=$(cat /opt/losslesscut/version.txt)
 +    #convert version numbers to integers for comparison
 +    cur=$(echo "$current_ver" | sed 's/\.//g')
 +fi
 +
 +if [[ "$cur" == "" ]];
 +then
 +    cur=0
 +fi
 +
 +#download and install only if web version greater than current version
 +#if main web version doesn't exist, then install new main version
 +if [[ ${web:0:8} -gt ${cur:0:8} ]];
 +then
 +    echo "Current LosslessCut version $current_ver, upgrading to version $latest_web"
 +    if [ ! -d /opt/losslesscut ];
 +    then 
 +        mkdir /opt/losslesscut
 +    fi
 +    cd /opt/losslesscut
 +    if [ -f LosslessCut-linux-x86_64.AppImage ];
 +    then 
 +        mv LosslessCut-linux-x86_64.AppImage LosslessCut-linux-x86_64.AppImage.old
 +    fi
 +    wget "https://github.com/mifi/lossless-cut/releases/download/v$latest_web/LosslessCut-linux-x86_64.AppImage"
 +    chmod 755 /opt/losslesscut/LosslessCut-linux-x86_64.AppImage
 +    echo "$latest_web" > /opt/losslesscut/version.txt
 +
 +    if [ ! -f /usr/share/applications/losslesscut.desktop ];
 +    then
 +        wget https://github.com/mifi/lossless-cut/raw/master/src/icon.svg
 +        cat >> /usr/share/applications/losslesscut.desktop <<EOD
 +[Desktop Entry]
 +Name=LossLessCut
 +Exec=/opt/losslesscut/LosslessCut-linux-x86_64.AppImage
 +Comment= The swiss army knife of lossless video/audio editing
 +Terminal=false
 +Icon=/opt/losslesscut/icon.svg
 +Type=Application
 +Categories=Graphics;
 +Hidden=false
 +NoDisplay=false
 +EOD
 +        update-desktop-database
 +        xdg-desktop-menu forceupdate
 +        xdg-desktop-menu install --novendor /usr/share/applications/losslesscut.desktop
 +
 +else
 +    echo "Current Version $current_ver, available version $latest_web"
 +    echo "No upgrade necessary"
 +fi
 +
 +</code>
 +
  
howto/save-streams.1638730666.txt.gz · Last modified: 2023/05/29 11:53 (external edit)