Techrights logo

IRC: #boycottnovell @ Techrights IRC Network: Sunday, January 09, 2022

(ℹ) Join us now at the IRC channel | ䷉ Find the plain text version at this address (HTTP) or in Gemini (how to use Gemini) with a full GemText version.

*liberty_box has quit (Ping timeout: 2m30s)Jan 09 01:06
*liberty_box (~liberty@suig26pxj59pi.irc) has joined #boycottnovellJan 09 01:12
schestowitzI have just tested the two-file script comboJan 09 01:18
schestowitzit worked great the first time around!Jan 09 01:18
schestowitzI was surprisedJan 09 01:18
schestowitznow, it still gave me this:Jan 09 01:18
schestowitzstat: cannot stat 'test-video.webm': No such file or directoryJan 09 01:18
schestowitzand no date in the resultant fileJan 09 01:18
schestowitzthe script is in git masterJan 09 01:18
*liberty_box has quit (Ping timeout: 2m30s)Jan 09 01:37
*liberty_box (~liberty@suig26pxj59pi.irc) has joined #boycottnovellJan 09 01:40
*psydroid4 has quit (Ping timeout: 2m30s)Jan 09 02:00
*liberty_box has quit (Ping timeout: 2m30s)Jan 09 02:38
*liberty_box (~liberty@suig26pxj59pi.irc) has joined #boycottnovellJan 09 02:42
*SomeH4x0r has quit (Ping timeout: 2m30s)Jan 09 02:52
*SomeH4x0r (~someh4xx@hngsz54a2nzc6.irc) has joined #boycottnovellJan 09 02:56
*liberty_box has quit (Ping timeout: 2m30s)Jan 09 04:13
*DaemonFC has quit (Quit: Leaving)Jan 09 06:49
*u-amarsh04 (~amarsh04@joseon-rmogvn.g0d7.dtdf.mc4289.IP) has joined #boycottnovellJan 09 07:00
*u-amarsh04 (~amarsh04@6pxtd49npuduw.irc) has joined #boycottnovellJan 09 07:00
Techrights-seclooking at the ffmpeg converson process and whether it can launch rsync,Jan 09 07:52
Techrights-secthe size of the new file is tracked as it grows:   Jan 09 07:52
Techrights-sec ffmpeg -y -progress - -nostats -i ...Jan 09 07:52
Techrights-secThat can be piped into awk with no buffers and processed, but in the caseJan 09 07:52
Techrights-secof transcoding the source file will be a very different size than the destinationJan 09 07:52
Techrights-sec file.  And in the case of only adding metadata there is no need to transcodeJan 09 07:52
Techrights-secso the copy option can be used instead.  Jan 09 07:52
Techrights-sec ffmpeg -y -progress - -nostats -i old.webm -c copy -metadata title="something" nJan 09 07:52
Techrights-secew.webmJan 09 07:52
Techrights-secThat should just take a few seconds.  Jan 09 07:52
Techrights-secSo would inserting the following at line 222 speed things upJan 09 07:52
Techrights-sec -c copy \Jan 09 07:53
Techrights-secas inJan 09 07:53
Techrights-sec$ git diff preview.shJan 09 07:53
Techrights-secdiff --git a/Desktop-Utils/preview.sh b/Desktop-Utils/preview.shJan 09 07:53
Techrights-secindex 9ca7e53..98b1c28 100644Jan 09 07:53
Techrights-sec--- a/Desktop-Utils/preview.shJan 09 07:53
Techrights-sec+++ b/Desktop-Utils/preview.shJan 09 07:53
Techrights-sec@@ -219,6 +219,7 @@ echo ' ================================================='Jan 09 07:53
Techrights-sec        set -eJan 09 07:53
Techrights-sec nice ffmpeg \Jan 09 07:53
Techrights-sec+        -c copy \Jan 09 07:53
Techrights-sec         -f concat \Jan 09 07:53
Techrights-sec         -i ./recipe.txt \Jan 09 07:53
Techrights-sec         -metadata title="$VIDEO_NAME" \Jan 09 07:53
schestowitz-TRit would be nice to speed it upJan 09 08:29
schestowitz-TRbut woulkd copy work when combining 3 files?Jan 09 08:29
schestowitz-TRtesting...Jan 09 08:29
schestowitz[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5644e4342700] Auto-inserting h264_mp4toannexb bitstream filterJan 09 08:32
schestowitzUnknown decoder 'copy'Jan 09 08:32
*liberty_box (~liberty@suig26pxj59pi.irc) has joined #boycottnovellJan 09 08:43
schestowitz-TRI mfound the bug!!Jan 09 08:44
Techrights-secIt might work when combining three files, but I haven't tried it that way.Jan 09 08:47
schestowitz-TRthey are also of different dimensionJan 09 08:47
schestowitz-TRthe commonality: audio rates, ratio, formatJan 09 08:47
Techrights-secThen reecoding must happen and that will be slow.Jan 09 08:49
schestowitz-TRit is VERY slow indeed, but last year I researcher this and it looked like there was no other way, it's not a simple conversion like the first passJan 09 08:49
schestowitz-TRsee gitJan 09 08:55
Techrights-secMaybe it would be best to standardize the dimensions and so on for all theJan 09 08:56
Techrights-secincluded files in advance.  Then reencoding would not need to happen to mergeJan 09 08:56
Techrights-secthem.  Jan 09 08:56
schestowitz-TRFrom what I vaguely recall, any time you merge files with different palettes and all, depending on format, the encoding stream needs to be redoneJan 09 08:57
Techrights-secackJan 09 08:59
*liberty_box has quit (Ping timeout: 2m30s)Jan 09 09:01
Techrights-secJust checked, if the appended and prepended files can be made the same specs Jan 09 09:07
Techrights-secas the main video, then -c copy works wellJan 09 09:07
schestowitz-TRthe hard part is video dimension, not aspect ratio, as that used to vary a lotJan 09 09:07
Techrights-secHard to say, I have no samples which are not 1920x1080 Jan 09 09:12
schestowitz-TRif we do tons of tidying up with those scripts maybe we can have a generalised framework for self-hosting videos with simple manuals. But it would take tons of work.Jan 09 09:12
schestowitz-TRthe videos I make are not always the same dimsJan 09 09:16
Techrights-secThe videos listed in outro.list ought to be normalized to the same specsJan 09 09:16
Techrights-secas the video you record.  That way the processing is done just the onceJan 09 09:16
Techrights-secand then when you concatenate the files, ffmpeg can do it easily.  Same forJan 09 09:16
Techrights-secintro.list.Jan 09 09:16
Techrights-secAh,  why not?Jan 09 09:16
schestowitz-TRdepends which view it starts with, screen, face, external webcam (different aspect ratio)Jan 09 09:17
Techrights-secIt'd save a lot of time, CPU, electicity, disk wear and tear, etcJan 09 09:18
*liberty_box (~liberty@suig26pxj59pi.irc) has joined #boycottnovellJan 09 09:28
Techrights-secThe size of the files can be estimated but not calculated until the processingJan 09 09:31
Techrights-secactually is finished.  Similar for counting frames, ffprobe has to go throughJan 09 09:31
Techrights-secthe files linearly to get the frame count.  But if the file sizes are used as anJan 09 09:31
Techrights-secapproximation for progress, then the size field from ffmpeg -progress - -nostatsJan 09 09:31
Techrights-seccan be extracted using an AWK or Perl one liner and used to trigger an upload,Jan 09 09:31
Techrights-secif SSH keys are used.  Jan 09 09:31
Techrights-secackJan 09 09:31
schestowitz-TRsee latest pushJan 09 09:33
schestowitz-TRone other option I had in mind was running  a timer for uploadJan 09 09:33
Techrights-secHmm.  How do make sure that ffmpeg has enough of a head start?Jan 09 09:33
Techrights-secYou could use 'at' for upload.  Or just let it go automatically whenJan 09 09:33
Techrights-secffmpeg is done and then launch a popup notification when it is complete.  Jan 09 09:33
Techrights-secBut that's the current    Jan 09 09:33
schestowitz-TRit is not at all evident from the code, but atm what happens is,Jan 09 09:34
schestowitz-TRI occasionalkly check the output and then drag and drop from dolphinJan 09 09:34
schestowitz-TRwhen the timing seems roughly rightJan 09 09:34
Techrights-secrsync or sftp could handle that automatically so you don't need to waste effortJan 09 09:35
Techrights-secand can turn your attention to other things until the upload-complete notificatioJan 09 09:35
Techrights-secnJan 09 09:35
schestowitz-TRthe goal is to serialise things a little. it can save as much as an hour sometimesJan 09 09:36
schestowitz-TRok, dumb questionJan 09 09:41
schestowitz-TRcan I mrate-limit an upload?Jan 09 09:41
schestowitz-TRlike, with scp or similar?Jan 09 09:41
Techrights-secyes with rsync or sftp, --bwlimit= in rsync and -l in sftpJan 09 09:42
schestowitz-TRthat would still leave leave the challenge of correctly estimating the speed of upload, based on speed of size generation and its growthJan 09 09:43
schestowitz-TR*file generationJan 09 09:43
Techrights-secffmpeg -y -progress - -nostats -i old^Cebm -metadata title="soJan 09 09:45
Techrights-secmething" new.webm | awk '{print $1,$6} END { print "111103897"}' RS='progress=coJan 09 09:45
Techrights-secntinue' OFS="\t"Jan 09 09:45
schestowitz-TRtrying this now on a real fileJan 09 09:48
schestowitzzJan 09 09:49
schestowitznice ffmpeg -y -progress - -nostats \Jan 09 09:49
schestowitz        -f concat \Jan 09 09:49
schestowitz        -i ./recipe.txt \Jan 09 09:49
schestowitz        -metadata title="$VIDEO_NAME" \Jan 09 09:49
schestowitz        -metadata creator="Techrights" \Jan 09 09:49
schestowitz        -metadata \Jan 09 09:49
schestowitz            license="Creative Commons Attribution-No Derivative Works 4.0" \Jan 09 09:49
schestowitz        -metadata author="Roy Schestowitz" \Jan 09 09:49
schestowitz        -metadata date="$(stat --printf='%y' $VIDEO_FILE.orig.webm \Jan 09 09:49
schestowitz | cut -d ' ' -f1)" $VIDEO_FILE.webm | awk '{print $1,$6} END { print "111103897"}' RS='progress=continue' OFS="\t"Jan 09 09:49
Techrights-secthat just shows it's possible.  working on something more practical...Jan 09 09:49
Techrights-secno need to run that one to completion, the AWK part adds nothing.  It just showsJan 09 10:02
Techrights-secthat the running file size can be captured.  Jan 09 10:02
schestowitz-TRok, gif parallelism works ok nowJan 09 10:03
schestowitz-TRI suppose being able to trigger a function at 50% progress would help Jan 09 10:03
Techrights-sec Jan 09 10:16
Techrights-secyes.  testing atmJan 09 10:16
Techrights-secunfortunately I chose a too long segment to test on, off-by-factor-of-one error  Jan 09 10:16
Techrights-secffmpeg -y -progress - -nostats -i x.webm \Jan 09 10:16
Techrights-sec        -metadata title="someting" file.webm 2>/dev/null \Jan 09 10:16
Techrights-sec| awk -v f=$(stat -c "%s" file.webm) 'Jan 09 10:16
Techrights-sec        BEGIN {Jan 09 10:16
Techrights-sec                cutoff=int(f/10);Jan 09 10:16
Techrights-sec                print "Start uploading at ",cutoff;Jan 09 10:16
Techrights-sec        }Jan 09 10:16
Techrights-sec        !skip {Jan 09 10:16
Techrights-sec                split($6,size,"=");Jan 09 10:16
Techrights-sec                print size[2];Jan 09 10:16
Techrights-sec                if(size[2]>=cutoff) {Jan 09 10:16
Techrights-sec                        skip++;Jan 09 10:16
Techrights-sec                        system("upload-script.sh &");Jan 09 10:17
Techrights-sec                }Jan 09 10:17
Techrights-sec        }' RS='progress=continue' OFS="\t"Jan 09 10:17
Techrights-secthe command subsitution part needs to return an integer which contains theJan 09 10:17
Techrights-secapproximate size in bytes of the combined files.  Jan 09 10:17
Techrights-secWorks with GNU Awk 5.1.0, untested in othersJan 09 10:17
schestowitz-TRis this ready to integrate and test, or still in progress?Jan 09 10:17
Techrights-secAdjust the f/10 to f/2 or whatever fraction desired but it should work ok.  Jan 09 10:18
Techrights-secThe file name is hardcoded twice and ffmpeg concat and other options are missing,Jan 09 10:23
Techrights-sec but it does trigger the script when the fraction is reached.  So it will take Jan 09 10:23
Techrights-seca little to integrate it on your end, but hopefully not much.    Jan 09 10:23
Techrights-secAre all the intros and outros more or less the same size?  Or do they need to beJan 09 10:23
Techrights-secmeasured each time?  Jan 09 10:23
schestowitz-TRthey are 3 to 22 seconds, but compared to main "body" that's a fractionJan 09 10:23
Techrights-sec Ok but an integer needs to get fed to AWKJan 09 10:24
*liberty_box has quit (Ping timeout: 2m30s)Jan 09 10:36
*liberty_box (~liberty@suig26pxj59pi.irc) has joined #boycottnovellJan 09 10:43
Techrights-secfilesize=$(Jan 09 10:51
Techrights-sec        awk 'Jan 09 10:51
Techrights-sec                /^file/ {Jan 09 10:51
Techrights-sec                        cmd="stat -c \"%s\" " $2;Jan 09 10:51
Techrights-sec                        cmd | getline s;Jan 09 10:51
Techrights-sec                        close(cmd);Jan 09 10:51
Techrights-sec                        size=size+sJan 09 10:51
Techrights-sec                }Jan 09 10:51
Techrights-sec                END {Jan 09 10:51
Techrights-sec                        print sizeJan 09 10:51
Techrights-sec                }' ./recipe.txtJan 09 10:51
Techrights-sec        );Jan 09 10:51
Techrights-secffmpeg -y -progress - -nostats -i x.webm \Jan 09 10:51
Techrights-sec        -metadata title="someting" file.webm 2>/dev/null \Jan 09 10:51
Techrights-sec| awk -v f=$filesize 'Jan 09 10:51
Techrights-sec        BEGIN { ...Jan 09 10:51
schestowitz-TRthanksd!!Jan 09 10:52
schestowitzroy@vonick:~$ filesize=$(Jan 09 10:56
schestowitz        awk 'Jan 09 10:56
schestowitz                /^file/ {Jan 09 10:56
schestowitz                        cmd="stat -c \"%s\" " $2;Jan 09 10:56
schestowitz                        cmd | getline s;Jan 09 10:56
schestowitz                        close(cmd);Jan 09 10:56
schestowitz                        size=size+sJan 09 10:56
schestowitz                }Jan 09 10:56
schestowitz                END {Jan 09 10:56
schestowitz                        print sizeJan 09 10:56
schestowitz                }' ./recipe.txtJan 09 10:56
schestowitz        );Jan 09 10:56
schestowitzroy@vonick:~$ echo $filesizeJan 09 10:56
schestowitz2615970Jan 09 10:56
Techrights-secnpJan 09 11:04
schestowitz-TRI will push to git before testingJan 09 11:04
schestowitz-TRthough I do wonder how rsync behaves when it handles an open and growing file, so I might need to add a new functionJan 09 11:05
schestowitz-TRok, pushed, not tested yetJan 09 11:07
*psydroid4 (~psydroid@cqggrmwgu7gji.irc) has joined #boycottnovellJan 09 11:14
Techrights-secackJan 09 11:28
schestowitz-TRtesting now...Jan 09 11:33
schestowitz-TRno error, I efresh server end to see progress as it went alon gJan 09 11:33
schestowitz-TRwill test with a bigger fileJan 09 11:33
schestowitz-TRwill record somsethingJan 09 11:33
Techrights-secgoodJan 09 11:34
*wallacer has quit (Ping timeout: 2m30s)Jan 09 11:51
*liberty_box has quit (Ping timeout: 2m30s)Jan 09 11:51
*wallacer (~quassel@6bsu33ajs4zs4.irc) has joined #boycottnovellJan 09 11:51
*liberty_box (~liberty@suig26pxj59pi.irc) has joined #boycottnovellJan 09 11:53
*DaemonFC (~daemonfc@tnxugezmmi87e.irc) has joined #boycottnovellJan 09 12:13
Techrights-secgoodJan 09 12:20
Techrights-secCurrent regulations regarding product liability seem to focus around goods soldJan 09 12:20
Techrights-secand explicitly exclude services.  An increasing amouunt of software is tiedJan 09 12:20
Techrights-secor run on remote servers, putting them into a hybrid category.  As these lean towJan 09 12:20
Techrights-secwards becoming services (e.g. MSOffice) how much of that is being done as a Jan 09 12:20
Techrights-secdodge from product liability regulations?  Softare is covered, technically, butJan 09 12:20
Techrights-secignored so far.  Products, thus softwatre, are covered in particularly when theyJan 09 12:20
Techrights-secare used as advertised.  Therefore when M$ victims use M$ products as adverstizedJan 09 12:20
Techrights-sec and still get harmed, M$ is technically liable, even if the laws have not Jan 09 12:20
Techrights-secyet been enforced that way.  Jan 09 12:20
Techrights-secSee https://eur-lex.europa.eu/legal-content/EN/TXT/PDF/?uri=CELEX:52018SC0157&from=ENJan 09 12:20
schestowitzsh: 1: uploadvideo: not foundJan 09 12:22
schestowitzI think a variable scope issueJan 09 12:22
schestowitzwhen called from system()Jan 09 12:22
schestowitzwhat's the simplest fix?Jan 09 12:22
Techrights-secSee also: https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=CELEX:52021PC0206&from=ENJan 09 12:24
-TechrightsBN/#boycottnovell-eur-lex.europa.eu | NO TITLEJan 09 12:24
*liberty_box has quit (Ping timeout: 2m30s)Jan 09 12:28
Techrights-secsounds like a matter of the right path, try putting Jan 09 12:33
Techrights-sec        set -xvJan 09 12:33
Techrights-secbefore the lines in question and thenJan 09 12:33
Techrights-sec        set +xv Jan 09 12:33
Techrights-secafter them to show what thr sccript is looking for and the evaluate that inJan 09 12:33
Techrights-secthe context of the working directory to see if maybe the script should Jan 09 12:33
Techrights-secuse paths diferently (e.g. set $PAtH at the top or else use absolute paths)Jan 09 12:34
schestowitz-TRok, see gitJan 09 12:36
*liberty_box (~liberty@suig26pxj59pi.irc) has joined #boycottnovellJan 09 12:38
*DaemonFC has quit (Quit: Leaving)Jan 09 12:47
Techrights-secackJan 09 12:51
Techrights-secIt's problem of quoting.  Rather than fiddling with escaping the doubleJan 09 12:51
Techrights-secquotes toedeal with a shell variable inside AWK, it would be easier to passJan 09 12:51
Techrights-secthe shell variable into AWK using another -v, just a sec.Jan 09 12:51
Techrights-secyes, adding .... ok in git, but untestedJan 09 12:51
schestowitz-TRcan you push that in?Jan 09 12:51
schestowitz-TRnext i will do a pluton videoJan 09 12:51
schestowitz-TRthanks, will record, then testJan 09 12:55
Techrights-secackJan 09 12:56
*liberty_box has quit (Ping timeout: 2m30s)Jan 09 13:13
*liberty_box (~liberty@suig26pxj59pi.irc) has joined #boycottnovellJan 09 13:19
Techrights-secback in a bitJan 09 13:23
schestowitz-TRI got the same error message as before the changesJan 09 13:56
*liberty_box has quit (Ping timeout: 2m30s)Jan 09 13:57
*u-amarsh04 has quit (Connection closed)Jan 09 13:59
*u-amarsh04 has quit (connection closed)Jan 09 13:59
Techrights-secback in a bitJan 09 14:14
Techrights-secDoes the script "uploadvideo" exist, if so is it in the $PATH?Jan 09 14:14
schestowitz-TRit's inside the sourced file, which contains the functionJan 09 14:14
Techrights-secAh, the system() function must not have the same material.  I'll have to thinkJan 09 14:19
Techrights-seca bit about how to get a function into that.Jan 09 14:19
*liberty_box (~liberty@suig26pxj59pi.irc) has joined #boycottnovellJan 09 14:25
Techrights-secOk.  AWK's system() uses sh instead of your interactive shell.  I see a wayJan 09 14:27
Techrights-secto get it to use a function, but it must call the function file once again.Jan 09 14:27
Techrights-secWorking...Jan 09 14:27
*Despatche (~desp@u3xy9z2ifjzci.irc) has joined #boycottnovellJan 09 14:31
Techrights-secok a little complicated but try what's in GitJan 09 14:37
schestowitz-TRthanks!Jan 09 14:37
Techrights-secnpJan 09 14:40
schestowitz-TRi will do a kristall video to test the changes withJan 09 14:40
Techrights-secackJan 09 14:42
*liberty_box has quit (Ping timeout: 2m30s)Jan 09 15:12
*liberty_box (~liberty@suig26pxj59pi.irc) has joined #boycottnovellJan 09 15:15
schestowitz-TRthe latest version (git, identical) seems to have worked, but it's still in progrJan 09 15:50
schestowitz-TRess, so no leaping to celebration just yetJan 09 15:50
Techrights-secackJan 09 15:51
Techrights-secif it gets too much more complicated, then perl would be the next step.Jan 09 15:51
Techrights-secLength is not so much a problem as complexity.  Jan 09 15:51
schestowitz-TRit is harder for me to cope with perlJan 09 15:51
Techrights-sec Ok, so incentive to keep Jan 09 15:52
Techrights-secthe scripts simpler :)Jan 09 15:52
*liberty_box has quit (Ping timeout: 2m30s)Jan 09 15:56
*liberty_box (~liberty@suig26pxj59pi.irc) has joined #boycottnovellJan 09 16:05
*liberty_box has quit (Ping timeout: 2m30s)Jan 09 16:32
*tech_exorcist (~tech_exorcist@x36jhwfgrvdfk.irc) has joined #boycottnovellJan 09 16:33
*tech_exorcist has quit (connection closed)Jan 09 16:33
*tech_exorcist (~tech_exorcist@qiahibkh2iwka.irc) has joined #boycottnovellJan 09 16:38
*liberty_box (~liberty@suig26pxj59pi.irc) has joined #boycottnovellJan 09 17:08
Techrights-secback in a few hoursJan 09 17:19
*tgraswe (~bodg@tqt9fr4m7w6w4.irc) has joined #boycottnovellJan 09 17:44
*tgraswe has quit (connection closed)Jan 09 17:47
*tgraswe (~bodg@vpjntwzzzc8xi.irc) has joined #boycottnovellJan 09 18:06
*tgraswe has quit (connection closed)Jan 09 18:07
*tgraswe (~bodg@v8nadz8adup3w.irc) has joined #boycottnovellJan 09 18:07
*DaemonFC (~daemonfc@c6f2nzqiwd2bc.irc) has joined #boycottnovellJan 09 18:36
*liberty_box has quit (Ping timeout: 2m30s)Jan 09 18:42
*liberty_box (~liberty@suig26pxj59pi.irc) has joined #boycottnovellJan 09 19:20
*DaemonFC has quit (Ping timeout: 2m30s)Jan 09 19:21
*DaemonFC (~daemonfc@c6f2nzqiwd2bc.irc) has joined #boycottnovellJan 09 19:26
*tech_exorcist has quit (Quit: Disconnecting)Jan 09 21:53
Techrights-secbackJan 09 21:59
Techrights-secafkJan 09 21:59
*u-amarsh04 (~amarsh04@joseon-rmogvn.g0d7.dtdf.mc4289.IP) has joined #boycottnovellJan 09 22:53
*u-amarsh04 (~amarsh04@6pxtd49npuduw.irc) has joined #boycottnovellJan 09 22:53
*wallacer has quit (Ping timeout: 2m30s)Jan 09 23:09
*wallacer (~quassel@6bsu33ajs4zs4.irc) has joined #boycottnovellJan 09 23:16
*psydroid4 has quit (Ping timeout: 2m30s)Jan 09 23:32

Generated by irclog2html.py 2.6 | ䷉ find the plain text version at this address (HTTP) or in Gemini (how to use Gemini) with a full GemText version.