Profile cover photo
Profile photo
Rob Moore
27 followers -
Computer Hardware, Windows CMD Scripts, and VBScript
Computer Hardware, Windows CMD Scripts, and VBScript

27 followers
About
Communities and Collections
Posts

Post is pinned.Post has attachment
Public
Extract subtitles, video, and audio and repackage cmd script.
Uses ffprobe to gather media information and ffmpeg to process video, audio, and subtitles.

So here is a Windows cmd script I have been toying with. It extracts the english subtitle and saves it into a seperate srt file, then repackages the audio and video tracks. It processes fast, like hundreds to thousands of fps depending on the resolution and codec. I find it often fixes media files with playback issues. I have saved a link on my google drive, ENJOY and let me know what you think. Remember I am still working on this thing when I get in the mood. It functional but needs a bit of clean up.

Post has attachment
This is the same RAM that is already in my computer.
So now I shall have 4GB of dual channel memory instead or 2GB of single channel memory.
By only having a single DIMM in the computer, it is only running at 1/2 speed, 532.6 MHz.
Adding another exact same DIMM will allow the memory to run as dual channel pushing Frequency to 1065 MHz.

This computer (Dell Optiplex 380), requires low density memory.
I went to the Crucial web site and the part number they gave me was for high density memory.
I looked on the INTERNET and found it for a lower price at DataRam on Amazon.
They sent DDR3L instead of DDR3. D
DR3 is 1.5v and DDR3L is dual voltage, 1.35v and 1.5v.
It did not work because it is High density memory.
I thought it was the voltage that kept it from working in my system.
I was wrong because Crucial scan was wrong in what they recommended me to buy.
Of course Now that I go back to Curcial and do another system scan it reccomends different memory.
So crucial is not reliable in scanning the system to see what is compatable with the system.

What I actually found that works for seeing what memory is in the system is a software program called SPECCY.
The SPECCY64 actually gave this for the installed memory:

            Number Of SPD Modules    1
            Slot #1
            Type    DDR3
            Size    2048 MBytes
            Manufacturer    Samsung
            Max Bandwidth    PC3-8500F (533 MHz)
            Part Number    M378B5673FH0-CF8
            Serial Number    2478270634
            Week/year    08 / 10


Bottom line is that I am doing what I should have done in the first place, ordering the exact same ddr3 as what is already in the system.
I will have 4GB instead of 8GB but that is better than having only 2GB.

Right now as it is,
if I put the swap file to the recommended setting,
the computer is always prompting me to unload programs because it is out of memory and some times it just clears the memory without asking.
Usually firefox, but sometimes it causes a reboot.
I have found that setting the swap file to 6GB the OS seldom runs out of memory and never reboots by it self.
Although it does run slower.
This is why I want to upgrade

Post has attachment

Post has attachment
Extract subtitles, video, and audio and repackage cmd script.
Uses ffprobe to gather media information and ffmpeg to process video, audio, and subtitles.

So here is a Windows cmd script I have been toying with. It extracts the english subtitle and saves it into a seperate srt file, then repackages the audio and video tracks. It processes fast, like hundreds to thousands of fps depending on the resolution and codec. I find it often fixes media files with playback issues. I have saved a link on my google drive, ENJOY and let me know what you think. Remember I am still working on this thing when I get in the mood. It functional but needs a bit of clean up.

An update - SubRemove -V2.zip
https://drive.google.com/file/d/0B1RR45rlIVr-U2dPcDVoTTB5dFE/view

Here are a couple of cmd scripts I use almost daily.
Move2Parent.cmd and Move2Folder.cmd.

Move2Parent.cmd takes everything out of all sub folders and puts it in the folder it was started and then deletes the sub folders. This is useful when I want to get a bunch of my videos into one folder so that I can process them. One thing it does not handle is duplicate file names. For example if folder.jpg exist in more than one folder, it will move the first one and skip all others, not deleting the sub folders that have any files in them.

Move2Folder.cmd makes a folder and moves all files that have the same name to them (it does not look at the extension of the file)
 
 
************ Move2Parent.cmd *********
@echo off
cls
setlocal ENABLEDELAYEDEXPANSION
setlocal ENABLEEXTENSIONS
mode con:cols=80 lines=1
pushd %cd%
for /r .\ %%a in (.) do (
                title Move 2 Parent %%~na
                if exist "%%a" (
                                if not exist "!cd!\%%~nxa" (
                                                move "%%a" ".\">nul
                                )             
                )
)
title Removeing Empty Folders... Please Wait
FOR /F delims^= %%A IN ('DIR/AD/B/S^|SORT/R') DO RD "%%A"
Popd
 
 
****************** Move2Folder.cmd ****************
@echo off
cls
setlocal ENABLEDELAYEDEXPANSION
setlocal ENABLEEXTENSIONS
mode con:cols=80 lines=1
for /r .\ %%a in (.) do (
                Set "target="
                title Move 2 Folder %%~na
                if not "%%~xa" EQU ".cmd" (
                                if not exist ".\%%~na\%%~nxa" (
                                                for /f "tokens=1-9* delims= " %%b in ('echo %%~na') do (
                                                                for /l %%l in (1,1,11) do (
                                                                                If %%c EQU S%%l (
                                                                                                Set "target=%%b"&echo c=%%c
                                                                                ) Else (
                                                                                                If %%d EQU S%%l (
                                                                                                                Set "target=%%b %%c"&Echo d=%%d
                                                                                                ) Else (
                                                                                                                If %%e EQU S%%l (
                                                                                                                                Set "target=%%b %%c %%d"&Echo e=%%e
                                                                                                                ) Else (
                                                                                                                                If %%f EQU S%%l (
                                                                                                                                                Set "target=%%b %%c %%d %%e"&Echo f=%%f
                                                                                                                                ) Else (
                                                                                                                                                If %%g EQU S%%l (
                                                                                                                                                                Set "target=%%b %%c %%d %%e %%f"&Echo g=%%g
                                                                                                                                                ) Else (
                                                                                                                                                                If %%h EQU S%%l (
                                                                                                                                                                                Set "target=%%b %%c %%d %%e %%f %%g"&Echo h=%%h
                                                                                                                                                                ) Else (
                                                                                                                                                                                If %%i EQU S%%l (
                                                                                                                                                                                                Set "target=%%b %%c %%d %%e %%f %%g %%h"&Echo i=%%i
                                                                                                                                                                                ) Else (
                                                                                                                                                                                                If %%j EQU S%%l (
                                                                                                                                                                                                                Set "target=%%b %%c %%d %%e %%f %%g %%h %%i"&Echo j=%%j
                                                                                                                                                                                                ) Else (
                                                                                                                                                                                                                If %%k EQU S%%l (
                                                                                                                                                                                                                                Set "target=%%b %%c %%d %%e %%f %%g %%h %%i %%j"&Echo k=%%k
                                                                                                                                                                                                                )
                                                                                                                                                                                                )
                                                                                                                                                                                )
                                                                                                                                                                )
                                                                                                                                                )
                                                                                                                                )
                                                                                                                )
                                                                                                )
                                                                                )
                                                                )
                                                               
                                                                if defined target (
                                                                                Echo [!target!]
                                                                                if exist "!target!" (
                                                                                                rem
                                                                                ) Else (
                                                                                                md "!target!"
                                                                                )
                                                                ) Else (
                                                                                if exist "%%~na" (
                                                                                                rem
                                                                                ) Else (
                                                                                                md "%%~na"
                                                                                )
                                                                )
 
                                                                if defined target (
                                                                                move "%%a" "!target!">nul
                                                                ) Else (
                                                                                move "%%a" "%%~na">nul
                                                                )
                                                )
                                )
                )
)

It’s been a few months since I posted anything here.
Here is a basic ReEncode.cmd script.
It will use ffmpeg to convert any video file to an mp4 copying the audio track and re encode the video track using 1532k bitrate. You can change the bitrate to anything you want but I have found that 1532 seems to be ok on our UltraHD curved 4k TV.  Mind you if the original bitrate is smaller than 1532k, the file size of the converted video will be larger. This is a 2 pass encode process using the ULTRAFAST preset. It re encodes much faster than the original FPS. With files that had an original bitrate around 1532k or smaller, it was re-encoding sometimes over 1200 fps. You can change the ultrafast preset with the veryslow preset, you will get the same quality video but in a much smaller file.
FPS will suffer. With the veryslow preset you can expect re-encoding at around 10 fps on a 3 GHz dual processor computer with only 2gb of memory (mine).
I was able to drag over 50 videos to the cmd script and have it process them.
 
One last thing, you will have to make a done folder or the process will fail. I did it this way because I put all the videos I wanted to re encode into the same folder. I did not want to replace the original until I had a chance to inspect the re encoded one.
 
Ok, so I did change the re-encoding bitrate from 1024k all the way up to 3072k depending on the bitrate of the original. Any original with a bitrate above 3072k was re encoded to 3072k. I actually had one video that had a bitrate over 15000k. It came out great at 3072k and I could not tell the difference. The re-encoding speed was around 50 fps even though the superfast preset was used. I can imagine that if I had used the veryslow preset It would have taken days to process.
 
Why did I want to create this cmd script? Well a week earlier I had went through all 400+ of my movies and converted them to mp4, adding cover art to the files. This allowed me to see the cover art on the TV when I browsed through the movies. I had a mix of mp4, mpg, avi, flv, wmv, vob. Some were 2 of 3 parts that needed to joined. So all I did was write a few CMD scripts to use ffmped and copy both video and audio to an mp4 container. So most 2 hour movies were only taking a few minutes to convert. But I had 56 videos that the TV did not see at all. Once I used this script on the videos, the TV was able to find them.
 
 
****************** ReEncode.cmd *****
@echo off
 
If zip EQU zip%1 (
    Echo Drag a video to this cmd script to re encode it
    Pause
    goto :eof
)   
If exist ffmpeg2pass-0.log.temp del ffmpeg2pass-0.log.temp
If exist ffmpeg2pass-0.log del ffmpeg2pass-0.log
:start
ffmpeg -threads 8 -y -i %1 -c:v libx264 -preset ultrafast -b:v 1532k -pass 1 -c:a copy -f mp4 nul
ffmpeg -threads 8 -y -i %1 -c:v libx264 -preset ultrafast -b:v 1532k -pass 2 -c:a copy "%~p1\done\%~n1.mp4"
If exist ffmpeg2pass-0.log.temp del ffmpeg2pass-0.log.temp
If exist ffmpeg2pass-0.log del ffmpeg2pass-0.log
Shift
If zip EQU zip%1 (pause&goto :eof)
goto :start
 
*******************end  ReEncode.cmd ******

Post has attachment
Who remembers? What were you doing at 11:58 am on January 28, 1986.
I was in digital theory  class, the whole school was watching the TV broadcast of the Space Shuttle Challenger's launch. Every body was so excited when the launch began. Then it exploded. Many of the students began to laugh. I jumped up and shouted, don't you realize their all dead, it exploded... The silence was deafening, then the announcer confirmed, the Space Shuttle Challenger had exploded.

I was 25 years old, and to this day I get all choked up just thinking about it.

Post has attachment
Wow - Excellent. I was able to make sure all my movies had the correct names and sorted into genres folders

Post has attachment
Can you imagine the stress this has caused the dog. Some people just do not love their dogs.

Post has attachment

I have been going crazy for a few weeks because nothing would recognize my key presses. Powering down, removing the battery, sim, and sd and waiting a couple minutes solved the issue. Thank You very much. As for you other people that this worked for, plus 1 him dammit so other people can find this solution quickly
Wait while more posts are being loaded