Trixology

WeatherCat => WeatherCat Feature Requests => Topic started by: xairbusdriver on November 06, 2015, 09:47:35 PM

Title: Video formats
Post by: xairbusdriver on November 06, 2015, 09:47:35 PM
Since Apple seems to be the only one still "supporting" the .mov format (container), is there any chance of offering one or more of the newer video formats (WebM, OGG, MP4)? Of course, browser developers ar not helping with some opting for proprietary formats instead of open-source... It seems that even W3C has all but given up on finding consensus (https://en.wikipedia.org/wiki/HTML5_video#Table)!
Quote
It would be helpful for interoperability if all browsers could support the same codecs. However, there are no known codecs that satisfy all the current players: we need a codec that is known to not require per-unit or per-distributor licensing, that is compatible with the open source development model, that is of sufficient quality as to be usable, and that is not an additional submarine patent risk for large companies. This is an ongoing issue and this section will be updated once more information is available.[emphasis added]
It bothers me that the 'compatibility' table in the linked page groups Apple with a couple of other not too user-friendly companies: Google/Mozilla and Microsoft! I suppose it's more important to the smaller players to 'play nice' with different formats than those who have trouble keeping up with where all their cash is hidden... [rolleyes2]

From my limited understanding, the problem is not the actually video data but the 'container' it comes in. There are some apps (some even free) that can convert a QuickTime .mov into many different formats. Some of them may even be usable with an AppleScript. Our weather apps present a rather busy and automated set of conditions that will probably considered a 'fringe need'.

OTOH, I'm hoping that some future version of WC will make use of one or more of the open-source codecs and that one or more of those different formats will be a simple checkbox section in the prefs! [cheer]
Title: Video formats aren't "open." (Re: Video formats)
Post by: elagache on November 06, 2015, 11:17:19 PM
Dear X-Air and WeatherCat movie buffs,

It's been a long time since I've looked into this, but last time I checked, there wasn't anything like a "PNG" format for video that was completely open-source.  All the JPEG based video formats are actually owned I believe by Thompson's in France.  Even if there is an open source format, I assume you cannot get the code to convert from a propriety format into that open-source format.

When I looked for free converters, these were few and far between.  I think developers have to pay something and so they have charge you in order to survive.

So the video mess . . . is likely to remain that way for a while.

Cheers, Edouard
Title: Re: Video formats
Post by: xairbusdriver on November 07, 2015, 05:33:40 PM
Some converter devs offer free versions that usually have fewer options than the paid version. I've recently tested a couple: <Easy HTML5 Video (http://easyhtml5video.com)> and <Miro Video Converter (http://www.mirovideoconverter.com)>

These two are almost the extreme opposites in interface design! [rolleyes2] I think the folks at Easy HTML5 Video intentionally added "Easy" to the name in an attempt to convince themselves and any user that it is 'easy'. [lol] It can FTP the output files to your site. However, it took me several hours of trying different settings to finally get that to happen. I was never sure until I accidentally found the files some days later. [banghead] At least in the free version, one must go through almost all the settings every time another format/file is needed. I have no idea if it has any AppleScript 'handles'. One example of the interface gave me many second thoughts about the qualifications of the dev(s): the "Start" button text is white on a nearly white background! I actually only found it by moving the cursor over everything on the window! When I moved the cursor over the button, the text color changed to black, thus becoming visible. I now have a new interface design concept: HGUI = Hidden Graphical User Interface. [banghead] I've already deleted this app. It did offer OGG, MP4, WebM formats, some in lower quality versions. Reformatting a file can use all the output formats in one operation, one IN, many formats OUT.

Miro Video Converter is about as simple as things can get. A single window with an area to drag a file (with the option to use the OS's navigation dialog window). Once a file is selected (multiple input files can be selected), four buttons are made available. Three are for specific hardware (Apple, Android, other). The fourth button offers choices for Audio, Video, Ingest, and Same). Once those choices are made, the "Covert to [chosen format]" button is enabled. Therefore, multiple formats will require multiple runs, usually just another choice in the Format button list. One or more IN, one format OUT. There are no FTP options, nor can one assign a specific location for the saved files. A minimalist design, but absolutely free; there is no 'upgrade/paid' version. They make their profits on other video products (Amara [a video editor], Miro 6 [audio/video player]).

I know here are many conflicts, complaints, gnashing-of-teeth about H.264. I recommend the Video - Dive Into HTML5 (http://diveintohtml5.info/video.html) article for some well presented (patented info highlighted) info on formats and codecs.

My main concern is that anyone viewing my sire can view everything, on any browser, on any widely available hardware, without having to install extensions or even have javascript, Java, or Flash enabled, much less available. While Apple still uses QuickTime, a movie/video download from iTunes will be in a different container (MP4). Fewer and fewer browsers support .mov containers.

Your fears of patents/licensing/ownership first made me think of the attempts by Unisys (the remains Burroughs Corp (https://en.wikipedia.org/wiki/Burroughs_Corporation), for whom my Father worked for 30+ years and saw the birth of what is now the ubiquitous machine we all use daily) to claim royalties for users of .gif files. However, the .jpeg story is very well documented in an article in Wikipedia (https://en.wikipedia.org/wiki/JPEG). Apparently the patent "Infringement" division of "Ambulance Chasers, Inc" is constantly gaining in members. [rolleyes2]
Title: Re: Video formats
Post by: Bull Winkus on November 08, 2015, 01:35:59 AM
I use a few video & audio converters, though not that often. So, every time I use any of them I have to re-familiarize myself with the controls and idiosyncrasies.

FLV Crunch (http://www.macupdate.com/app/mac/43682/flv-crunch) - Takes in FLV and outputs to many formats. Bulk processing to specified folder. Drag n drop.

Adapter - https://www.macroplant.com/adapter/

SoundConverter - http://www.dekorte.com/projects/shareware/SoundConverter/

Audacity - http://audacityteam.org

Sound Studio - I still use Sound Studio 3. It is in version 4 now. - http://felttip.com/ss/

Wave Pad - http://www.nch.com.au/wavepad/

I also use Handbrake, if I need to rip from DVD.

 [cheers1]
Title: Re: Video formats
Post by: WCDev on November 08, 2015, 10:04:45 AM
WeatherCat is always going to output a QuickTime movie as it uses a bunch of QuickTime functions to create it, so converting it to another format is always going to be a post processing step.

Perhaps a callout from WeatherCat when it knows the movie is complete to run your own script (which could convert and upload it) would be useful?
Title: Re: Video formats
Post by: xairbusdriver on November 08, 2015, 02:48:35 PM
Quote
Perhaps a callout from WeatherCat when it knows the movie is complete to run your own script (which could convert and upload it) would be useful?
I think that would be helpful. My alternative thought was a "folder action". Never used one, have no idea how long Apple might still have that capability. I'm sure something like AppleScript could even be used to schedule and probably move the completed WC video out of the current location which would then prevent its uploading. Perhaps one of the 'template' experts could create a php script to take the current .mov file and run it through a converter. Perhaps that could even run on the local machine since we all already have php installed. Perhaps some other dev could write a native app to do the same thing. Perhaps... I need somethng else to keep me busy! [blush] [wink]

The uncertainly of what Apple may do is my main concern for the continued use of the 'mov' container. I think they have made a commitment to H.264 for financial reasons, but are talking only about the quality as a diversion. They may just be waiting (supporting?) the development of html5 to handle any format. They have certainly made it clear that QuickTime (.mov) will not be an on-going priority. It wouldn't be the first time they have gone with better but costlier technology only to see the rest of the industry virtually (no pun intended) ignore it. [rolleyes2]
Title: Re: Video formats
Post by: xairbusdriver on November 08, 2015, 07:57:08 PM
More memories! I used Sound Studio for over a dozen years to record the services/meetings at my last church! Had it running on the mini that now runs WC. Used a Mac because it was so simple and reliable for a guy who had never touched a computer! We had a small board and fed all outputs (usually fewer than 5 or 6, but sometimes more then 12! ) into 4 channels that then fed only the left/right outputs that SS recorded. I always dreamed of have a pre-fader output for every channel that would go to a separate board! With more than 4 channels the 'air space' over the board got pretty congested with four hands trying to make on-the-fly adjustments! [lol] :o :P

My memory also failed me when you mentioned Handbrake! I'd have to play with that for a few hours to re-aquaint myself with what seemed a very complicated app. But it might be the best to try to automate. [computer]
Title: Re: Video formats
Post by: xairbusdriver on June 16, 2016, 04:18:20 AM
The 'shoe' is un-tied. It may drop this fall. See this <Webkit (https://webkit.org/blog/6589/next-steps-for-legacy-plug-ins/)> support page. QuickTime will still work... for now. But the viewer will need be faced with a dialog which creates additional steps they may not want to take or understand. Safari can be set to use the legacy plugin "forever", but it actually defaults back to throwing up the dialog if the site hasn't been visited in ~30 days.

So, anyone know of any format changing apps? Preferably free ones! I'm not sure Safari even supports anything except MP4, but others formats are Ogg and WebM. I contacted one app but they admitted that their app won't run automatically, however, an AppleScript might enable that (as long as AS is still around!). There's a fairly new HTML5 page that lists some format converters, I'll check into those tomorrow.
Title: Re: Video formats
Post by: Bull Winkus on June 16, 2016, 05:07:34 AM
I have not done any conversions lately. I used to play around with a few programs, but my experience is probably obsolete.

You might check out Prism, however. (http://www.nchsoftware.com/prism/index.html) It is not free. It's $49.95, but you can download and try it before you make the monetary commitment.

EDIT:
If you're just wanting to convert Flash, I used to use flv Crunch for that and it worked every time. However, I see the software has been updated to "convert between numerous files such as FLV, MPEG, MP3, AIFF and much more."

Read more: http://mac.softpedia.com/get/Video/Flv-Crunch.shtml#ixzz4BiHkVrNF

 [cheers1]
Title: Re: Video formats
Post by: xairbusdriver on June 16, 2016, 04:52:37 PM
Have no need to convert Flash, it's the .mov files that come from WC that I'll need to convert. I've emailed the makers of "WonderFox HD Video Converter Factory Pro" about any abilities for its running automatically/scheduled. I suppose a Daemon could be configured to start/stop the app. But the app is probably not "smart" enough to find the file, even though it is always the same name and in the same place. [banghead]

It's "on sale" for 30 bucks ("Act now! Not Available in Stores!"). I'll check your link also.
Title: Re: Video formats
Post by: Bull Winkus on June 16, 2016, 07:24:02 PM
Try downloading (FREE) FlvCrunch, (or is it Flv Crunch), and read the Change Log. Better yet. Here it is:

Flv Crunch Change Log

1.5.1 (1-19-2014)
Fixed a bug that causes the selected sampling rate to change when simply opening the preferences.
Fixed a bug that caused the selected sampling rate to change after a conversion.
Fixed a bug that prevented m4v files from being added to the file list.

1.5.0 (1-16-2012)
Added the option to pause conversions.
Added the option to skip conversions.
Added the option to shut down the computer after a conversion finished.
Added the option to put the computer to sleep after a conversion finished.
Added the option to quit the application after a conversion had finished.
Added the option to display a dialog notifying the user after a conversion had finished.
Added the option to make the application play an alert sound after a conversion had finished.
Added the option to make the application's icon bounce in the dock after a conversion had finished.
Added the option to reduce CPU time to the conversion engine during a conversion.
Changed the File menu's "Open Error Log" item to "Open Log".
Added the option to print the conversion engine's messages by using the File menu's "Print Engine Messages" item.
Added the ability to remove files from the file list by using the keyboard's delete button.
Fixed a problem with conversions failing because the user attempted to start converting seconds after the program started.
Added the ability to use ffmpeg-0.5 on Mac OS 10.1 to 10.3! Be able to convert some of the newest videos on older versions of the Mac OS!
Added the ability to use ffmpeg-0.5 (x86 version) on Mac OS 10.4 running on an x86 processor (huge speed up).
Disabled the Test button in the preferences when a test was taking place.
Added the ability to select the text in the Additional Commands window.
Removed the resize handle from the Additional Commands window.
Improved support for unicode characters in file names.
Fixed a problem with 5.1 surround sound files not converting with formats that use the MP3 audio codec.
FIxed a problem with 5.1 surround sound files not converting with the WMV format.

1.4.1 (7-20-2011)
Fixed a problem with unicode characters in the file name that prevented Flv Crunch from converting the file.
Fixed a problem with the menu items' size being a slightly smaller size than normal.

1.4 (5-24-2011)
Included information in the documentation on how to rip videos from YouTube using Safari.
Removed Spanish and French language support.
Fixed a problem with ffmpeg-0.5 that prevented it from running on a G3 processor.
Fixed a problem with ffmpeg-12000 that prevented it from running on a G3 processor.
Fixed a bug that caused Flv Crunch to crash when converting a vob file.
Added support for aiff encoding and decoding.
Added mkv encoding support.
Added feature that allows user to send additional commands to ffmpeg.
Fixed a bug that prevented the settings in the preferences to return to their original values when the cancel button was pushed.
Changed mpeg format to use the vcd specifications -- allows seeking to work on Quicktime.
Added a feature that prints each message ffmpeg outputs during a conversion.
Added the ability to add and remove files from the file list during a conversion.
Added "No Change" menu item under the Quality menu -- keeps video at same quality as original.
High, medium, and low menu items in Quality menu now convert video to a specified quantizer range rather than a specified value.
Removed several Sampling Rate menu items.
Set audio bitrate for most formats to 128kb/s - improves audio quality.
Added a feature that verifies if you want to quit Flv Crunch during a conversion.
Changed program icon - Thank you Ben Rhea.
Eliminated printing of messages about the NSDocumentController.
Fixed problem with unusual characters in file path.
Eliminated timebase error.

1.3.1 (1-12-2010)
Fixed a problem with calculating video dimensions (occurs when the "Same Aspect Ratio" feature is active).
Added close button in upper left hand corner.
Fixed a problem that caused the program to ask about where the destination folder is when it was already known.
Translated an error message about the engine into Spanish and French.
Made the Set button on the Spanish interface the default button for that window.
Added a system that determines if the engine has timed out after the Test button has been pushed.
Fixed a bug that allowed the user to change the engine version while an engine test was taking place.
Fixed a problem that would cause ffmpeg-0.5 to crash on Mac OS 10.4 on an x86 based Mac.
Fixed a bug that caused the video to be created at the wrong resolution when cropping feature was activated.

1.3 (11-5-2009)
Added system that adjusts number of sounds channels when needed.
Added ability to make Flash files.
Preference with default save location, default format, and engine version options added.
Added ability for recognition of files dragged on Flv Crunch's icon in the dock.
Translated program into Spanish and French.
Added Volume control.
Added user changeable sampling rate control.
Added support for decoding of MKV files.
Added support for decoding of MKA files.
Added ability to select multiple files in the file list.
Updated engine on PowerPC to version 0.5. 
Fixed WMV conversion to use wmav2 audio codec - allows playback on Windows Media Player 9 and above.

1.2    (6-17-2009)
Added feature to crop video files.
Added feature to only use certain time intervals in a file.
Added newer version of FFmpeg.
Added standard and high definition resolutions support.
Removed 'wide screen tv' resolution.
Added feature that preserves aspect ratio.
x86 native (faster on newer Macintosh systems).
Added feature that tells user how many files are in the file list.
Fixed open file problem.
Fixed memory leaks that would cause problems for Flv Crunch when the number of files in the file list reached over 200 files.
Fix bug that would select 'iPod' in the resolution group after a conversion had completed.
Changed maximum number of files that can be added to the file list to 500.

1.1   (5-8-2009)
Added Windows Media Player media support.
Added RealPlayer media support (converting from RealPlayer file only).
Added Digital Video support.
Added AAC support.
Added sampling rate system.
Used more recent version of FFmpeg.

1.0.2    (3-17-2009)
Added feature that creates an unique file name for the user.

1.0.1   (3-11-2009)
Fixed aac codec decoding problem.
Added information about program statistics in help file.

1.0   Initial release  (2-27-2009)

 [cheers1]
Title: Re: Video formats
Post by: xairbusdriver on July 09, 2017, 11:40:57 PM
I downloaded and 'played' with the latest version of Prism... after checking that the dev/app has been removed from most malware site lists. :) It's quite expensive for the job, however, and it would appear I would still need to write a script of some sort to get WC to upload the video. It may be possible to simply get the output to always have the same name and just over-write the old file. 8)

Handbrake is still being supported and is free. However, it has the same concerns as Prism.

I did find a less expensive app ($15 US) that has what appears to be a "Folder Action" built in. The app is Smart Converter Pro 2 and the folder function is called Folder Monitoring (to avoid legal troubles, no doubt). However, it does not seem to work in the 'Demo' mode of the app. I've emailed the dev asking for more details or explanations. It has a much simplified GUI, that hides almost all the details. Instead of setting a video format, one selects the iDevice or "Windows", "Android", "Samsung", "Sony", etc. and a couple of audio formats. All the converted files seem to be ".mpg4" and only rarely is the file size different, so I assume there is little choice about frame rate. The dimensions remain the same as the original, there is no option to make a 1080 x 720 into a smaller one. All my use has been in the 'demo' mode, some of these results may change in the paid/registered version.
Title: Re: Video formats
Post by: xairbusdriver on July 11, 2017, 05:07:23 PM
I'm one step closer to getting the outstanding WC time-lapse ".mov" file converted to an ".mpg4" and uploaded. The Smart Converter Pro 2 app seems to be working. Need to test it for the rest of the day to be sure, it seemed to stop yesterday. [banghead]

Some details I need to work on:
I think I can 'encourage' WC to simply upload the vid every 60 minutes by pointing to the file name as an "Additional Files" entry. The only problem is that I have no way to ask/tell WC when to do that. I assume (as dangerous as that may be!) that the 'timer', for any item in the "Additional Files" list, starts when one completes/edits an entry for that item. Perhaps they all start again when the last entry/edit is made? I'll check The Manual! [lol]
Title: Might be easier in UNIX shell scripting (Re: Video formats)
Post by: elagache on July 11, 2017, 11:06:15 PM
Dear X-Air and WeatherCat "tinkerers,"

Some details I need to work on:
  • Automatically change the name of the converted file to a 'generic' name like WC does for the hourly vids. I think that should be relatively simple with AppleScript. I'm thinking just (a) delete the previous vid and (b) remove the "_Hr_Mn" part of the new one.
  • Delete the accumulation of the converted files in the destination folder. This may not even be necessary because they should simply get over-written in the same way as they do in ~/Library/Application Support/WeatherCatMedia/Movies/Today

This suggestion may be more of a hindrance than assistance, but for what it's worth.  For this sort of a task, it might be easier to write a small script in a UNIX shell script like bash.  Of course this requires learning how to do this in said language if you don't know already and odds are that's more trouble than it is worth.  Still, just in case . . . . . .

Cheers, Edouard
Title: Re: Video formats
Post by: xairbusdriver on July 12, 2017, 03:35:50 AM
I think this script can be expanded to do the trick.
Code: [Select]
tell application "Finder"
set filename to name of (thisFile as alias)
set filename to (do shell script "echo " & quoted form of filename & " | sed 's/^[0-9_-]*//'")
set name of thisFile to filename
end tell
Need to learn more about the "echo" command. Using the 'alias' name is supposed to work around the differences between how the OS and AS handle file paths. I had an Automator Folder Action that worked a few times, but I need it to work slightly more reliably than that! [rolleyes2]

There are some AS's that are made for doing this basic function on file names for iTunes. One is 2 bucks a couple are free. All are more robust, as far as what they can change/delete, than I need. They could also be seeds for what seems to me to be a quite simple, straight forward task; remove exactly 6 characters (4 integers and 2 underscores) from exactly the same place in the file name. [banghead]

BTW, the converter app has worked continuously and correctly for 12 hours. [cheer]
Title: Need to tweak the 'sed' string (Re: Video formats)
Post by: elagache on July 12, 2017, 11:55:20 PM
Dear X-Air and WeatherCat explorers of the wild world UNIX utilities

I think this script can be expanded to do the trick.
Code: [Select]
tell application "Finder"
set filename to name of (thisFile as alias)
set filename to (do shell script "echo " & quoted form of filename & " | sed 's/^[0-9_-]*//'")
set name of thisFile to filename
end tell

That isn't going to do exactly what you want for reasons I'll explain in a minute.

Need to learn more about the "echo" command.

echo does what it says, it echoes back the string that has been given to it to "standard out" (in the UNIX lingo.)  Here is the man page if you are curious:

https://ss64.com/osx/echo.html (https://ss64.com/osx/echo.html)

Some details I need to work on:
  • Automatically change the name of the converted file to a 'generic' name like WC does for the hourly vids. I think that should be relatively simple with AppleScript. I'm thinking just (a) delete the previous vid and (b) remove the "_Hr_Mn" part of the new one.

The sed command that you have is removing numbers underscores from the front of the string, instead of the back.  So it won't do what you want.

sed is an extremely complex program.  Here is the man page for it:

https://ss64.com/osx/sed.html (https://ss64.com/osx/sed.html)

My UNIX shell use is very rusty but with a some searching on the web this seems to work for what you want:

Code: [Select]
tell application "Finder"
set filename to name of (thisFile as alias)
set filename to (do shell script "echo " & quoted form of filename & " | sed 's/[0-9_-]*$//'")
set name of thisFile to filename
end tell

Do let us know if this finally accomplishes your objectives!

Cheers, Edouard  [cheers1]

Title: Re: Video formats
Post by: Blicj11 on July 13, 2017, 12:49:41 AM
I think I can 'encourage' WC to simply upload the vid every 60 minutes by pointing to the file name as an "Additional Files" entry. The only problem is that I have no way to ask/tell WC when to do that. I assume (as dangerous as that may be!) that the 'timer', for any item in the "Additional Files" list, starts when one completes/edits an entry for that item. Perhaps they all start again when the last entry/edit is made? I'll check The Manual! [lol]

Additional Files is for uploading files that have to be updated more often than the interval you have set in Main files. If you set an interval in Additional longer than than the one you have in Main, it will ignore the longer one. However, I think that assumes that all of these various files to be uploaded are in the "upload" directory. I've never tried to upload a file from some other folder in the Additional Files. Let us know if this works.
Title: Re: Video formats
Post by: xairbusdriver on July 13, 2017, 05:17:22 PM
It's been another very busy day, kept me away from the computer too much! I was about half through 'composing' this and now see that another post got ahead of me. First things first...  :)

Edouard,
I'm aware of what the AS is doing, but it should be simple to delete the underscores and numbers anywhere in the name/text. The script should be simpler since the name/text is always the same length and the part I want to delete is always in the same place. ;)

Blick,
Thanks for pointing the limitation of what WC uploads. At least I know it won't be an "Additional file", DOH!! The converter app can place the file anywhere I choose, but I'll have to review The Manual to confirm that WC could upload it at all. I already did an SFTP upload of a file with Automator...  :)

The converter app has been running for about 36 hours without a problem. I am too busy today to do any testing, but will see what happens with a Folder Action that simply uploads when 'seeing' a new addition to a folder. I hope it simply looking for the OS Event and not be 'confused' that one file is replacing another one (from 24 hours ago). If that simple task can be done, I can just SFTP the file and change the name on the server with php. As a matter of fact, since php is already installed in OS X/10, I could just use it on the file on the mini! It has PHP 5.5.38 installed 10.11.6 while I have 5.6.30 with macOS 10.12.5
Title: The sed command works on command line (Re: Video formats)
Post by: elagache on July 13, 2017, 11:53:16 PM
Dear X-Air, Blick, and WeatherCat tinkerers,

Edouard,
I'm aware of what the AS is doing, but it should be simple to delete the underscores and numbers anywhere in the name/text. The script should be simpler since the name/text is always the same length and the part I want to delete is always in the same place. ;)

I tested the sed command that I gave you on a UNIX command line and it removed the trailing part of the filename as you were seeking.  So with any luck at all, I've solved that problem and you should be good to go with respect to getting the filename without the hour and minute stamp.

Cheers, Edouard
Title: Re: Video formats
Post by: xairbusdriver on July 21, 2017, 08:57:33 PM
I was browsing through my files on my weather site space and noticed a collection of video's. They were all uploaded just a short time before I saw them. My first thought was, "Why are they here?" My second was, "How did they get here?"

A couple of days this week, I also got an email from WC warning that things were falling off the FTP train. "Files are being generated faster than they can be uploaded..." I didn't think much of those warnings until I saw those fairly large video files (24 on each upload!).

Even though I have a certificate claiming I have a degree in Accounting, I hadn't been able to put two and two together until seeing the extra files and the warnings.

While I can't use the "Additional Files" function to upload these vids, one can, even if accidentally, upload just about anything one might want by simply putting them in a certain folder. My WC prefs/On-Line->Main->Set HTML Source is a particular folder on the mac mini. I'm sure everyone else, with a website, has a similar path there. The fact is, that folder is exactly where I had told the converter app to place its converted QuickTime movies! WC then, dutifully Uploaded the html files, text, php AND the MP4 files for me.

I changed the settings in the video converter app as that's just wasting bandwidth and storage space plus adding to the workload of WC. I have just verified what is probably in The Manual about this behavior. I created three useless little files, placed them in the WC Prefs specified folder and saw them uploaded to my web space in a few minutes. Those 24 video files were uploading every two minutes, in my case. No wonder WC was complaining about its FTP workload! cmu:-) Sorry, Cat, it's my fault! [blush]
Title: Oops! (Re: Video formats)
Post by: elagache on July 21, 2017, 11:50:55 PM
Dear X-Air and WeatherCat tinkerers who occasionally tinker too much!  :-[

Those 24 video files were uploading every two minutes, in my case. No wonder WC was complaining about its FTP workload! cmu:-) Sorry, Cat, it's my fault! [blush]

Yup, that certainly could be a reason why WeatherCat would be in an FTP overdrive condition!

Glad you finally got to the root of the cause!

Cheers, Edouard
Title: Re: Video formats
Post by: xairbusdriver on July 31, 2017, 04:06:57 AM
OK, we have an app that can convert the .mov files to .mp4. It has crashed twice, however, in the ~2 weeks it's been running. I've actually seen an AS that uses functions already in the OS to do this, need further study/investigation.

I have an Automator script that renames the .mp4 files and uploads them to my web space. It then moves that file to the Trash.

The last problem is emptying the Trash. Lots of ways to do that, of course, but Apple wants to protect simple-minded users (like me) from deleting anything without verifying that's really what they want to do. So, all the methods I know of, at least in Terminal, require the users password. You can set the "sudo" time-out to be just about any value you want (default is 5 minutes). Leaving your computer that way also leaves it almost wide open for hackers! Right now, I'm thinking I'll simply let the Trash get as full as I can stand it and then manually empty the Trash. [banghead] ...unless someone knows of a way to get around the password requirement somehow...
Title: File ownership? (Re: Video formats)
Post by: elagache on July 31, 2017, 10:24:00 PM
Dear X-Air and WeatherCat tinkerers,

The last problem is emptying the Trash. Lots of ways to do that, of course, but Apple wants to protect simple-minded users (like me) from deleting anything without verifying that's really what they want to do. So, all the methods I know of, at least in Terminal, require the users password. You can set the "sudo" time-out to be just about any value you want (default is 5 minutes).

You shouldn't need to use sudo to delete the file.  These files should be owned by you and therefore at least on the terminal a standard UNIX rm command should work without the sudo.  Try running this command on one of your files that you trying to delete:

ls -l

Then paste the output for us to look at.

Cheers, Edouard
Title: Re: Video formats
Post by: xairbusdriver on August 01, 2017, 02:46:19 AM
Quote
Try running this command on one of your files that you trying to delete:

ls -l
"ls" simply lists the files in any directory, it doesn't 'act' on a file.

After "cd"ing to .Trash, "ls" and "ls -1" do the same basic thing; they list all the files in that directory. the -1 just puts each file/directory on a single line so they are easier to see.

To delete anything the "rm" command is needed. (rm - remove files or directories) As in "rm WeatherCatConvertedMovie.mp4"

By George/Edouard, it does work! I was using an rm command that was needed to delete a "stuck" file; one that Finder refused to delete/empty from Trash.

Thanks for pointing out the obvious! [banghead] I'll edit the Automator workflow/app ASAP! [tup]

Changed the last step from "Move Finder Items to Trash" to "Run Shell Script". That script is:
Code: [Select]
rm /Users/myname/Pictures/WC_TimeLapse/WeatherCatConvertedMovie.mp4I think that is specific enough to not accidentally wipe the drive! [lol]

later...

Worked once in a row! [cheer] We'll see how it does over-night... the way I used to work! ThU32:-)
Title: Re: Video formats
Post by: xairbusdriver on August 01, 2017, 10:01:37 PM
Almost works. There was a problem last night after the 11pm vid was uploaded. The Automator app/workflow seems to either work or stop. Unfortunately, the error log is empty. I suspect it may have something to do with the last WC video of the day taking longer than others to get rendered. I've changed the launchd plist to only run from 6:05 am through 10:05 pm. We'll see how it goes tonight.

I'm using Launch Control.app to create the launchd plist files. When I discovered that one can specify the various times a daemon should run, I was faced with creating ~18 unique settings. Fortunately, Launch Control anticipated this and allows one to enter these settings in the format cron uses and then it generates the multiple entries required by launchd! Great app! ThU5:-)

I don't see any methods in Automator for any kind of error checking. I think that is more flexible in AS with its "try" function which can switch between (at least) two options if/when a problem arises. Is that correct?
Title: Wrong command line option. (Re: Video formats)
Post by: elagache on August 01, 2017, 10:45:06 PM
Dear X-Air and WeatherCat Mac users who have to play UNIX once in a while,

Quote
Try running this command on one of your files that you trying to delete:

ls -l
"ls" simply lists the files in any directory, it doesn't 'act' on a file.

Sorry, not ls -1 but ls -l .  The command line argument is a low-case 'L' (because of course those clever UNIX devils use the upper-case for something else.  The abbreviation is for long listing.  It will display information like file ownership.  Here is an example on my computer:

Code: [Select]
Odysseus:~ elagache$ ls -l Dropbox/Three\ cars\ at\ Orinda\ Motors/
total 52680
-rw-------@ 1 elagache  staff  5720599 Apr  3 11:25 Coquette and Cadette - front.JPG
-rw-------@ 1 elagache  staff  7322494 Apr  3 11:26 Coquette and Cadette - rear.JPG
-rw-------@ 1 elagache  staff  6538927 Apr  3 11:44 Three cars at Orinda Motors - back.JPG
-rw-------@ 1 elagache  staff  7382372 Apr  3 11:44 Three cars at Orinda Motors - side.JPG
Odysseus:~ elagache$

Glad that you are closing in solving your problem.  Perhaps you won't need this after all.  Still, it is a very useful command to be aware of.

Cheers, Edouard
Title: Re: Video formats
Post by: xairbusdriver on August 01, 2017, 11:46:45 PM
The font that displays here may be controlled by the users settings. That's why it's good to use the "code" tags to display things like ... uhmn ... code! You can see the difference when you used the "code" tags and the lowercase "L" looks much different than a one "1".
Code: [Select]
lowercase "l" looks much different than a one "1"
I've added the mp4 vid to my "Webcam" page and I must say it is amazing how much faster it displays, even without the "poster" attribute! One reason is that it i/5 th the size of the .mov version (3.0MB vs. 15.4). Of course, it's probably has a much smaller resolution... It's also supported in every modern browser without any plugin.

Still, it would be great to have a 'converter' app that was reliable, not to mention my launchd 'creations' having some kind of error handling. [computer]

Is that kind of error handling possible in AS, perhaps when a "try" fails? ???
Title: Re: Video formats
Post by: xairbusdriver on August 10, 2017, 11:35:10 PM
I think I have found a solution to the intermittent converter app crashing. I created a daemon that Quits the app and then reopens it a few minutes later. If it was a memory leak, I think that allows its memory blocks to be purged. That daemon (and the app) has been running for almost a week now without any crashes.

I also created a daemon that stops converting and uploading videos created after 10 pm until 6 am local. The black and white videos (IR) may be interesting to possibly capture a raccoon, but even then, only if it happens to be in view when the 'every two minute' jpeg is captured. Perhaps I need a small sign asking critters to stand/sit in a certain spot for at least two and a half minutes to assure a good image... and even then, I'll only capture critters that can read... in the dark!

I discovered another reason for using mp4 vids; they automatically allow "Picture-in-a-Picture" as well as Airplay! I can right now view the video while typing this.
Title: Congratulations! (Re: Video formats)
Post by: elagache on August 10, 2017, 11:52:02 PM
Dear X-Air and WeatherCat "tinkerers,"

Congratulations on finally coming up with a solution that pleases you!  ThU32:-)  This is something I thought of doing in much the manner you have done.  Alas, these days I just don't have the free time for this sort of tinkering.

Cheers, Edouard  [cheers1]