Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
|
#481 | Link | ||
|
Registered User
Join Date: Apr 2003
Location: Uppsala, Sweden
Posts: 157
|
Quote:
![]() I don't seem to get notification emails? Quote:
|
||
|
|
|
|
|
#482 | Link |
|
Registered User
Join Date: Apr 2003
Location: Uppsala, Sweden
Posts: 157
|
I don't know if there's any interest still, but I (finally) think it might be a good idea to make the Deshaker source code public.
![]() Any recommendation on the best way to do this? Do I just put a zip on my Deshaker page? Or should I put it on GitHub, or something, and how much work is that? Maybe someone else would like to "run" it?? And what license? I don't really care if people make money on it (anymore), but is it still a bad idea to make it completely free? (Excuse my lack of knowledge and interest in legal stuff.) Also, please keep in mind I've become rather lazy.
|
|
|
|
|
|
#483 | Link |
|
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,834
|
The notification emails have been broken since a long time ago
![]() I vote for putting the source code on GitHub. I do not believe that it's a big job but someone else can confirm that - or just add it to their repo I'm sure there's something useful for someone in the code sooner or later.
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
|
|
|
|
|
#484 | Link | |
|
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,392
|
I dont do GitHub and so cannot comment on how easy that would be.
Quote:
to say that they are the authors, and make a packet of cash from the people that they deceive. Open source with GPL would maybe be best. Nice to see you again Guth
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
|
|
|
|
|
|
#485 | Link | ||||
|
Banana User
Join Date: Sep 2008
Posts: 1,222
|
Quote:
Quote:
![]() This is do whatever you want license: Quote:
Quote:
__________________
InpaintDelogo, DoomDelogo, JerkyWEB Fixer, Standalone Faster-Whisper - AI subtitling Last edited by VoodooFX; 20th June 2022 at 12:03. |
||||
|
|
|
|
|
#486 | Link | |
|
Registered User
Join Date: Apr 2003
Location: Uppsala, Sweden
Posts: 157
|
Quote:
![]() Anyway, thanks for the input, guys. If nothing unexpected happens I'll put it on GitHub within a couple of weeks. |
|
|
|
|
|
|
#487 | Link |
|
Registered User
Join Date: Apr 2003
Location: Uppsala, Sweden
Posts: 157
|
The Deshaker source code is now on GitHub:
https://github.com/gu-t/Deshaker Please let me know if you see anything weird. I've used Git before, but I'm new to GitHub. |
|
|
|
|
|
#488 | Link |
|
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,392
|
Most gracious of you, cheers Guth.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
|
|
|
|
|
#492 | Link |
|
Registered User
Join Date: Oct 2021
Posts: 43
|
Can i somehow set a horizon across different control frames so Deshaker would stabilize rotation to match this horizon or any way to set horizon at all?
Here's sample video https://www.upload.ee/files/15288523..._clip.zip.html What approach would you use to make horizon straight with Deshaker? Last edited by Rob105; 31st May 2023 at 06:58. |
|
|
|
|
|
#494 | Link |
|
Registered User
Join Date: Nov 2008
Posts: 72
|
Automatic chapter Generation using LOG n_scene info
Hi, I made a PowerShell script [+batch caller] which will pick up all .LOGs from current [or specified] folder and generate fileName_OGG.txt chapter info per LOG (ie: to use with MKVmerge). Minimum duration can be specified (default 75sec). FPS must be known (default NTSC). Has chapter name skeleton as used in mkvtoolnix-gui.exe.
Here's Log2chaps.ps1 script: Code:
# PARAM must be first command
param ( [int]$gi_minSec=75, [float]$gr_fps=29.970, [string]$gs_chapSkel='Chap <NUM:2>',
[switch]$pal, [switch]$ntsc, [switch]$yes )
$debugging= $false
write-host -ForegroundColor Green ''
write-host -ForegroundColor Green 'Log2Chaps v24.1016'
write-host -ForegroundColor Green ''
write-host -ForegroundColor Green ' Extract chapter list from each deShake .LOG files'
write-host -ForegroundColor Green ' Generates: originalfilename_OGG.txt'
write-host -ForegroundColor Green ''
write-host -ForegroundColor Green 'Usage: Log2Chaps [[[minSec] fps] chapSkeleton] [-ntsc|-pal] [-yes]'
write-host -ForegroundColor Green ' minSec: Minimun Chapter length in seconds (default 75)'
write-host -ForegroundColor Green ' fps: Frames Per Second (default 29.970) or -pal / -ntsc'
write-host -ForegroundColor Green ' chapSkeleton: (default "Chap <NUM:2>" where NUM is chapter # using :N digits)'
write-host -ForegroundColor Green ' -ntsc: 29.970 takes precedence over fps'
write-host -ForegroundColor Green ' -pal: 25 takes precedence over ntsc'
write-host -ForegroundColor Green " -yes: unnatended"
write-host -ForegroundColor Green ''
# param ( $G_ARCHIVE = $(throw 'Need file to upload!'),
# $G_LOGFILE = $(throw 'Need logfile!') )
#
# Run as ADMIN
# Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force
# 24.1016 better dispay info
# 23.0513 fps between [3..240]; only inform skipped >10 frames
# 23.0510 escaped ´: in write-host, avoids error in win10
# 22.0918 minSec first argument, newline after chapterlist
# 22.0916 switches: -yes -pal -ntsc
# 22.0914 success/ already done messages
# 22.0831 range check
# 22.0829 vars: XY_name: {X: Local, Global} {Y: Integer Long Real(float) String Fileinfo Timespan Date ...}
# Array: XAY_name (ie local string array: las_nameOfVariable)
# 22.0829 do all LOGs, ask before
# 22.0824 implement digits
# 22.0823 chapNames as MKVGui default: 'Chap <NUM:2>'
# 22.0822 ogg chapters format
# 22.0821 chapters time hh:mm:ss.ddd
# 22.0806 initial idea
#
function parse_log {
param ( [ref]$lf_inFile, [long]$li_minSec=90, `
[float]$lr_fps=29.970, `
[string]$ls_chapName='Chap <NUM>', `
[string]$ls_chapNDig='00' )
write-host -ForegroundColor Green 'Params:', $lf_inFile.value.name, `
"; chapNm:$ls_chapName; fps:$lr_fps; minSec:$li_minSec; `
chapDigStr:$ls_chapNDig" -separator '' # no separator
# parse file
###
$las_nscenes= @( get-content $lf_inFile.value | Where-Object { $_ -match "n_scene"} )
[long]$ll_minimo= $lr_fps * $li_minSec
[long]$ll_lastChapN= 0
[long]$ll_lastSkipN= 0
write-host -ForegroundColor Green "`n Chap 0 " -nonewline # `n is newLine only in double quotes
$lal_chapterFrames= @( [long]0 ) +
@( foreach( $ls_line in $las_nscenes) {
# $ll_n= [long]( $ls_line -split '[ \t]+',3)[1] # 1st method: Take 2nd element, must have first empty
$null= $ls_line -match '\D+(?<digitos>\d+)' # OR 2nd method: Seek first digits, faster and +reliable
[long]$ll_n= [long]$matches[ 'digitos']
if ( $ll_n - $ll_lastChapN -lt $ll_minimo) { # skip if less than min seconds
if ( $ll_n - $ll_lastSkipN -gt 50) { #only inform if more than 50 frames
$ll_lastSkipN= $ll_n
write-host -ForegroundColor Green " skp$ll_n" -nonewline
}
} else { # new chapter
write-host -ForegroundColor Green "`n Chap $ll_n " -nonewline
$ll_lastChapN= $ll_n
$ll_n # Returns chapter number of frames
}
} ) # end foreach $las_nscenes
if ( $ll_lastChapN -eq 0) {
write-host -ForegroundColor Red "*** no chapters ***`n"; return }
write-host -ForegroundColor Green "`n"
# write-host $lal_chapterFrames
[float]$lr_1frame_ms= 1000/ $lr_fps
[int]$li_chapNum= 1
foreach ( $ll_frames in $lal_chapterFrames) {
# *NO* $lt_chap_ms= new-timespan -seconds $lal_chapterFrames[ 2]
# [string]$ls_chapMs= new-timespan -seconds ( [float]$ll_frames* $lr_1frame_ms* 1000)
$lt_chap_ms= [timespan]::frommilliseconds( [float]$ll_frames* $lr_1frame_ms)
# $ls_chapMs= "{0}" -f $lt_chap_ms; [string]$ls_chapMs= $lt_chap_ms; $ls_chapMs= $lt_chap_ms.tostring();
[string]$ls_chapMs= $lt_chap_ms.tostring()
if ( $ls_chapMs.length -eq 8) {
$ls_chapMs+= ".0000000" } #add missing ms in case of exact seconds
$ls_chapMs= $ls_chapMs.subString( 0, 12) # keep first 3 digits of ms leaving: hh:mm:ss.fff
# write-host -ForegroundColor Green ( '{0:hh\:mm\:ss\,fff}' -f $ls_chapMs) # not for powershell v2
$ls_outOdd= "CHAPTER{0:00}={1}" -f $li_chapNum, $ls_chapMs
write-output $ls_outOdd
$chapStr= $ls_chapName -replace '<num>', $li_chapNum.tostring( "$ls_chapNDig")
$ls_outEven= ( "CHAPTER{0:00}NAME={1}" -f $li_chapNum, $chapStr)
write-output $ls_outEven
$li_chapNum+= 1
}
# @{ frame= $_.Split( ' ')[0] }
# | foreach-object { $_ -spilt " ", 2) }
# select-string -path $lf_inFile -pattern "n_scene"
# write-output $chapters
}
#
# MAIN
#
[int]$li_chapDigits=2
if ( $gs_chapSkel -match '<NUM:*(?<xnumero>\d+)>') {
[int]$li_chapDigits= $matches.xnumero }
if ( $li_chapDigits -lt 1 -or $li_chapDigits -gt 9 ) {
$li_chapDigits= 2 }
$gs_chapNDig= '0' * $li_chapDigits # number of digits to print '00'
$gs_chapSkel= $gs_chapSkel -replace '<NUM:*(?<numero>\d+)>', '<NUM>'
if ( $gr_fps -lt 3 -or $gr_fps -gt 240 -or $ntsc ) {
[float]$gr_fps= 29.970 }
if ( $pal ) {
[float]$gr_fps= 25 }
if ( $gi_minSec -lt 1 -or $gi_minSec -gt 960 ) { #not more than 16min
$gi_minSec= 75 }
write-host -ForegroundColor Yellow "Params: minSec:$gi_minSec; ",
"fps:$gr_fps; chapSkel:$gs_chapSkel; digits:$li_chapDigits"
write-host ''
if ( $debugging) { b:; cd \v } # use B:\V tor testing
if ( -not $debugging -and -not $yes
# -and $gs_chapSkel -eq 'Chap <NUM>' #no params
) {
do {
$ls_confirm= Read-Host -Prompt 'Press (Y)es to continue, (N)o to abort'
if ( $ls_confirm -match 'n') { return ' ABORT '}
} until ( $ls_confirm -match '[ys]')
}
$li_outCount= 0
foreach ( $lf_logfile in get-childitem *.log) { #all .LOGs
if ( $lf_logfile.mode -match 'd') { continue } #skip dirs
write-host -ForegroundColor Green $lf_logfile
$ls_oggFileName= $lf_logfile.basename+'_OGG.txt'
if ( -not ( test-path -path $ls_oggFileName -pathType leaf )) {
# parse
$gas_oggFileOut= parse_log ([ref]$lf_logfile) $gi_minSec $gr_fps $gs_chapSkel $gs_chapNDig
write-host -ForegroundColor blue $gas_oggFileOut
if ( $gas_oggFileOut.count -gt 1) {
out-file $ls_oggFileName -inputobject $gas_oggFileOut -encoding ASCII -Width 132 }
if ( test-path -path $ls_oggFileName -pathType leaf ) {
$li_outCount+= 1
write-host "** Generated $li_outCount`: $ls_oggFileName"
write-host
}
if ( $debugging) { break } # debug: stop after first .LOG
} else {
write-host -- Already present: $ls_oggFileName
}
} # foreach .log
write-host
if ( $li_outCount -gt 0 ) {
write-host *** TOTAL Generated Files: $li_outCount ***
} else { write-host *** Nothing to do *** }
write-host
Last edited by isidroco; 18th October 2024 at 03:25. |
|
|
|
|
|
#495 | Link |
|
Registered User
Join Date: Nov 2008
Posts: 72
|
And here's the log2chaps.bat batch caller (directory may be specified), help included:
Code:
@echo off
set log2chapsVersion=log2chaps v24.1016, isidrococo @ gmail
setlocal enableextensions enabledelayedexpansion & REM to get var value at exec with !varNm!
rem Log2Chaps [PATH] [minSec] [chapSkeleton] [fps]|[-pal]|[-ntsc] [-yes]
rem 75 "Chap <NUM:2>" 29.970 -yes
title %isiVersion%
echo/
echo/%log2chapsVersion%
echo/
echo/ Extract chapter list from each deShake .LOG files based in n_scene marks
echo/ Generates: originalfilename_OGG.txt
echo/
echo/Usage: Log2Chaps [logsFullPath] [[[minSec] fps] chapSkeleton]
echo/ [-ntsc^|-pal] [-yes] [-noPause]
echo/
echo/ logsFullPath: Path of all deshaker .LOG
echo/ minSec: Minimum Chapter length in seconds (default 75)
echo/ fps: Frames Per Second (default 29.970) or -pal / -ntsc
echo/ chapSkeleton: ^(default "Chap <NUM:2>" where NUM is chapter # using :N digits^)
echo/ -ntsc: 29.970 takes precedence over fps
echo/ -pal: 25 takes precedence over ntsc
echo/ -yes: unnatended
echo/
echo/
rem 24.1016 added pathDir and elevate command sending current dir, change parameters order, noPause
rem 22.0918 simple call to powershell
set selfDir="%~dp0"
set selfFullPath="%~f0"
echo Current dir "%cd%", batch dir %selfDir%
rem If 1st param has :\ try changing to it and remove it from PARAM
rem ~ remove and [re-]add quotes
set param1="%~1"
rem needs to be % instead of !, to avoid :: comment out
if not %param1% == %param1::\=% (
cd /d %param1% 2>nul& rem make current dir
rem remove first param
shift
)
echo Current dir %cd%
rem
set PARAM=
:getParam
rem Include trailing space
set paramN=%1 &rem dummy
set "PARAM=!PARAM!!paramN!"
shift
if not "!paramN!"==" " goto getParam
REM Check privileges; https://stackoverflow.com/questions/7044985/how-can-i-auto-elevate-my-batch-file-so-that-it-requests-from-uac-administrator/12264592#12264592
net file 1>NUL 2>NUL
if not '%errorlevel%' == '0' (
REM ELEVATE AND RERUN -WorkingDirectory "%cd%"
rem echo powershell -NoProfile -Exec Bypass Start-Process -FilePath %selfFullPath% -ArgumentList '"%cd%" %PARAM%' -verb runas
powershell -NoProfile -Exec Bypass Start-Process -FilePath %selfFullPath% -ArgumentList '"%cd%" %PARAM%' -verb runas
rem >NUL 2>NUL
exit /b
)
REM ensure powershell privileges to run scripts {not recommended, better use -ExecutionPolicy ByPass on run}
rem powershell Set-ExecutionPolicy RemoteSigned -Scope LocalMachine
REM Change directory to current script. "runas" starts in C:\Windows\System32
rem cd /d %~dp0
net file 1>NUL 2>NUL
if not '%errorlevel%' == '0' (
echo Must execute as adminstrator !!!
pause
exit
)
echo powershell -noprofile -exec ByPass -file "%selfDir:"=%log2chaps.ps1" %PARAM%
powershell -noprofile -exec ByPass -file "%selfDir:"=%log2chaps.ps1" %PARAM%
IF "%PARAM:nop=%"=="%PARAM%" pause
|
|
|
|
|
|
#499 | Link |
|
Registered User
Join Date: Mar 2018
Location: Germany
Posts: 286
|
I would like to annotate that DeShaker doesn't account
- field of view (FoV) - movements within a frame. As consequence it produces good results only for parallel projection (telephoto lenses) that have no movement within the scene; like a photocopier where you move the paper while scanning .But already for a "standard view" objective (50 degrees), DeShaker will produce kind of "wobbling" (you get sea-sick), the more the farther away from the centre. The wrong transformation also effects sub-optimal filling of borders and "colour masked areas". Movements within the frames: DeShaker analyses the movements between frames, but then doesn't use that vector field (dense optical flow), but takes only a "main" movement of the frame; global transformation. For particular movements this leads to another sub-optimal reconstruction of filling borders and "colour masked areas". As the author thankfully provides the source code, it could be improved by someone who's able to... (FoV might be easier than particular movements). I know of 2 other stabilising filters accounting FoV around here: There is "lens transform" from @shekh. https://forum.doom9.org/showthread.php?t=172886 But it uses only a simple interpolation (info lost) and border filling and doesn't account rolling shutter. No code provided. Still its results are much better FoV-wise than DeShaker. Then there is something for AviSynth (of course there is ) from @wonkey_monkey:https://forum.doom9.org/showthread.php?p=1690146 But it is only for FoV; stuck in its very first stage/ proof of concept, and lacks for accounting all other aspects. No code anyway. So, sadly, there is no real good deshaking so far. We've the choice between shaken or sea-sicked
Last edited by nji; 5th June 2025 at 10:04. |
|
|
|
|
|
#500 | Link |
|
Registered User
Join Date: Nov 2004
Location: Spain
Posts: 416
|
Hi nji:
I often use stabbo to stabilize vhs footage: https://forum.doom9.org/showthread.php?t=171250 I'm very please with the result (one pass only) |
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|