/home/bill/System_maintenance/video extraction notes - snipping.txt rmd = recordmydesktop ********************** recordmydesktop users guide : http://recordmydesktop.sourceforge.net/rug/toc.php great description on MANY screen captures : http://askubuntu.com/questions/4428/how-to-create-a-screencast ffmpeg (now avconv?) #********************************** # Outstanding problems /home/bill/Projects/Stalin supported Hitler/0_vidExtract - common data, operators.ndf ************************* # 11Apr2014 - snips are extracted, but only a second of video results!?!?! # Error msg when recordmydesktop starts - 8 repeats of : ### X Error: BadAccess (attempt to access private resource denied) ### Bad Access on XGrabKey. ### Shortcut already assigned. # So I went through SovietStory .ndf to : # 1. look for time delays I took out! : I couldn't see any time delay changes. # 2. check for errors in the 3 passes : at start of each pass, after "vidName_prefix line, I added -> # set_t_offset_DVDfile '0:00:00' ; # This did NOT solve the problems!!!??? It also crashed LibreOffice and tried to change a kWrite file under edit?!? # It looks like I forgot to "lf" the edited ndf file? #************************************ # Video extraction code for DVD segments and HardDisk files can be seen at : # /home/bill/Projects/Stalin supported Hitler/vidSegs_Soviet_Story/vidExtract - Soviet Story snippets.ods ; #************************************ # WARNING : It is not always apparent that audio recrding is working. # Using "PulseAudio Volume Control" (pavuc), you MUST : # - switch between analog for playback, and digital for record!!!! # - I don't know if alsamixer is necessary, especially for simple video segnment capture from DVD, flv, etc etc #********************************************************** # Warning jackd must be setup & running to capture audio # see for background /home/bill/System maintenance/gtk-record notes.txt # recordMyDesktop : Advanced -> Sound Tab -> click "Use jack for audio capture" -> select system capture & playback 1 # "Recording is finished. recordMyDesktop has exited with status: 2816 # "Description: Improper window specification" # http://recordmydesktop.sourceforge.net/faq.php # recordMyDesktop is based on extensive usage of the Xdamage extension. Instead of capturing whole screenshots, the program marks the areas that have changed and updates them. This approach fails on two occasions. Video played throught the Xv extension and hardware accelerated glx context. This generally means 3d games and video windows. To record video you can configure your player to not use the Xv extension but rather go with X11/Xshm. This is a simple task on most video players and you should consult their documentation on how to do this. #Errors # 256 : Error while parsing the arguments # Use the command line version of recordmydesktop - not the GUI!!! "Run : jackd --silent -ddummy" # 26Mar2014 I used a terminal for "jackd --silent -ddummy" # run audio stereo jack from middle green plugin at back of Lenovo desktop computer to mic jack at front #************************************* # WARNING! : unrecognized windows "?eof" with media_in_start # is this due to running the program too soon after rebooting the computer? # - more likely due to wrong parameters! (window name - fname or 'totem' or 'vlc' or 'gtk-recordmydesktop' # # 24Mar2014 Biggest problem is how to get audio to work!! (jack, jackctrl, ???) - see not below # 24Mar2014 can't get vlc to WID_windw properly? use totem "Movie Player" #************************************* # WARNING : "wait" may give crazy short times if feed fractional seconds, eg "wait '0.02' (QNial) # (maybe this acts as a command - in this case to accelerate timescale by a factor of five? # this is my operator! see below - error results from not having min:sec format!! # must have '0:00:00' (exact string!) at start of video timing - can use "wait '0:00:00'" to reset base time for each section for modular effect ********************** ~13Apr2014 http://ubuntuforums.org/showthread.php?t=1710187 Re: Help needed for converting OGV to MPEG Had the same problem as you two days ago. OpenShot did my conversions perfectly. Strangely, even AviDemux (my go-to application) couldn't do what OpenShot did. FakeOutdoorsman, Join Date : Sep 2006, Beans 3,442 Re: Help needed for converting OGV to MPEG You will need to compile a newer version of FFmpeg if you want to convert videos from recordMyDesktop. If I remember correctly 10.04's FFmpeg is too old to deal with these. If you can copy and paste then you can compile. See this: HOWTO: Install and use the latest FFmpeg and x264 Example command: ffmpeg -i out.ogv -qscale 2 -ab 128k out2.mpg Increase the qscale value if you want a lower quality output. Decreasing the quality will decrease output file size. Istanbul (Desktop Session Recording) Istanbul is a desktop recorder for the Gnome desktop. It records your session into an OGG Theora video file. ******************** 15May2014 HitlerLost - can't seem to get recordmydesktop to work right, wrong WID_windw sizing???! ******************** 12May2014 JVC vidCam settings and OpenShot specs http://manual3.jvckenwood.com/index.html For my JVC GZ-200 U : http://manual3.jvckenwood.com/c2a/lyt2431-002en/ - I downloaded this! Default video record quality : "XP" 24 frames/second is around the standard? I can't find actual number for JVC GZ-200 or vidSpec "XP"!?!?!?!! I set OpenShot "Project Profile" to "HD 1080p 30 fps" OpenShot "Export Video" : Target : OGG (theora/vorbis) Video Profile : HD 1080p 30 fps Quality : Med ******************** 11May2014 ARRRRGGGGH! - I overwrote and lost BigBattles Moscow ********************* 11May2014 Wrong video window size! - actual video cut off Actually, I didn't set the video window size properly BB_main1 00h24m24s-00h24m54s Generals want Moscow, Hitler wants Ukraine food, splits invasion despite general staff protests 30s.ogv BB_main1 00h40m22s-00h40m58s Impossible that German preparations for the cold were lacking 36s.ogv Started too early!! - my error in "t_delta early launch", which must be used to EXTEND the video BB_main1 00h45m56s-00h46m08s Russian control of the skies, FLIES LOW TO SUPPORT TANKS & INFANTRY 12s.ogv BB_main1 00h49m55s-00h50m34s Did Gestapo kill innocent civilians or mostly NKVD 39s.ogv ********************** 09May2014 OpenShot mix of audio & video tracks Project Profile : HDV 1080 25i 1920*1080 - I selected this as that would have been Panasonic VidCam resolution? saved as : /home/bill/Projects/Stalin supported Hitler/vidSegs_BigBattles/BB_Moscow_OpenShot.osp time high quality HDMI : 12:24 to ??? = ??? COOL! ********************** # This version is ONLY useful for snippets - not for capturing an area of the screen! snip_record IS OP ts_start ts_end snip_fileName_short t_snip { NONLOCAL ID_record dir_media_in seg_fileName dir_video_out vidName_prefix vidName_suffix rec_size_DVD rec_posn_DVD ; write 'starting snip_record' ; % ; srce_fileName := link dir_media_in seg_fileName ; snip_fileName := link dir_video_out vidName_prefix vidName_suffix ' ' (t_fnameFmt ts_start) '-' (t_fnameFmt ts_end) ' ' snip_fileName_short ' ' (string t_snip) 's' ; host link ' avconv -ss -' ts_start ' -t ' ts_end ' -i "/media/ATA_WDC_500G/DVD_HitlerLost/VTS_01_1.VOB" ' ' -y "' snip_fileName '" ' ; wait_recordmydesktop t_snip ; % allow file to be created ; % do I need this with avconv, especially as I doidn't put "&" at the end of the host line ? ; } # test patch ' -i "/media/ATA_WDC_500G/DVD_SuvorovTalk/VTS_01_1.VOB" ' ********************** 09May2014 http://ubuntuforums.org/showthread.php?t=1402135 Add Audio file to Video February 9th, 2010 #1, inobe, Join Date : Nov 2008, United States, Beans 2,090, Distro : Kubuntu 11.10 Oneiric Ocelot Add Audio file to Video hey guys i'm trying to add an audio file to a video and override the original video sound. i just want to encode the audio with the video and join them. i used avidemux and also kdenlive' but for the life of me i cannot get it done, i don't know how or what app to use. thank guys February 9th, 2010 #2, inobe, Join Date : Nov 2008, United States, Beans 2,090, Distro : Kubuntu 11.10 Oneiric Ocelot Re: Add Audio file to Video i solved the problem with avidemux. i simply added the video and on the left pane i select the audio output "mp3" then hit audio button at top and selected main track, in the drop down menu i selected mp3 and browsed for the audio file, saved the project and the encoding began, done. in my case i had no issues with audio and video sink. Howell - Avidemux doesn't handle MTS video, nor wav audio - and I prefer NOT to convert with lousy qaulity! try VLC? - doesn't seem to be able to record? ******************* 09May2014 CamStudio http://camstudio.org/CamStudio creates a virtual webcam that can mix several video sources together and can be used for live broadcasting. See the website for installation instructions. CamStudio is able to record all screen and audio activity on your computer and create industry-standard AVI video files and using its built-in SWF Producer can turn those AVIs into lean, mean, bandwidth-friendly Streaming Flash videos (SWFs) Nov 2, 2013 - Recordings are saved in Theora video/Vorbis audio files. ... CamStudio creates a virtual webcam that can mix several video sources together ... Rosegarden http://kudos.berlios.de/kf/kisimlar/pkglist.html#rosegarden4 Music editor and MIDI/audio sequencer (amd64 & i386; Universe; ??MB) Rosegarden4 is a KDE application which provides a mixed Audio/MIDI sequencer (for playback and recording), a multi-track editor, music editing using both piano-roll and score notation, MIDI file IO, lilypond and Csound files export, etc. #************************************ # for snipping - ffmpeg and others do as feature! # 15Apr2014 http://karussell.wordpress.com/2009/11/18/recordmydesktop/ # To cut sth. from the video you can do: # ffmpeg -vcodec copy -i timefinder-v4-screencast.ogv -ss -00:00:10 -t 00:07:11 output.ogv # try this as script! #******************** DONE # 15May2014 why doesn't WID_windw resize? - maybe due to failure to recognize window. # 16May2014 VLC click on icon extreme upper-left -> Advanced -> Special window settings -> Tab "Window matching" -> Window title -> ?"Unimportant"? # how do I reset this? KDE System Settings : "Window behaviour" - NO; "Workspace behaviour" - NO; ??? # check the log file for the window#!! /home/bill/Projects/Stalin supported Hitler/z_WID_windw.txt # that was fine - single clean # # click on icon extreme upper-left -> Advanced -> Special window settings -> Tab "Size & Position" -> "Do not affect" is ghosted for Position, Size # ???? # maybe in vlc Menu -> Tools -> Preferences, but I couldn't find anything except fullscreen selection # SHIT!!! - If a window extends the full height or width of the screen, then xdotool windowmove can't reduce the full size!!!! # AH HAH!!! # Make sure that VLC windowing options are set properly!!! # Run VLC, and when open click on icon extreme upper-left # -> Advanced -> Special application settings -> Tab "Size & Position" # - "Position" : check; dropdown "Apply initially"; topDown LeftRight = 0, 1000 # - "Size" : check; dropdown "Apply initially"; width height = 200, 200 WARNING!! Make sure that VLC does NOT open the full extent of the width or height of the available screen - or the following will NOT work : xdotool windowsize width height %host link 'xdotool search >"' pname_WID_windw '" --name "' fname '"' ; ********************* 16May2014 t_factor_VLC -> See "0_vidExtract - [DVD, video, vidCam]-fname.ods" spreadsheet as the factor is applied there, not with QNial! ; # from snip_record : t_delay_video_onset %give time before searching for PID or WID? - NO, as recrd_start does that! ; %frankly, it looks like t_delay_video_onset is roughly 0.2 seconds, which is smaller than the 1 s timing resolution I am using! ; %03Apr2014 for now, t_delay_video_onset has been set to 1s ; %03Apr2014 - WRONG! - at least 3 seconds for a modest video file to load then start running! I set at 3. ********************************* #Direct capture of snips from DVD files - Problems with HitlerLost!! # 16May2014 recordmydesktop does NOT have enought time to finish processing video before its PID is killed!! # 15May2014 t_factor_VLC -> See "0_vidExtract - [DVD, video, vidCam]-fname.ods" spreadsheet as the factor is applied there, not with QNial! ; snip_record -> waitDVD ts_end ; this is NOT supposed to do the job! - it only ends the recording (recrd_kill) snip_record -> wait_recordmydesktop t_snip ; % allow file to be created ; wait_recordmydesktop IS OP secs_duration { NONLOCAL t_factor_recordmydesktop_processing ; secs_wait := (secs_duration * t_factor_recordmydesktop_processing) + 10 ; host (link 'sleep ' (string secs_wait) 's') ; } put into all 0_vidExtract data files # video-specific data t_factor_recordmydesktop_processing := 3 ; % this depends on video size, resolution, framerate etc, but I'm just using "3" here ; +-----+ Something is wrong - recrd_kill doesn't seem to terminate the recording UNTIL the VLC wsindow is closed, but then maybe there is that much more video to process, so less is accomplished! What about closing vlc window? - NYET that means that EVERY snip has to run from the start! This was working before, so let's get it working again. Old versions: host (link 'kill -1 ' PID_recMyDsk) ; % 1 = "Hang Up" process, very likely the safest kill signal there is, it should not obstruct anything ; %host (link 'kill -15 ' PID_recMyDsk) ; % 15 = SIGTERM to terminate recordmydesktop ; %host (link 'kill -15 ' PID_arecord) ; % 15 = SIGTERM to terminate arecord audio program ; %host (link 'kill -9 ' PID_recMyDsk) ; % 9 = ??????? to terminate recordmydesktop - but it prevented encoding / saving!!! ; recrd_kill seems to be the issue, from manual work on recordings man kill : HUP 1 exit - safest, but process may not listen INT 2 exit ABRT 6 core (core seems scary!) KILL 9 exit TERM 15 exit kill -l to list signals Google : http://meinit.nl/the-3-most-important-kill-signals-on-the-linux-unix-command-line The 3 most important "kill" signals on the Linux/UNIX ... OK -> kill -1 PID_recMyDsk This worked to terminate recording, but no file was created? try it >> no workee, no file man recordmydesktop SIGUSR1 causes the program to pause if it is recording SIGTERM causes normal termination of the recording SIGINT also causes normal termination SIGABRT terminates the program and removes the specified output file +-----+ "Scott Hawkins "Linux Desk Reference" book that I have you must be superuser to terminate someone else's process! pstree -l -> vlc is run under init -> kdeinit4 -> vlc -> 11*[{vlc}] whatever this means NEXT (tomorrow) : try TERM as bill and as superuser, to see what happens +-----+ 18May2014 Look, all the previous ndfs that worked used host (link 'kill -15 ' PID_recMyDsk) ; So stick with this - but command line invocation DOESN'T initiate processing-saving +-----+ quips.ndf for testing : loaddefs '/home/bill/Projects/Stalin supported Hitler/0_vidExtract - common data, operators.ndf' ; # WID_windw -> manually do xdotool search vlc # xdotool search vlc WID_windw := 104857602 ; dir_video_out := link dirBase 'vidSegs_tester/' ; snip_fileNamer := '140516 recordmydesktop test' ; # PID_recMyDsk -> manually do pidof recordmydesktop = 8351 # then define : eg PID_recMyDsk := '8351' ; recStart IS recrd_start rec_size_DVD rec_posn_DVD snip_fileNamer recKiller IS host (link 'kill -15 ' PID_recMyDsk) +-----+ Try once more ???WORKS LIKE A CHARM??? - I have no idea of why there was a problem! Current problem : recordmydesktop window doesn't close until the vlc window closes -> WHY?? Try HitlerLost 10s test again, and watch to confirm. record 5 to 15s, so wait_recordmydesktop : (10s recording * t_factor_recordmydesktop_processing = 10) + 10s + (DVD_time to end of record = 15s) = 125s that doesn't include other delays etc ~00:01:37 the vlc window closed, and with it the recordmydesktop window Only 9% of the snip was encoded? +-----+ Try another film - say BigBattles_Japan In the following, "analog" means PulseAudio "analog stereo duplex" 1. edit profile.ndf so f redefined for BB_Japan - made mistake with input file!, but seeed to process 2. BB_Japan redo test with correct input video directory :- OK, with the right output directory and SIGint = TERM = 15, it works! vlc closes at ~45s, 100% processed 3. HitlerLost with t_factor_recordmydesktop_processing = 10 : vlc closes at ~00:01:30, 9% processed to 7.1Mbyte file, doesn't work!??! 4. HitlerLost with t_factor_recordmydesktop_processing = 3 : rmd closes at ~15s?, vlc closes at ~45s? 101% processed, I forgot sound, video WORKS 5. redo 4 with sound : rmd doesn't close! vlc doesn't close! close vlc manually THEN rmd closes! 4% processed, so what is wrong - somehow HitlerLost audio is problem? 6. redo 4 with alsa set to "0 HDA Intel" : rmd doesn't close! vlc closes at ~1m30s THEN rmd closes! 20% processed, video no-workee 7. redo 4 with PulseAudio set to analogue duplex (no0record): rmd closes at ~15s?, vlc closes at ~45s? 101% processed, I forgot sound, video WORKS So [alsamixer, PulseAudio] screws up with HitlerLost, profile.ndf -> GB_disc1, edit 0_vidExtract 9. GB_disc1 with t_frp = 3, alsamixer 0, pavuc digital : rmd doesn't close! vlc closes at ~45s THEN rmd closes! 21% processed, video no-workee 10. GB_disc1 with t_frp = 3, alsamixer 0, pavuc analog : rmd closes at ~15s?, vlc closes at ~45s? 100% processed ... only zombie picture, video WORKS but of course no sound +-----+ I could put audio back through mic? But this worked FINE a few days/week ago, so what's wrong now?! +-----+ Maybe processing speed inadequate? BB_Japan works with vidCam MTS files, [HitlerLost, GB_disc1] don't work with VOB files. Set t_frp to minimum = 1 11. HitlerLost with t_frp = 1, alsamixer 0, pavuc digital : rmd doesn't close! vlc closes at ~45s THEN rmd closes! 35% processed, video no-workee NO red warnings from vlc 12. HitlerLost with t_frp = 1, alsamixer 0, pavuc analog : rmd closes at ~20s?, vlc closes at ~40s? 100% processed, video WORKS no sound Maybe recordmydesktop options can avoid the "audio problem"? Make sure rmd is NOT coupled to vlc too tightly? man recordmydesktop option --windowid - doesn't track the window itself, but the region that it covers Actually, for vidExtract - I ONLY want the window, and I already have WID_windw of the vlc player!!! This is different from capturing the full video from multiple videos, images, sound, for which I need an area of the screen. So let's modify recrd_start : - add NONLOCAL WID_windw - remove [x,y,width,height] junk, and just use WID_windw : host link 'recordmydesktop -windowid ' WID_windw ' -o "' fpName '" & ' ; 13. HitlerLost with t_frp = 1, alsamixer 0, pavuc digital : WID_windw failed!! X Error of failed request: BadWindow (invalid window parameter) But why would WID_windw not be properly set now? Code to that point is NOT affected by the change to recrd_start! 14. Re-try last after lf, see what happens and maybe why? : OK - WID_windw initially correct, now MY Qnial errormsg is "PID_recMyDsk : ?eof" rmd error : "Error when parsing `-windowid' libpopt error: -11" probably because I need "--" and not "-"? 15. Re-try 13. with correction : rmd doesn't close! vlc closes at ~45s THEN rmd closes! 33% processed, video no-workee also - rmd window is bad - covers borders So I STILL have the same audio problem! Revert back to previous version of recrd_start! Add some kind of option for audio? man rmd -> can't find much Maybe a key message is : "... Detected compositing window manager. Reverting to full screen capture at every frame. To disable this check run with --no-wm-check (though that is not advised, since it will probably produce faulty results). ..." Perhaps this comes from switching window manager from ??OpenGL to X?? - try to find this in KDE settings. KDE APPlication Launcher -> Settings -> System Settings -> Configure desktop effects -> Advanced -> Compositing type : dropdown -> XRender is current setting (I put it there to solve window setups with QNial "DesktopSetup" code I wrote) OpenGL had been setting - so I reverted to this - it has crashed my system in the past closed all apps to revert to OpenGL Start Qnial, lf HitlerLost terminal alsamixer start PulseAudio volume control, digital audio 16. HitlerLost with t_frp = 1, alsamixer 0, pavuc digital, with OpenGL not XRender, : I STILL get : "... Detected compositing window manager. Reverting to full screen capture at every frame. To disable this check run with --no-wm-check (though that is not advised, since it will probably produce faulty results). ..." rmd doesn't close! vlc closes at ~45s THEN rmd closes! 35% processed, video no-workee So OpenGL hasn't helped I will close everything and go back to XRender, then run my QNial DesktopSetup +-----+ Why can I no longer get video capture to work, when it worked fine before? Check month-ago backup code on HD_backup_Toshiba!!! This is the SAME!?! So what has changed to screw everything up? recordmydesktop - set --device hw:0 and see what happens : host link 'recordmydesktop -x ' x ' -y ' y ' --width ' width ' --height ' height ' --device hw:0 -o "' fpName '" & ' ; 17. HitlerLost with t_frp = 1, alsamixer 0, pavuc digital, with XRender not OpenGL (where "alsamixer 0" means F6 "0 HDA Intel") : This runs just fine, but NO audio? Check hardware device name in KDE AppLauncher -> Settings -> System settings -> Multimedia -> Phonon -> Device preference -> Audio Recording (doesn't react?) -> Audio hardware setup -> Sound Card dropdown -> Built-in audio (I changed this from High Definition Audio Controller) -> Profile dropdown -> Digital Stereo (IEC958) Output Is phonon interupting/corrupting sound capture? 18. HitlerLost with t_frp = 1, alsamixer 0, pavuc digital, back with XRender not OpenGL (where "alsamixer 0" means F6 "0 HDA Intel") Sound and Video Configuration as specified above : Result : rmd closes at ~15s?, vlc closes at ~45s? 100% processed Again, no sound!?!?? recordmydesktop - remove --device hw:0 to earlier config and see what happens : host link 'recordmydesktop -x ' x ' -y ' y ' --width ' width ' --height ' height ' -o "' fpName '" & ' ; 19. HitlerLost with t_frp = 1, alsamixer 0, pavuc digital (where "alsamixer 0" means F6 "0 HDA Intel") Sound and Video Configuration as specified above : Result : rmd closes at ~15s?, vlc closes at ~45s? 33% processed video no-workee (doesn't run) 20. Try - longer t_frp HitlerLost with t_frp = 4, alsamixer 0, pavuc digital (where "alsamixer 0" means F6 "0 HDA Intel") Sound and Video Configuration as specified above : Result : same as before, rmd closes at ~15s?, vlc closes at ~45s? 33% processed video no-workee (doesn't run) 21. Double-check with BB_Japan to see if it still works. edit, then loaddefs "profile BB_Japan with t_frp = 1, alsamixer 0, pavuc digital (where "alsamixer 0" means F6 "0 HDA Intel") Result : GREAT - WORKS!! 22. Double-check with SovietStory to see if it still works. edit, then loaddefs "profile SovietStory with t_frp = 1, alsamixer 0, pavuc digital (where "alsamixer 0" means F6 "0 HDA Intel") Result : GREAT - WORKS!! Failure for [HitlerLost, GreatBattles] !! Quit here, I give up #********************************* # Working now on : 18May2014 19:31 - I give up on direct snips from original files of [HitlerLost, GreatBattles] for now. [BigBattles vidCam capture/snip, SovietStory,SuvorovTalk] all work fine. Instead, I'll try to combine & convert [HitlerLost, GreatBattles] with OpenShot, then vidExtract. As per 12May2014, for HitlerLst DVDfiles : I set OpenShot "Project Profile" to "HD 1080p 30 fps" OpenShot "Export Video" : Target : OGG (theora/vorbis) Video Profile : HD 1080p 30 fps Quality : Med Start export at 20:08 Extend Kubuntu KDE screen saver and Power management to 10 hours! Turn off networking for security. Took 7 hours for file to be created! 19May2014 update 0_vidExtract - HitlerLost.ods, as I had improved this greatly with previous spreadsheet (Suvorov or sovietStory?) Also - fix position/size of vlc and recordmydesktop windows for this video. edit & loaddefs "profile.ndf - to get 0_vidExtract - HitlerLost.ndf 1. vidExtract of test Result : initially, one attempt worked, now all crap out at 20 to 33% processing, and video won't show. WHY??? Google for blog fixes - couldn't find anything strange, must be wrong wording in my question) Retried same-old-same-old - same result 2. Try extending video long past recordmydesktop : I put this in just before "stopDVD" : "host 'sleep 300s' ; Result : recording doesn't end Try: "pidof recordmydesktop" : gave 3714 "kill -15 3714" : rmd stays open until vlc killed, only 3% of capture is written to the output file!! 3. Try : SIGINT = 2 : no workee, 18% processing 4. Try a much smaller window size : Current : win_size_DVD := 820 724 ; win_posn_DVD := 0 0 ; % see Table in 0_vidExtract - common data, operators.ndf ; rec_size_DVD := 806 640 ; rec_posn_DVD := 10 50 ; % see Table in 0_vidExtract - common data, operators.ndf ; Test : win_size_DVD := 410 362 ; win_posn_DVD := 0 0 ; % see Table in 0_vidExtract - common data, operators.ndf ; rec_size_DVD := 396 300 ; rec_posn_DVD := 10 50 ; % see Table in 0_vidExtract - common data, operators.ndf ; Result : no different. 5. Why doesn't rmd stop when the interrupt is sent, rather than when the "host window (vlc)" closes? Why isn't enough processing time taken? Google "" V-----V http://www.linuxquestions.org/questions/linux-software-2/recordmydesktop-is-skipping-frames-767616/#post3749812 wolke, Registered: Nov 2009, Posts: 1, Rep: Reputation: 1 Smile heydo, its easy to fix. in gtk-recordmydesktop configurations window open the tab [MISK]. there is an field called "Extra Options". here fill in --v_bitrate 2000000 . thats all! this rate is the highest. you can try also lower values. since libtheora >1.0.0 the --v_bitrate option is needed. greetings wolke edit: oh i see you use the commandline. here is an working example: recordmydesktop -width 1024 -height 840 --v_quality 63 --v_bitrate 2000000 -o test.ogg this will encode with the highest video quality. Last edited by wolke; 11-08-2009 at 08:58 PM. ^-----^ Try : --v_quality 63 --v_bitrate 2000000 Result : no help 6. Maybe the problem is that the SIGTERM isn't getting through? Try : recrd_kill -> put write 'recrd_kill : SIGTERM sent' ; Result : no help 7. ReTry : SIGKILL (-9) Result : there is NO processing/capture of video at all 8. Try : manual Ctrl-C Result : Interesting - this killed vlc and rmd windows, but processed 49% of video (still won't run, of course) 9. Try : send 2 SIGTERMS? V-----V host (link 'kill -15 ' PID_recMyDsk) ; % normally SIGTERM 15, SIGINT = 2 to interrupt ; write link 'recrd_kill : SIGTERM -15 sent to PID_recMyDsk ' PID_recMyDsk ; host 'sleep 2s' ; host (link 'kill -15 ' PID_recMyDsk) ; % normally SIGTERM 15, SIGINT = 2 to interrupt ; ^-----^ Result : 2nd SIGTERM didn't help, no visible effect, saved 45% of output Google - this looks good V-----V http://thefunkcorner.blogspot.ca/2009/05/trials-with-recordmydesktop.html Configuring an .asoundrc file to use PulseAudio for all ALSA based audio by default. The latter is done by creating a new blank file in your home directory and adding the following code: pcm.!default { type pulse } ctl.!default { type pulse } Save the file, exit, log out of your session and login again. This alone reduced the dropped audio from 7 occassions in one minute's worth of recorded footage to 3. --buffer-size 65538 Also - several other additions (see "recrd_start" coding!) [Howell - I didn't add] add pasuspender -- to the beginning of the command line. Author's favourite : recordmydesktop --on-the-fly-encoding -v_quality 63 -v_bitrate 2000000 -s_quality 10 --full-shots --fps 20 --freq 48000 --buffer-size 65538 -device plughw:0,0 My current trial : host link 'recordmydesktop -x ' x ' -y ' y ' --width ' width ' --height ' height ' -device plughw:0,0 --v_quality 63 --v_bitrate 2000000 --fps 20 ' ' --buffer-size 65538 --freq 48000 ' ' -o "' fpName '" & ' ; ^-----^ V-----V From earlier trials and tribulations, comments in coding of "recrd_start" %18May2014 try --device hw:0 ; %briefly tried 18May2014 : host link 'recordmydesktop --windowid ' WID_windw ' -o "' fpName '" & ' ; %tried briefly ?April2014? The following specification does NOT work ; % - possibly because the recordmydesktop version I have is out of date or something? ; %host link 'recordmydesktop -x ' x ' -y ' y ' --width ' width ' --height ' height ' --fps 20 ' ' --channels 2 --freq 22050 --buffer-size 65538 --s_quality 10 --device alsa ' ' --v_bitrate 45000 --v_quality 20 ' ' --overwrite --no-wm-check ' ' -o "' fpName '" & ' ; Post-note - it may have been "--no-wm-check" that screwed up everything? ^-----^ 9. continued ... Result : rmd error msg "Error when parsing `-device': libpopt error: -11" ?whatever...? Re-Do : taking out the option "-device plughw:0,0" Result : rmd only shuts down when vlc window closes, 44% output 10. Try : call rmd with calculated time, so that an interrupt isn't necessary? Result : you can specify the delay-to-start, but not the end! 11. Try : --on-the-fly-encoding Result : Much worse - probably <<10% output 12. Try : --fps 30 (as this is what I specified for OpenShot to create the ogv HitlerLost) Result : slower to process, only got to 44% output #********************************* 19May2014 Try avconv (again!) man avconv - NO!!! cannot specify start/stop times, multiple extracts Example : avconv -f oss -i /dev/dsp -f video4linus -i /dev/video0 /tmp/out.mpg X11 grabbing : avconv -f x11grab -s cif -r 25 -i :0.0+10,20 /tmp/out.mpg where 0.0 is display.screen number of your x11 server, same as the DISPLAY environmental variable +10,20 Other options : -timelimit duration (global) - Exit after avconv has been running for duration seconds stream specifier : p:program_id[:stream_index] without stream_index - matches ALL streams in this program can I specify the vlc PID? -r[:stream_specifier] fps (input/output, per stream), set frame rate (Hz value, fraction or abbreviation), (default = 25) -s[:stream_specifier] size (input/output, per stream), size as wxh but can use abbreviations (eg vga - 640x480) 1. Try : Run HitlerLost, and while running run batch file with : avconv -timelimit 10 -f x11grab -r 25 -i :0.0 "/home/bill/Projects/Stalin supported Hitler/vidSegs_tester/test.mpg" Result : Stupid STILL screen jitters!?!?! useless - anyways, try to see if video window can be captured. ******************** 20May2014 great blog comments on halting, jerky video with avconv http://www.linuxquestions.org/questions/slackware-14/coverting-rmvb-to-avi-using-ffmpeg-917075/ 29th Jul 2013 09:34 #2 poisondeathray, Join Date: Sep 2007, Location: Canada One problem with mencoder and FFmpeg, is they have problems decoding interlaced AVC transport streams (e.g. from camcorders). Glitches, frames out of order, and wrong frame rate are common issues FFmbc decodes those streams better without errors. It can produce proper interlaced DVD output (50 unique fields per second) with flagging, proper interlaced aware scaling to SD, and conversion to SD colors (these last few things can be done with FFmpeg, it's the decoding issue that is primarily the problem) In this example, I left " -acodec copy " assuming the original stream had compliant DVD audio. If you remove that, it will encode DVD compliant AC3 automatically Code: ffmbc -i input.mts -vf colormatrix=bt709:bt601 -target dvd -acodec copy -b 7000k -tff output.mpg 29th Jul 2013 10:42 #3 bstewart, Join Date: Jul 2013, Location: UK - South East, Superb - top notch. Downloaded FFmbc (struggled a bit to do this) and tried your command line. My original 1080i50 was Sony MTS file so tried direct from that. End result was exactly what I was looking for. properly interlaced for DVD. Burned a dvd and tried it in my dvd player. Motion is now much smoother. Strangely enough the freeze frame on the DVDplayer shows no interlacing so it must do this internally because checking the encoded vob with vlc interlace on/off clearly shows interlacing. Absolutely brilliant - I'd never heard of FFmbc. - many thanks. #*************************** # Future items wrt avconv alsa - "man avconv" has a great description of configure hw:0,0,0 etc -pass n - can do two-pass video encoding to produce video at exact bitrate (I'd have to test to see what this does) #*************************** # 19May2014 # example from man avconv : avconv -f x11grab -s cif -r 25 -i :0.0+10,20 /tmp/out.mpg where 0.0 is display.screen number of your x11 server, same as the DISPLAY environmental variable +10,20 x,y offsets -f fmt (input/output) Force input or output file format. Usually not needed -i filename (input) input file name Other options : -timelimit duration (global) - Exit after avconv has been running for duration seconds stream specifier : p:program_id[:stream_index] without stream_index - matches ALL streams in this program can I specify the vlc PID? -q[:stream_specifier] q (output, per stream), Use a fixed quality scale (VBR). The meaning of q is codec-dependent. -r[:stream_specifier] fps (input/output, per stream), set frame rate (Hz value, fraction or abbreviation), (default = 25) -s[:stream_specifier] size (input/output, per stream), size as wxh but can use abbreviations (eg vga - 640x480) ##IMPORTANT : -ss position (input/output) - when used as an input option (before "-i"), seeks in this input file to position. - When used as an output option (before an output filename), decodes but discards input until the timestamps reach position. This is slower, but more accurate. position may be either in seconds or in "hh:mm:ss[.xxx]" form. # avconv -formats - show available formats # avconv -coddecs - show available codecs #******************************* # Trials : 1. first try : host 'avconv -timelimit 10 -f x11grab -r 20 -i :0.0 "/home/bill/Projects/Stalin supported Hitler/vidSegs_tester/test.mpg"' lousy dropping/jigging of screen, bad rsolution, no sound, but its a start 2. host 'avconv -timelimit 10 -f x11grab -r 20 -i hw:0,0 :0.0 -q:a "/home/bill/Projects/Stalin supported Hitler/vidSegs_tester/test.mpg"' ; Result : "Requested output format '-i' is not a suitable output format" 3. example from blog: http://askubuntu.com/questions/421894/screencast-with-avconv-cuts-off-last-5-seconds-of-audio avconv -f alsa -i pulse -f x11grab -r 10 -s 1366x768 -i :0.0 -c:a libmp3lame -q:a 9 -c:v libx264 "$HOME/screencast_001.mkv" host 'avconv -timelimit 10 -f alsa -i pulse -f x11grab -r 20 -i :0.0 -c:a libmp3lame -q:a 9 -c:v libx264 "/home/bill/Projects/Stalin supported Hitler/vidSegs_tester/test.mpg"' ; Result : CPU time limit exceeded (core dumped) - what the hell is this? probably alsa is too much of a flow for the CPU? 4. Based on : http://www.kegel.com/linux/screencasting.html host 'avconv -timelimit 10 -f pulse -f x11grab -r 20 -i :0.0 -c:a libmp3lame -q:a 9 -c:v libx264 "/home/bill/Projects/Stalin supported Hitler/vidSegs_tester/test.mpg"' ; Result : neat output message "Stream #0.0: Video: rawvideo, bgra, 640x480, 196607 kb/s, 20 tbr, 1000k tbn, 20 tbc" Unknown encoder libx264 -> so I'll just specify bgra? 5. Specify video codec bgra : host 'avconv -timelimit 10 -f pulse -f x11grab -r 20 -i :0.0 -c:a libmp3lame -q:a 9 -c:v bgra "/home/bill/Projects/Stalin supported Hitler/vidSegs_tester/test.mpg"' ; Result : error "Unknown encoder 'bgra'" ? (they are the ones that brought it up! - and it IS listed as a codec!?!?!?!!?), try : host 'avconv -timelimit 10 -f pulse -f x11grab -r 20 -i :0.0 -c:a libmp3lame -q:a 9 -c:v vga "/home/bill/Projects/Stalin supported Hitler/vidSegs_tester/test.mpg"' ; OK, so the resolution is NOT a format (makes sense, stupid me) Just drop the output -c:v host 'avconv -timelimit 10 -f pulse -f x11grab -r 20 -i :0.0 -c:a libmp3lame -q:a 9 "/home/bill/Projects/Stalin supported Hitler/vidSegs_tester/test.mpg"' ; Result : no sound, crappy video quality, so I will simply enlarge the vlc window Note: The problem with the codecs may be that I specified ".mpg" for the output, which may conflict? Result : Much better video quality but <1/4 of the window!, no sound 6. Try : Remove the codecs and quality specs host 'avconv -timelimit 10 -f pulse -f x11grab -r 20 -i :0.0 "/home/bill/Projects/Stalin supported Hitler/vidSegs_tester/test.mpg"' ; Result : shit again - I think the problem is that the bgra format is IMPOSED, giving only part of the video output. I need to specify the resolution format, and maybe the codec. 7. Try : remove ".mpg" from the output file spec and see what happens host 'avconv -timelimit 10 -f pulse -f x11grab -r 20 -i :0.0 "/home/bill/Projects/Stalin supported Hitler/vidSegs_tester/test"' ; Result : Unable to find a suitable output format for '//home/bill/Projects/Stalin supported Hitler/vidSegs_tester/test' 8. Try : Hah! as stated "... I need to specify the resolution format, and maybe the codec. ..." File formats shown by : avconv -formats Candidates that I recognize : wav, ogg, vob, mov, flv, avi, MTV, I'll start with ogg host 'avconv -timelimit 10 -f pulse -f x11grab -r 20 -i :0.0 "/home/bill/Projects/Stalin supported Hitler/vidSegs_tester/test.ogg"' ; Result : Error msg "Incompatible pixel format 'brga' for codec 'libtheora', autoselecting format 'yuv420p' Again, 'yuv420p' captures only a small part of the screen. Perhaps I need to specify a filter/converter? 9. Try : I'll test -ss option here. Later, try "-c:v copy" for video. host 'avconv -timelimit 10 -f pulse -f x11grab -r 20 -i :0.0 -ss 00:00:05 "/home/bill/Projects/Stalin supported Hitler/vidSegs_tester/test.ogg"' ; Result : Didn't start at beginning 5s of file. 10. Try : just use the file, not a media player! To do this, drop : -f pulse -f x11grab -i :0.0 add : -i "/media/ATA_WDC_500G/DVD_HitlerLost/VTS_01_1.VOB" host 'avconv -r 20 -i "/media/ATA_WDC_500G/DVD_HitlerLost/VTS_01_1.VOB" -ss 00:00:05 "/home/bill/Projects/Stalin supported Hitler/vidSegs_tester/test.ogg"' ; Result : Option framerate not found. (oops!) Re-try : -r 24 nyet, -r 25 not found either? take this out! Result : Stream mapping: Stream #0:0 -> #0:0 (mpeg2video -> libtheora) Stream #0:1 -> #0:1 (ac3 -> flac) Shit, I need the timelimit! host 'avconv -timelimit 10 -i "/media/ATA_WDC_500G/DVD_HitlerLost/VTS_01_1.VOB" -ss 00:00:05 "/home/bill/Projects/Stalin supported Hitler/vidSegs_tester/test.ogg"' ; Result : Video quality shitty, I don't know if I have the full picture, sound is good! 11. Try : -timelimit 40 to get a better idea if full picture there host 'avconv -timelimit 40 -i "/media/ATA_WDC_500G/DVD_HitlerLost/VTS_01_1.VOB" -ss 00:00:05 "/home/bill/Projects/Stalin supported Hitler/vidSegs_tester/test.ogg"' ; Result : AWESOME! full picture, audio Now - how do I get a better video quality? 12. Try : -qcomp 0.0 - set comptression to zero host 'avconv -timelimit 40 -qcomp 0.0 -i "/media/ATA_WDC_500G/DVD_HitlerLost/VTS_01_1.VOB" -ss 00:00:05 "/home/bill/Projects/Stalin supported Hitler/vidSegs_tester/test.ogg"' ; Result : Looks even worse Re-try : with -qcomp 1.0 Result : video quality still totally sucks! Keep it in the same format? mpeg2video yuv420p 720x480 13: Try : drop the -q option, output file extension ".VOB" host 'avconv -timelimit 40 -i "/media/ATA_WDC_500G/DVD_HitlerLost/VTS_01_1.VOB" -ss 00:00:20 "/home/bill/Projects/Stalin supported Hitler/vidSegs_tester/test.VOB"' ; Result : video picture better but nowhere near as good as original, flow is halting! Oops - the -ss option isn't working? MUST go BEFORE the "-i"! Also error msg has always been there: "[svcd @ 0x9c12560] VBV buffer size not set, muxing may fail" 14. Try : -q 2 for output streams host 'avconv -ss 00:00:20 -timelimit 40 -i "/media/ATA_WDC_500G/DVD_HitlerLost/VTS_01_1.VOB" -q 2 "/home/bill/Projects/Stalin supported Hitler/vidSegs_tester/test.VOB"' ; Result : FAR BETTER QUALITY, but halting video flow Re-try : -q 0 Result : Perhaps a bit better quality imagery, now still very halting flow. THIS is now the challenge!!! Google "avconv halting video" -> great comments in http://forums.debian.net/viewtopic.php?f=6&t=86537 15. Try : -preset slow ?I don't even know if my system has preset files for options?! - see link on previous line "VBV buffer size not set, muxing may fail" - I need to address this, but how? host 'avconv -ss 00:01:30 -timelimit 40 -i "/media/ATA_WDC_500G/DVD_HitlerLost/VTS_01_1.VOB" -preset slow -q 0 "/home/bill/Projects/Stalin supported Hitler/vidSegs_tester/test.VOB"' ; Result : error msg "Unrecognized option 'preset'" OK, screw that. Let's try to set the VBR buffer. -same_quant Use same quantizer as source (implies VBR). Note that this is NOT SAME QUALITY. host 'avconv -ss 00:01:30 -timelimit 40 -same_quant -i "/media/ATA_WDC_500G/DVD_HitlerLost/VTS_01_1.VOB" -q 0 "/home/bill/Projects/Stalin supported Hitler/vidSegs_tester/test.VOB"' ; Result : Still very halting, perhaps not quite so bad? STOP there for the day - it's 22:19 at night! #**************** # 20May2014 # 16. Try : man avconv -> -bufsize size Set video buffer verifier buffer size (in bits). example shows 1835k, I'll start with that LATER: -pass n - can do two-pass video encoding to produce video at exact bitrate (I'd have to test to see what this does) host 'avconv -ss 00:01:30 -timelimit 40 -bufsize 1835k -same_quant -i "/media/ATA_WDC_500G/DVD_HitlerLost/VTS_01_1.VOB" -q 0 "/home/bill/Projects/Stalin supported Hitler/vidSegs_tester/test.VOB"' ; Result : This did nothing to reduce the halting flow error msg: [mpeg @ 0x881eb80] max_analyze_duration reached error msg: [mpeg @ 0x881f400] VBV buffer size not set, muxing may fail ?!?!? obviously -bufsize 1835k isn't for VBV? 17. Try : remove -same_quant, add -maxrate bitrate example uses 4000k host 'avconv -ss 00:01:30 -timelimit 40 -max_bitrate 4000k -bufsize 1835k -i "/media/ATA_WDC_500G/DVD_HitlerLost/VTS_01_1.VOB" -q 0 "/home/bill/Projects/Stalin supported Hitler/vidSegs_tester/test.VOB"' ; Result : bitrate=12915.3kbits/s shown, so obviously this isn't thed rate affected by -maxrate? video is perhaps even more jerky? Re-try : maybe -maxrate 1000k would help? host 'avconv -ss 00:01:30 -timelimit 40 -maxrate 1000k -bufsize 1835k -i "/media/ATA_WDC_500G/DVD_HitlerLost/VTS_01_1.VOB" -q 0 "/home/bill/Projects/Stalin supported Hitler/vidSegs_tester/test.VOB"' ; Result : This is NO better! 18. Backgrd: series of suggestions in blog http://www.linuxquestions.org/questions/slackware-14/coverting-rmvb-to-avi-using-ffmpeg-917075/ (see /home/bill/System_maintenance/video production notes.txt) one was to adjust frame rate -r , which I tried (point 10 19May2014 above) without success Try : once more -r with 30 rather than 20, 24, 25 (given that avconv does report 29.97 fps) host 'avconv -ss 00:01:30 -timelimit 40 -maxrate 1000k -bufsize 1835k -r 30 -i "/media/ATA_WDC_500G/DVD_HitlerLost/VTS_01_1.VOB" -q 0 "/home/bill/Projects/Stalin supported Hitler/vidSegs_tester/test.VOB"' ; Result : errormsg "Option framerate not found" Re-try : -r 29.97 Result : same errormsg "Option framerate not found" 19. Backgrd: going back to blog http://www.linuxquestions.org/questions/slackware-14/coverting-rmvb-to-avi-using-ffmpeg-917075/ nothing obvious to me, I'll leave that for now get back to the error msg: [mpeg @ 0x881f400] VBV buffer size not set, muxing may fail Google this : awesome blog comment : http://lists.pdxlinux.org/pipermail/plug/2013-March/077765.html responder used : $ ffmpeg -f x11grab -b:v 500 -s vga -r 30 -i :0.0+10,50 -q:v 5 -vcodec libx264 -crf 0 -preset ultrafast -pix_fmt yuv420p screenGrab.mkv "... Quality of the capture is governed by your CPU speed and settings. Your best bet is to capture raw video and then convert to the appropriate format. avconv tries to guess based on output file extension (see -codecs and -formats). The container format will also define the codec as well as default options. For the mpeg1video codec yuv420p is the default color space pixel format. BGR is for the raw video stream. ..." Notice the "-r 30" option that I can't seem to get (?) I don't want to capture raw video - I want to process the file. Try : remove -r 29.97 I had noticed a "two-pass" option from "man avconv" : -pass n - can do two-pass video encoding to produce video at exact bitrate (I'd have to test to see what this does) example : avconv -i foo.mov -c:v libxvid -pass 1 -an -f rawvideo -y /dev/null with -passlogfile "/home/bill/Projects/Stalin supported Hitler/vidSegs_tester/av2pass" where -an (output) - Disable audio recording Let's do it - modify "fuckit" operator, for now just for the first pass ALSO "null" and "anull" options pass audio & video unchanged? Pass1 : host link 'avconv -ss 00:01:30 -timelimit 40 -maxrate 1000k -bufsize 1835k ' ' -i "/media/ATA_WDC_500G/DVD_HitlerLost/VTS_01_1.VOB" ' ' -c:v libxvid -pass 1 -passlogfile "/home/bill/Projects/Stalin supported Hitler/vidSegs_tester/av2pass" ' ' -an -f rawvideo -y /dev/null ' ; Result : errormsg "Unknown encoder 'bibxvid'" Re-try : take it out "-c:v libxvid" ' -pass 1 -passlogfile "/home/bill/Projects/Stalin supported Hitler/vidSegs_tester/av2pass" ' Result : Runs but produces empty log file (no statistics?!) Re-try : in place of "-c:v libxvid" put "-c:v mpeg2video" Result : Runs, crashes BUT produces a log file! errormsg "[mpeg2video @ 0x99ea9a0] Error, invalid timestamp=-13, last=-13" "Video encoding failed" logfile single line : "in:0 out:0 type:1 q:189 itex:37800 ptex:0 mv:0 misc:3922 fcode:1 bcode:1 mc-var:0 var:2700 icount:1350 skipcount:0 hbits:414;" What the hell do I do with this? NexStep: run with "-pass 2", audio plus video specs, minus "-c:v mpeg2video" Pass2 : host link 'avconv -ss 00:01:30 -timelimit 40 -maxrate 1000k -bufsize 1835k ' ' -i "/media/ATA_WDC_500G/DVD_HitlerLost/VTS_01_1.VOB" ' ' -pass 2 -passlogfile "/home/bill/Projects/Stalin supported Hitler/vidSegs_tester/av2pass" ' ' -q 0 "/home/bill/Projects/Stalin supported Hitler/vidSegs_tester/test.VOB" ' ; Result : errormsg "Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height" Retry : remove "-maxrate 1000k" host link 'avconv -ss 00:01:30 -timelimit 40 -bufsize 1835k ' ' -i "/media/ATA_WDC_500G/DVD_HitlerLost/VTS_01_1.VOB" ' ' -pass 2 -passlogfile "/home/bill/Projects/Stalin supported Hitler/vidSegs_tester/av2pass" ' ' -q 0 "/home/bill/Projects/Stalin supported Hitler/vidSegs_tester/test.VOB" ' ; Result : same errormsg "Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height" while video processing looks OK, audio looks strange : Input: Stream #0.1[0x80]: Audio: ac3, 48000 Hz, stereo, s16, 192 kb/s Output: Stream #0.1[0x80]: Audio: [0][0][0][0] / 0x0000, 48000 Hz, stereo, s16, 128 kb Try : from 19 further above "ALSO "null" and "anull" options pass audio & video unchanged?" but first, specify same audio codec going out "-c:a ac3" host link 'avconv -ss 00:01:30 -timelimit 40 -bufsize 1835k ' ' -i "/media/ATA_WDC_500G/DVD_HitlerLost/VTS_01_1.VOB" ' ' -pass 2 -passlogfile "/home/bill/Projects/Stalin supported Hitler/vidSegs_tester/av2pass" ' ' -q 0 -c:a ac3 "/home/bill/Projects/Stalin supported Hitler/vidSegs_tester/test.VOB" ' ; Result : SAME errormsg !!! "Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height" I might have a version of avconv that hasn't been compiled with options like "-r", but that seems unlikely. # 20May2014 12:12 Time to give up for now - just run HitlerLost with hesitant vide to get Qnial operaotrs ready for an eventual fix. Try : remove the "pass" junk and just do once-through addBack "-maxrate 1000k" host link 'avconv -ss 00:01:30 -timelimit 40 -maxrate 1000k -bufsize 1835k ' ' -i "/media/ATA_WDC_500G/DVD_HitlerLost/VTS_01_1.VOB" ' ' -q 0 -c:a ac3 "/home/bill/Projects/Stalin supported Hitler/vidSegs_tester/test.VOB" ' ; Result : SAME errormsg !!! "Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height" Retry : remove "-c:a ac3" host link 'avconv -ss 00:01:30 -timelimit 40 -maxrate 1000k -bufsize 1835k ' ' -i "/media/ATA_WDC_500G/DVD_HitlerLost/VTS_01_1.VOB" ' ' -q 0 "/home/bill/Projects/Stalin supported Hitler/vidSegs_tester/test.VOB" ' ; Result : errormsg "[ac3 @ 0x9fc7c80] frame sync error" errormsg "Error while decoding stream #0.1" Try : This must be "-maxrate 1000k" so remove it host link 'avconv -ss 00:01:30 -timelimit 40 -bufsize 1835k ' ' -i "/media/ATA_WDC_500G/DVD_HitlerLost/VTS_01_1.VOB" ' ' -q 0 "/home/bill/Projects/Stalin supported Hitler/vidSegs_tester/test.VOB" ' ; Compare to earlier versions step 16&17 above (without -same_quant -maxrate 1000k ) : host 'avconv -ss 00:01:30 -timelimit 40 -bufsize 1835k -i "/media/ATA_WDC_500G/DVD_HitlerLost/VTS_01_1.VOB" -q 0 "/home/bill/Projects/Stalin supported Hitler/vidSegs_tester/test.VOB"' ; Result : errormsg "[ac3 @ 0x9fc7c80] frame sync error" errormsg "Error while decoding stream #0.1" GOOD enough! - Just go ahead with vidExtract code modifications for HitlerLost fuckit IS { host 'sleep 5s' ; host link 'avconv -ss 00:01:30 -timelimit 40 -bufsize 1835k ' ' -i "/media/ATA_WDC_500G/DVD_HitlerLost/VTS_01_1.VOB" ' ' -q 0 "/home/bill/Projects/Stalin supported Hitler/vidSegs_tester/test.VOB" ' ; } # Leave the video-hesitation problem for a rainy day!!! #*********************************************************** 20May2014 Conversion of QNial code to use avconv instead of recordmydesktop : /home/bill/Projects/Stalin supported Hitler/0_vidExtract - common data, operators.ndf /home/bill/Projects/Stalin supported Hitler/vidSegs_HitlerLost/0_vidExtract - HitlerLost.ndf 0. Backgrnd: Initial manual code changes... 1. Try : vidExtract with test_pass Result : avconv errormsg "Unable to find a suitable output format for '' Re-try : in snip_record IS OP ts_start ts_end snip_fileName_short t_snip add "-f mp2" host link 'avconv -ss 00:01:30 -timelimit 40 -bufsize 1835k ' ' -f mp2 -i "' dir_media_in fname_video_in '" ' ' -q 0 "' dir_video_out snip_fileName '" ' ; Result : errormsg "Unknown input format 'mp2'" Of course - mp2 is a codec, not a format! WRONG - it IS a format BUT it is also a codec!?!?!?! Re-try : Just add ".ogg" to output filename and see what happens? snip_record IS OP Remove "-f mp2" snip_fileName := link vidName_prefix vidName_suffix ' ' (t_fnameFmt ts_start) '-' (t_fnameFmt ts_end) ' ' snip_fileName_short ' ' (string t_snip) 's.ogg' ; Result : OK, but video image quality sucks, apart from the hesitant motion! 2. Backgrd : the current test acts directly on the source file, "start_DVD 'VTS_01_1.VOB'" This has the potential for the highest qality, Also, VOB -> theora tanslation is crappy Try : Just add ".VOB" instead of ".ogg" to output filename Result : VASTLY better, but of course the hesitant video flow is apparent. Not really much better than my old snips? Let's go with that! Will have to revert 0_vidExtract - HitlerLost.ndf & spreadsheet to VOB-based timings OK, that was a bit of work... 3. Try : Test with pass1 Result : Works well, hesitating-video flow is very annoying, but good for a draft, timing is off - perhaps my own mistakes! Complete: Run passes 2 & 3 #**************************** 22May2014 Review of snip timing etc FIRST observation - it is the OpenShot unification that introduced the hesitant video flow to the ogg file!!! (I blamed this mistakenly on avconv! - but this too is a problem!) My timing for HitlerLost was taken from the OpenShot ogg file that had a long initial "false segment" Is this in the original VTS_01_1.VOB file as well? It's very hard to tell, but perhaps not?! 1. Try : Redo avconv extractions with "vlcDisplayTimes". Ignore "wait_recordmydesktop" issues, so ALL snips, even when they overlap, appear in the same pass, even for multiple start_DVD files! wait_recordmydesktop IS OP secs_duration { NONLOCAL t_factor_recordmydesktop_processing ; %19May2014 was secs_wait := (secs_duration * t_factor_recordmydesktop_processing) + 10 ; secs_wait := (secs_duration * t_factor_recordmydesktop_processing) ; %host (link 'sleep ' (string secs_wait) 's') ; } Result : oops - snip_record can't find the video file! Try : add 'dir_media_in' so that snip_record can find the video file! snip_record IS OP ts_start ts_end snip_fileName_short t_snip { NONLOCAL dir_media_in dir_video_out fname_video_in vidName_prefix vidName_suffix ; write 'starting snip_record' ; % ; snip_fileName := link dir_media_in vidName_prefix vidName_suffix ' ' (t_fnameFmt ts_start) '-' (t_fnameFmt ts_end) ' ' snip_fileName_short ' ' (string t_snip) 's.VOB' ; IF flag_break THEN BREAK ; ENDIF ; host link 'avconv -ss ' ts_start ' -timelimit ' t_snip ' -bufsize 1835k ' ' -i "' dir_media_in fname_video_in '" ' ' -q 0 "' dir_video_out snip_fileName '" ' ; wait_recordmydesktop t_snip ; % allow file to be created ; } Result : oops - fname_video_in is required as input filename! 2. Try : adjust snip_record code, rerun Result : HL_main1 00h00m28s-00h01m14s Why did WWII happen 45s.VOB - Good, but runs 5s too long! HL_main1 00h01m16s-00h01m36s USA view is that they won the war 20s.VOB - starts WAYY to early? (~00:00:50, not 00:01:16!) HL_main1 00h01m37s-00h01m59s Theme of this film is that Hitlers mistakes lost them the war 23s.VOB - starts at ~00:00:50 as well?!?!? Why is the start timing all screwed? Try : man avconv - -ss - perhaps put time in quotes? Result : HL_main1 00h00m28s-00h01m14s Why did WWII happen 45s.VOB - starts ~8s too early, runs 35s too long, video flow is hesitant HL_main1 00h01m16s-00h01m36s USA view is that they won the war 20s.VOB - starts ~30s too early, runs 16s too long HL_main1 00h01m37s-00h01m59s Theme of this film is that Hitlers mistakes lost them the war 23s.VOB - starts ~26s too early, ends where it should be starting, runs 20s too long twice as long as it should! HL_main2 00h05m34s-00h06m01s Milsch said to attack Britain immediately, map of plan 27s.VOB - starts ~1m30s too early, runs 20s too long HL_main2 00h06m01s-00h06m54s Hitler rejects invasion out of respect for British 53s.VOB - ???? didn't check HL_main2 00h10m59s-00h11m08s Luftwaffe nearing goal of destroying RAF, Hitler issues halt order 9s.VOB - starts ~3min too early, runs 6s too long HL_main2 00h11m09s-00h12m20s Allies had hit Berlin – in retaliation, Hitler ordered retaliatory attacks on cities 71s.VOB - ???? didn't check HL_main4 00h00m47s-00h01m32s Atomic bomb not developed 45s.VOB - ???? didn't check It appears that the t_factor_vlc of 1.374 has something to do with the delayed start, perhaps the excess length too, but onot so obvious 3. Try : Put t_factor_vlc back to 1.374, do 3 different snips to check Result : snips now seem to start at just the right time! However, they have far too great a duration! HL_main1 00h00m39s-00h01m41s Why did WWII happen 62s.VOB - good start time, duration 62s -> 01:48 too long. very halting HL_main1 00h01m45s-00h02m12s USA view is that they won the war 27s.VOB - good start time, duration 27s -> 00:46 too long. very halting HL_main1 00h02m13s-00h02m44s Theme of this film is that Hitlers mistakes lost them the war 31s.VOB - good start time, duration 31s -> 00:55 too long. very halting HL_main2 00h15m05s-00h15m18s Luftwaffe nearing goal of destroying RAF, Hitler issues halt order 12s.VOB - - good start time, duration 73s -> perhaps twice too long? very halting 4. Try : Set duration to t_delta original measured timing / t_factor_vlc? Result : getting closer - but still duration error HL_main1 00h00m39s-00h01m41s Why did WWII happen 33s.VOB - perfect start, 5s too short HL_main2 00h15m19s-00h16m57s Allies had hit Berlin – in retaliation, Hitler ordered retaliatory attacks on cities 52s.VOB - perfect start, 8s too short 5. Try : In the spreadsheet 0_vidExtract - HitlerLost.ods, sheet "HitlerLost", column t_duration, add the multiplicative factor t_factor_duration as per : =IF(ISNUMBER(J24),(AO24-AM24)*24*3600/t_factor_VLC*t_factor_duration,"") Result : seems pretty good (not perfect, but good enough for now) HL_main2 00h08m17s-00h09m29s Hitler rejects invasion out of respect for British 44s.VOB Conclusion - time-tweaking should be done in the qnial data file "0_vidExtract - HitlerLost.ndf", and NOT the spreadsheet "0_vidExtract - HitlerLost.ods" #******************************************* 22May2014 Great Battles of WWII - snip chase 1. Setup : fix up sub-directories, /home/bill/Projects/Stalin supported Hitler/vidSegs_GBattles_WWII/disc_1/ 0_vidExtract - GBattles_WWII_disc_1.ndf - clean up (not much change) 0_vidExtract - GBattlesWWII_disc_1.ods - add t_factor_duration Try : test snip % DVDfile 1 ; vidName_suffix := '_main1' ; set_t_offset_DVDfile '00:00:00' ; start_DVD 'VTS_01_1.VOB' ; snip_record '00:00:10' '00:00:20' 'tester snip' 10 ; stop_DVD ; Result : start (00:00:10 -> , duration (10s -> 58s), all crazy!?!?! no sound? For HitlerLost Output : encoder Lavf53.21.1 Stream #0:0 -> #0:0: Video: mpeg2video, yuv420p, 720x480 [PAR 8:9 DAR 4:3], q=2-31, 200 kb/s, 90k, 59.94 tbc Stream #0:1 -> #0.1: Audio: mp2, 48000 Hz, stereo, s16, 128 kb/s For GBattles Output : encoder Lavf53.21.1 Stream #0:0 -> #0:0: Video: mpeg2video, yuv420p, 720x480 [PAR 8:9 DAR 4:3], q=2-31, 200 kb/s, 90k, 29.97 tbc MISSING!!! Stream #0:1 -> #0.1: Audio: mp2, 48000 Hz, stereo, s16, 128 kb/s Interesting, why the change? as avconv call is same in "snip_record IS OP ts_start ts_end snip_fileName_short t_snip" 2. Try : add in snip_record '00:00:23' '00:01:09' 'Air bombing of London & other British cities, why did it peter out' 46 ; Result : VTS_01_1.VOB - 00:23 on bottom left shows 53s on video slider button at the point where the vsnip should start, still "displaced" snip_record '00:00:10' '00:00:20' 'tester snip' 10 ; shows 02:15 duration now, versus 58s last time. Why? can I set a negative set_t_offset_DVDfile '00:00:00' ; ?? 3. Try : Instead of -ss with a time like '00:00:10' in avconv, try a seconds specification cmd := link 'avconv -ss "' ts_start '" -timelimit ' (string t_snip) ' -bufsize 1835k ' ' -i "' dir_media_in fname_video_in '" ' ' -q 0 "' dir_video_out snip_fileName '" ' ; becomes cmd := link 'avconv -ss ' (string sec_from_time ts_start) ' -timelimit ' (string t_snip) ' -bufsize 1835k ' ' -i "' dir_media_in fname_video_in '" ' ' -q 0 "' dir_video_out snip_fileName '" ' ; Result : same problems, no sound (I will address sound later) duration of 59s instead of 10s for GB1_main1 00h00m10s-00h00m20s tester snip 10s.VOB duration of 02:14 instead of 46s for GB1_main1 00h00m23s-00h01m09s Air bombing of London & other British cities, why did it peter out 46s.VOB 4. Try : man avconv -> -ss - When used as an output option (before an output filename), decodes but discards input until the timestamps reach position. This is slower, but more accurate. cmd := link 'avconv -timelimit ' (string t_snip) ' -bufsize 1835k ' ' -i "' dir_media_in fname_video_in '" ' ' -ss ' (string sec_from_time ts_start) ' -q 0 "' dir_video_out snip_fileName '" ' ; Result : same problems, no sound (I will address sound later) Wait a minute, did the "recordmydesktop" approach work in the past? 5. Try : Switch back to a "recordmydesktop" approach - by : commenting out avconv code (# 22May2014 avconv version) commenting in recordmydesktop code (# 20May2014 rmd version) clearws and re-loaddefs Result : alsamixer & PulseAudio aren't called? Re-Try : correct rmd-based code Result : rmd saves only a second or two of the snip (as was the problem a few days ago) Time to quit for today!! #******************************** 23May2014 I copied a vidCam recording of disc_1 over to secondary drive : /media/ATA_WDC_500G/DVD_GreatBattles_WWII/vidCam_1/ Adjusted code in 6. Try : Junk run to wee all the glitches Result : vlc window opened in the wrong place - did't move or re-size huge number of rmd errors : Shutting down..[0xb5100d68] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow?) [h264 @ 0xb51b9feo] mmco: unref short failure x Error: BadAccess (attempt to access private resource denied) Bad Access on XGrabKey. Shortcut already assigned. I do have a loop to re-check, where is it? start_PulseAudio - WHILE loops for PID_pulse and WID_pavuc Work : fix start_2ndDrive -> to give proper error if /media/ATA_WDC_500G/ isn't mounted! that took time! hopefully start_2ndDrive will work from now on I put a generic version "HDdrive_mountCheck" into "Start tools.ndf" vlc window position & size : media_in_start -> WID_windw := readfile fin ; returns "?eof" so there hasn't been enough time to get the WID_windw, or there are multiples z_WID_windw.txt -> is empty (I am renaming that to WID_vid to reduce amibuity) 7. Try : run vidExtract again, to try and see if WID_vlc works or has multiple entruies, and to use terminal to determin WID_rmd Result : now vlc window repositions and sizes as needed - but I don't know why it worked this time? PID_recMyDsk = 2546, so that's OK "WID_recMyDsk" can't find rmd with xdotool search recordmydesktop -> weird message after "starting recrd_start, and the sleep msg : "Your window manager appears to be KWin" clearly this is wrong! But why? maybe signals are being mis-directed? NOTE: recrd_kill : SIGTERM -15 sent to PID_recMyDsk 2546 host (link 'kill -15 ' PID_recMyDsk) ; % normally SIGTERM 15, SIGINT = 2 to interrupt ; I had this in twice! So I removed the second line! 8. Try : Retry and see.... Result : Still -> rmd doesn't close until vlc does (?) -> only 25% en coded, vidfile doesn't work Screwed still - try the vidCam file! (NYET - I AM using the vidCam file!!) 9. Try : dir_media_in /media/ATA_WDC_500G/DVD_GreatBattles_WWII/disc_1/ start_DVD 'VTS_01_1.VOB' ; Result : Usual problem - rmd only closes after vlc, output file only 23% ??? After SIGTERM : Cached 0 MB, from 359 MB that were received. Average cache compression ratio: 99.7 % Saved 297 frames in a total to 297 requests Shutting down Obviously the cache compression ratio is crap (although most video was zombie pictures - but vidCam doesn't have that Why doesn't rmd start output immediately after SIGTERM, why does it ONLY close after vlc (It didn't do that in the past when this worked) Work : Look at older vidExtract files again. 30Apr2014 0_vidExtract - Soviet Story snippets compare to ndf Suvorov 140430 compare.odt 10. Try : recrd_kill : commented out "%host 'sleep 2s' ; " +-----+ host link 'recordmydesktop -x ' x ' -y ' y ' --width ' width ' --height ' height ' --v_quality 63 --v_bitrate 2000000 --fps 30 ' ' --buffer-size 65538 --freq 48000 ' ' -o "' fpName '" & ' ; +-----+ change to : host link 'recordmydesktop -x ' x ' -y ' y ' --width ' width ' --height ' height ' -o "' fpName '" & ' ; +-----+ Result : No difference in result - same rmd doesn't close until vlc, 27% output Interesting that "Cached 0 MB, from 199 MB that were received." 11. Try : Do manual Ctrl-C in rmd window to end it? Result : Ctrl-C brings up vlc window - doesn't get to rmd At this point, I'm totally lost and frustrated - rmd worked beautifully before, and now it doesn't. I'll go back to the SovietStory, but with today's vidExtract, to see if it still works. 12. Try : profile.ndf - set f:= SovietStory Result : It works perfectly!!!???!!! Output is ogv format - SS_main1 00h00m09s-00h00m19s tester 10s.ogv 13. Try : Try ogv format output with GreatBattles t_factor_recordmydesktop_processing := 1 Result : got up to 57% processing output IS ".ogv" format 14. Try : t_factor_recordmydesktop_processing := 0 Result : got up to 99% processing!!! WOW! not enough, but getting closer! 15. Try : wait_recordmydesktop - comment out %IF flag_rmd THEN host (link 'sleep ' (string secs_wait) 's') ; %ENDIF ; Result : 100% processed, but only 150 kbyte file - which doesn't run 16. Try : test on vidCam instead of original files Result : 98% encoded, 1.2 Mbyte ogv file but it doesn't run... 17. Try : Put back specs I used in point #10 above, but with a 200 Mbyte buffer? +-----+ host 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 '" & ' ; +-----+ Result : Screwed up - vlc closed, but rmd persisted a bit, only 42% encoded, 1.4 Mb ARRRGH!! 18. Try : Use avconv on vidCam files? flag_rmd := o ; in /home/bill/Projects/Stalin supported Hitler/vidSegs_GBattles_WWII_disc_1/0_vidExtract - GBattles_WWII_disc_1.ndf Result : empty output file! 19. Try : ".MTS" output format recrd_start : "snip_fileName := link snip_fileName '.MTS' ; " Result : MTS output not supported (avconv -formats) Re-Try : "snip_fileName := link snip_fileName '.ogg' ; " Result : 3,5 kb no apparent processing 20. Try : Goofle "avconv MTS format" +-----+ http://ubuntuforums.org/showthread.php?t=2005963 copy input videos with filename extension ".mkv" +-----+ Result : Nyet +-----+ http://wenchaojames.wordpress.com/2013/01/03/convert-video-format-mts-to-mp4-in-ubuntu/ avconv -i input.mts -strict experimental output.mp4 +-----+ Result : mp4 conversion works, 1/4 the size of the original, not such great quality Re-Try : avconv -i input.mts -strict experimental output.ogg - Wow! This would take 3.9/0.06 * 4 hrs = 62 hrs! Now try vidExtract avconv-based on th small part-file -> it was Killed! ??? Conclusion : ogg format is much better quality than mp3, but frankly I can't spend forever on this. 21. Try : vidExtract on 00007.mp4 Result : small 148 Mb kb file (didn't really work) Re-Try : 30s vidExtract Result : still limited to 148 kb? i.e. doesn't work Re-Try : input 00007.mp4 -> output mp4 format by adding "-strict experimental" +-----+ cmd := link 'avconv -timelimit ' (string t_snip) ' -bufsize 1835k ' ' -i "' dir_media_in fname_video_in '" ' ' -ss ' (string sec_from_time ts_start) ' -q 12 -strict experimental "' dir_video_out snip_fileName '" ' ; +-----+ Result : 5.8Mb file output, only 3s??? Re-Try : change -q 0 to -q 12 Result : 2.9 Mb output, only 3s of video? (oops - I didn't change t_snip from 10 to 30!) Re-Try : start after opening spreen, t_snip corrected to 30s : snip_record '00:00:30' '00:01:00' 'tester snip' 30 ; Result : 9.3 Mb out, 9s duration? -> there seems to be a mistake in the duration, may have to bump 22. Try : Low-quality (-q 12, mp4) output, do normal example, but triple duration Result : 56.2 Mb out, 01:09 duration OK - However, "lead time for vidCam" must be added 23. Try : BUT try MTS -> mp4 just in case I can use the original video file Result : 36.7Mb, 41s SHIT! I forgot to change dirmedia_in!!! Re-Try : correct directory, start_DVD 'VTS_01_4.VOB' ; Result : 57.7Mb, 06:56 duration (instead of intended 46s, and the stated 138s) - oops I had VTS_01_4.VOB not VTS_01_1.VOB Re-Try : 87.1Mb, no sound?!? 10min duration Why did sound crap out?!?!??! However, video movement is smooth - not hesitatation cycles! 24. Try : adjusted start time, original duration - modified 0_vidExtract - GBattlesWWII_disc_1.ods to handle pre-start times snip_record '00:00:46' '00:01:32' 'Air bombing of London & other British cities, why did it peter out' 46 ; Result : 25.0Mb, 03:10 duration (vs 46s), NO SOUND!?!?! Foreget the VOB original file direct route! Go back to the vidCam MTS!!! 25. Try : Find t_prelim vidCam (time of running before target video started) = Result : SHIT!!! I recorded the wrong disk!! Must vidCam the other two discs!!! xx. Try : Result : Work : enddoc