Are you a spammer

Please note, that the first 3 posts you make, will need to be approved by a forum Administrator or Moderator before they are publicly viewable.
Each application to join this forum is checked at the Stop Forum Spam website. If the email or IP address appears there when checked, you will not be allowed to join this forum.
If you get past this check and post spam on this forum, your posts will be immediately deleted and your account inactivated.You will then be banned and your IP will be submitted to your ISP, notifying them of your spamming. So your spam links will only be seen for an hour or two at most. In other words, don't waste your time and ours.

This forum is for the use and enjoyment of the members and visitors looking to learn about and share information regarding the topics listed. It is not a free-for-all advertising venue. Your time would be better spent pursuing legitimate avenues of promoting your websites.

Processing Video with the quickness.

Source code I have written openly published for your viewing pleasure.


Processing Video with the quickness.

Postby TheeMahn » Thu Jan 10, 2019 1:30 pm

I have began writing software to process video. I have seen almost 1,000 frames a second. I have Roku Smart TV's and want video native. I will be straight with you. I added an extra step in the process and that is ripping out subtitles. I may eventually make it a switch. I will share the code with you, very shoddy at this time:
Code: Select all
#!/bin/bash
# On the even of crash or exit - probably the most powerful advanced bash trigger IMHO is trap.  Second to none, minus utilizing arrays.

function finish {
    if [[ -f "TEMP.MKV" ]]; then
        rm "TEMP.MKV"
    fi
}

trap finish EXIT

if [[ -f "TEMP.MKV" ]]; then
    rm "TEMP.MKV"
fi

shopt -s nullglob
declare -a MOVIES=();
MOVIES=(*.mkv)
if ! [[ "$1" ]]; then
    for EACH in "${MOVIES[@]}"
    do
        echo "Stripping Subtitles from $EACH to TEMP.MKV"
        mkvmerge --no-subtitles "$EACH" -o TEMP.MKV
        if [[ -s "TEMP.MKV" ]]; then
            rm "$EACH"
            echo "Processing ffmpeg -i TEMP.MKV -c:s copy -c:v copy -c:a ac3 $EACH"
            ffmpeg -i TEMP.MKV -c:s copy -c:v copy -c:a ac3 "$EACH"
        fi
        if [[ -s "TEMP.MKV" ]]; then
            echo "Removing TEMP.MKV"
            rm TEMP.MKV
        fi
    done
else
        if [[ -f "$1" ]]; then
            EACH="$1"
            echo "Stripping Subtitles from $EACH to TEMP.MKV"
            mkvmerge --no-subtitles "$EACH" -o TEMP.MKV
            if [[ -s "TEMP.MKV" ]]; then
                rm "$EACH"
                echo "Processing ffmpeg -i TEMP.MKV -c:s copy -c:v copy -c:a ac3 $EACH"
                ffmpeg -i TEMP.MKV -c:s copy -c:v copy -c:a ac3 "$EACH"
                if [[ -f "$EACH" ]]; then
                    rm "TEMP.MKV"
                fi
            fi
            if [[ -s "TEMP.MKV" ]]; then
                echo "Removing TEMP.MKV"
                rm TEMP.MKV "$EACH"
            fi
        else
            echo "$1 does not exist. Exiting."
        fi
fi


No help system yet, feel free to test it out and enjoy. Remove the subtitle destruction and it straight up rocks.

TheeMahn,
Attachments
convertit.sh
(1.55 KiB) Downloaded 15 times
Home of Ultimate Edition. Got a question? Please review the F.A.Q. Browse the How to section.

Main O/S: Builder of O/S Guess.
Mainboard: ASUS Hero VI (AM4)
CPU: AMD 1700X water cooled (Deepcool Captain Genome Cooling tower)
Ram: 16 GB GSkill Trident RGB Series Dual Channel DDR4 3200
Video: MSI RX470 8GB Gaming card.
Hard Disks: MASSIVE on the network.(10 Gigabit, 48 port, multiple servers)
Monitors: 4K Samsung 28", HannsG HH281, Various others
750 Watt modular PSU (Rosswell)
1100 Watt Amp & 4 X 600 Watt speakers

Servers in the basement.
User avatar
TheeMahn
Site Admin
 
Posts: 4200
Joined: Fri Oct 12, 2007 10:02 am
Location: U.S.A.
Age: 48
Operating System: Ultimate Edition Developer

Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest