/media/bill/HOWELL_BASE/Projects/ACM Facility Safety presentation 01Sep2016/video production/0_vidProdn notes ACM.txt *************** 18Dec2016 Writeup description of video for my website Howell 161220 Big Data, Deep Learning, and Safety.odt >> can't find writing that I've already done!! It may be on Lenovo Computer *************** 18Dec2016 adjust avcon "ss" options for audio & video to blend them properly # it seems that the "ss" option resets timing, so put the video or audio file # with the lowest "ss" timing first, and readjust subsequent "ss" in consequence? 1st attempts were waayy off (10 to 20 seconds audio lag) For 3rd attempt, audioVideo_blend modified to put video first for avconv audio 10s, 18s, 13, video 4s, 3s, 3, audioVideo_blendACM IS { audioVideo_blend '/media/bill/VIDEO_PRODN/ACM Facility Safety presentation 01Sep2016/video capture/Howell - Big Data, Deep Learning, Safety nosound.ogv' '00:00:03' '/media/bill/VIDEO_PRODN/ACM Facility Safety presentation 01Sep2016/audio capture/161211 Howell - full ACM audio.wma' '00:00:13' '/home/bill/vid_temp/Howell - Big Data, Deep Learning, Safety.ogv' 24 'end' ; } I removed the "ss" and "t" from the audio part of the blend - now snip of 17s doesn't play well, huge file size, no sound???? ELSE t_snip := - (EACH sec_from_hhmmss t_end ts_video) ; f_videoOut := link fname_base ' ' (t_fnameFmt ts_video) '-' (t_fnameFmt t_end) ' ' ' duration ' (string t_snip) 's' ; cmd := link 'avconv ' ' -i "' p_audioIn '" ' ' -ss ' (string (floor * t_avcon_ratio (sec_from_hhmmss ts_audio))) ' -t ' (string t_snip) ' -acodec wmav2 ' ' -i "' p_videoIn '" -r ' (string fps) ' ' ' -t ' (string t_snip) ' -vcodec theora -b 849k' ' "' d_videoOut f_videoOut '.' f_extension '" ' ; ENDIF ; >> OK, now the video starts right, but audio isn't blended in? https://www.libav.org/avconv.html#AVOptions ‘-ss position (input/output)’ When used as an input option (before -i), seeks in this input file to position. Note the in most formats it is not possible to seek exactly, so avconv will seek to the closest seek point before position. When transcoding and ‘-accurate_seek’ is enabled (the default), this extra segment between the seek point and position will be decoded and discarded. When doing stream copy or when ‘-noaccurate_seek’ is used, it will be preserved. When used as an output option (before an output filename), decodes but discards input until the timestamps reach position. position may be either in seconds or in hh:mm:ss[.xxx] form. # cmd := link 'avconv ' ' -ss:v ' (string (floor * t_avcon_ratio (sec_from_hhmmss ts_video))) ' -i "' p_videoIn '" -r ' (string fps) ' ' ' -t:v ' (string t_snip) ' -ss:a ' (string (floor * t_avcon_ratio (sec_from_hhmmss ts_audio))) ' -i "' p_audioIn '" ' ' -t:v ' (string t_snip) ' -acodec wmav2 ' ' -vcodec theora -b:v 849k' ' "' d_videoOut f_videoOut '.' f_extension '" ' ; # 18Dec2016 replaced code for ELSE cmd := link 'avconv ' ' -ss ' (string (floor * t_avcon_ratio (sec_from_hhmmss ts_video))) ' -t ' (string t_snip) ' -i "' p_videoIn '" -r ' (string fps) ' ' ' -acodec copy -vcodec copy -async 1 ' ' "' d_videoOut f_videoOut '.' f_extension '" ' ; # 18Dec2016 can't start early enough - remove delays for audio? ' -ss ' (string (floor * t_avcon_ratio (sec_from_hhmmss ts_video))) ' -t ' (string t_snip) # 18Dec2016 Unsupported codec id in stream 1 ' -vcodec theora -b:v 849k' Stream #1:0(eng): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, stereo, fltp, 96 k/s # 19Dec2016 Unknown encoder 'yuv420p' : ' -vcodec yuv420p -b:v 849k' # try libtheora ' -vcodec libtheora -b:v 849k' # try complex filter ' -filter_complex ''[0:v][1:a]'' -map ''[out]'' ' result: [AVFilterGraph @ 0x8cadbc0] No such filter: '' Error configuring filters # 19Dec2016 12:28 cmd := link 'avconv ' ' -ss:v ' (string (floor * t_avcon_ratio (sec_from_hhmmss ts_video))) ' -i "' p_videoIn '" ' ' -t:v ' (string t_snip) ' -ss:a ' (string (floor * t_avcon_ratio (sec_from_hhmmss ts_audio))) ' -i "' p_audioIn '" ' ' -t:v ' (string t_snip) ' -r ' (string fps) ' -acodec wmav2 ' ' -vcodec theora -b:v 849k' ' "' d_videoOut f_videoOut '.' f_extension '" ' ; >> still no workee: [ogg @ 0x93aeb80] Unsupported codec id in stream 1 # remove codecs cmd := link 'avconv ' ' -ss:v ' (string (floor * t_avcon_ratio (sec_from_hhmmss ts_video))) ' -i "' p_videoIn '" ' ' -t:v ' (string t_snip) ' -ss:a ' (string (floor * t_avcon_ratio (sec_from_hhmmss ts_audio))) ' -i "' p_audioIn '" ' ' -t:v ' (string t_snip) ' -r ' (string fps) ' -b:v 849k' ' "' d_videoOut f_videoOut '.' f_extension '" ' ; >> This WORKED!! Audio must go from wmav2 -> flac !!! (who would know??) Video goes theora -> libtheora as automatically happened previously # The following gives video ~2 seconds later than audio audioVideo_blendACM IS { audioVideo_blend '/media/bill/VIDEO_PRODN/ACM Facility Safety presentation 01Sep2016/video capture/Howell - Big Data, Deep Learning, Safety nosound.ogv' '00:00:04' '/media/bill/VIDEO_PRODN/ACM Facility Safety presentation 01Sep2016/audio capture/161211 Howell - full ACM audio.wma' '00:00:08' '/home/bill/vid_temp/' 24 'end' ; # Try audioVideo_blendACM IS { audioVideo_blend '/media/bill/VIDEO_PRODN/ACM Facility Safety presentation 01Sep2016/video capture/Howell - Big Data, Deep Learning, Safety nosound.ogv' '00:00:04' '/media/bill/VIDEO_PRODN/ACM Facility Safety presentation 01Sep2016/audio capture/161211 Howell - full ACM audio.wma' '00:00:06' '/home/bill/vid_temp/' 24 'end' ; # now audio 3s before video? (worse), change to : audioVideo_blend '/media/bill/VIDEO_PRODN/ACM Facility Safety presentation 01Sep2016/video capture/Howell - Big Data, Deep Learning, Safety nosound.ogv' '00:00:04' '/media/bill/VIDEO_PRODN/ACM Facility Safety presentation 01Sep2016/audio capture/161211 Howell - full ACM audio.wma' '00:00:10' '/home/bill/vid_temp/' 24 'end' ; >> audio perhaps 6s before video # Try audioVideo_blend '/media/bill/VIDEO_PRODN/ACM Facility Safety presentation 01Sep2016/video capture/Howell - Big Data, Deep Learning, Safety nosound.ogv' '00:00:04' '/media/bill/VIDEO_PRODN/ACM Facility Safety presentation 01Sep2016/audio capture/161211 Howell - full ACM audio.wma' '00:00:05' '/home/bill/vid_temp/' 24 'end' ; >> now video for Apollo 13 4s behind audio - but close for Kasparov # *************** 28Sep2016 Accurate Automation video This has disappeared from their website in the last few days!!??? I downloaded photos and will make a slide of it. +---+ Problem with gpicview - xdotool key Right Error msg : sh: 1: Syntax error: "(" unexpected >> maybe due to kwrite line >512(?) chars? >> I split that line to see what will happen +-----+ Should make a video of sequence of photos - can blen with video with "cat" *************** 27Sep2016 NASA DVD clips From the Earth to the Moon - can't properly play DVD files alone (must play from disk?) Will have to vidCam it - and blend in audio? **************** 26Sep2016 16:56 next set of corrections Use test snip right at start of video, long enough to test pidof in separate terminal snip_record '00:00:30' '00:01:30' 'Kasparov takes a chance' ; $ pidof recordmydesktop >> Nothing!! (isn't running) $ recordmydesktop >> unidentified identifier: RECORDMYDESKTOP <***> What??? Software Manager - confirms it is installed. Still have : Couldn't open device hw:0,0 Error while opening/configuring soundcard hw:0,0 Try running with the --no-sound or specify a correct device sh: 1: Syntax error: Unterminated quoted string PID_recMyDsk: ?eof Note that pulseoutout GUI shows "Digital stereo (HDMI) Output" and "Analogue stereo duplex" but I don't have HDMI??? WRONG!!! Read the instructions that I put in that print to screen!! +-----+ Argh! pulseaudio needs the IEC958 audio card, which is on the Toshiba! +-----+ dir_video_output -> not being used after recent change? bye, reboot video stuff STILL get wrong dir_video_out!!!??? dir_media_in = d_vidExtrnCommon := '/media/bill/HOWELL_BASE/Qnial/MY_NDFS/video production/' but this isn't in the code???!!! ... HDdrive_mountCheck - in start_2ndDrive but not defined? (maybe setup.ndf? YES!) >> I moved outside of "Kasparov" operator to make global (and enasure Startup gets these) : dir_media_in := '/media/bill/Lexar/Kasparov vid/' ; dir_video_out := '/media/bill/HOWELL_BASE/Projects/ACM Facility Safety presentation 01Sep2016/Scenes/Deep Checkers, Chess, Go/' ; OK - now at least the directories are correct Current status - vlc launches, but full-sized window - recordmydesktop DOESN'T launch!! >> Increase startup delay change pgm_delays -> 'recordmydesktop' '5' to '6' SHIT! missing " host link 'pidof >"' pname_PID_recMyDsk ' recordmydesktop ' ; % linux command "pidof" - process id of the specified now is host link 'pidof >"' pname_PID_recMyDsk '" recordmydesktop ' ; % linux command "pidof" - process id of the specified +-----+ "Detected compositing window manager" Maybe I need to de-interlace? - But my window manager is ?Muffin? which is compositing? **************** 26Sep2016 16h31 next set of corrections 1. AGAIN problem of PID_recMyDsk: ?eof change pgm_delays -> 'recordmydesktop' '3' to '5' +-----+ 2. new error msg -> seems to be for recrd_start sh: 1: Syntax error: Unterminated quoted string cmd := link 'recordmydesktop -x ' x ' -y ' y ' --width ' width ' --height ' height ' --v_quality 63 --v_bitrate 2000000 --fps 30 ' ' --buffer-size 264620032 --freq 48000 ' ' -o "' fpName '" & ' ; looks OK - run again and lood at cmd output that I just put in Still have problem with pidof!!?? ***************** 21Sep2016 Something is "nulling" ID_sectn & ID_refs !!?? I can't see what is doing that (perhaps --clearmodifiers?) need to run tests to track the problem fudge?- run winiD_get each time i use SOLVED - Problem was that I put other code at end of operators & didn't pass the value of winID's!! ************* 05Sep2016 First attempt to run - missing programs on Lenovo! xdotool gpicview audiopreview 10Sep2016 BINGO!!!! http://askubuntu.com/questions/400363/bfgminer-not-catching-xdotool bfgminer not catching xdotool asked Jan 5 '14 at 8:14, xdaimon Many programs do not accept key strokes when they do not have the keyboard forcus - which certainly makes some sense. But you do not need to use "windowactivate", "windowfocus" works, and does not bring the window to front etc.: xdotool windowfocus 8392809 key p Also, you can simplify your command to one line by using the sleep command of xdotool xdotool key p sleep 0.5 key s or by using the option --delay with the command key. answered Aug 3 '14 at 10:03 Volker Siegel ************* 04Sep2016 Size on-screen view of [heading, reference] bands for screen capture search "libreoffice write and host commands" http://unix.stackexchange.com/questions/140537/run-terminal-commands-from-within-libreoffices-basic-programming Run terminal commands from within LibreOffice's Basic programming? Is there a way to run system commands in LibreOffice Basic macros so that macros will be able to do things outside LibreOffice (e.g. changing keyboard layout)? edited Jul 3 '14 at 13:30, slm♦ asked Jul 3 '14 at 12:05, user69453 >> might be useful for some other project http://pythonhosted.org/iac-protocol/lowriter.html This page provides a guide on how to setup and use LibreOffice Writer for the IAC protocol. Warning : LibreOffice needs to have the UNO bridge running for it to function properly. Please see the instructions for more details https://community.linuxmint.com/software/view/cli-uno-bridge cli-uno-bridge "Openoffice.org is a full-featured office productivity suite that provides a near drop-in replacement for microsoft(r) office. this package contains the cli bindings to openoffice.org for accessing the openoffice.org api from mono languages (e.g. c# and boo) note that currently the use of mono for add-ins & scripting inside openoffice.org is *not* yet supported." ************* 04Sep2016 Size on-screen view of [heading, reference] bands for screen capture Use Toshiba laptop secreen size - minus top & bottom panels panel heights - for now 0.7 cm on Lenovo HDMI screen For calculations - see "ACM presentation spreadsheet.ods" Lenovo : width video = widthScreen - LinuxPanels - VLCmediaPanels = 1351 pixels heightVideo = heightScreen - LinuxPanels - VLCmediaPanels = 688 pixels I should make this a "bit" smaller! can always set window fullscreen Video panels take more space than just the image - panes & spaces! Stalin video refBand 81*547, 86*557, 85*561, 82*563, 85*563 HedBand 651*51, 647*54, 648*63, 775*74, 648*51 Slides 740*560 - all except title slide at 697*527, Slides Headings wVideo - wSize_sectn := 1351 - 100 ; References - wSize_refs := 100 668 ; # Specs for Toshiba screen size 1366*768 Less Linux & VLC media bands 1351*688 less Headings bottom band, References & voice side bands 1151*588 ID_slides := 'null' ; wPosn_slides := 100 0 ; wSize_slides := 1151 588 ; ID_vids := 'null' ; wPosn_vids := 100 0 ; wSize_vids := 1151 588 ; ID_sectn := 'null' ; wPosn_sectn := 100 590 ; wSize_sectn := 1151 100 ; ID_refs := 'null' ; wPosn_refs := 0 0 ; wSize_refs := 100 588 ; ID_corner := 'null' ; wPosn_corner := 0 590 ; wSize_corner := 100 100 ; ID_voice := 'null' ; wPosn_voice := 1090 556 ; wSize_voice := 280 124 ; %not done yet? ; ID_Howell := 'null' ; ID_Theme := 'null' ; ID_Title := 'null' ; ID_Qnial := 'null' ; % ; ************* 04Sep2016 Screen & video sizes - see "ACM presentation spreadsheet.ods" Toshiba laptop 1366* 768 1.78 HDMI 1920*1080 1.78 Stalin vid [measured sized : video 23.2 * 18.2cm, screen 50.7cm * 28.5cm] Just try Toshiba full-screen processing! In any case, probably only one vide at low-res will be used at a time! enddoc