Skip to first unread message

Alex Traylor

unread,
May 9, 2019, 8:05:45 AM5/9/19
to MIT App Inventor Forum
I would like to be able to save a video clip to my device's internal storage after it is taken by a camcorder object. I've combed Google for hours and tried to jerry-rig something that would work with no avail. Does anyone have any experience with this? 

Taifun

unread,
May 9, 2019, 8:20:21 AM5/9/19
to MIT App Inventor Forum
the camcorder component stores the clip automatically to the inernal storage
use Do it or a label to display the path to the file

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

Taifun

Trying to push the limits of App Inventor! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun. 


Alex Traylor

unread,
May 9, 2019, 8:57:21 AM5/9/19
to mitappinv...@googlegroups.com
Okay, that is excellent news indeed. I'm not quite sure which block I need to use the Do It and/or Label with to find the file path of the video. Find below the logic related to my camcorder. Along with the rest of the actions in Camcorder1.AfterRecording, I would like the recording to be moved/copied to a specific directory.

Capture.PNG


Taifun

unread,
May 9, 2019, 10:14:40 AM5/9/19
to MIT App Inventor Forum
I would like the recording to be moved/copied to a specific directory.
use the file extension 
https://puravidaapps.com/file.php

Taifun

Alex Traylor

unread,
May 9, 2019, 10:19:16 AM5/9/19
to mitappinv...@googlegroups.com
Alright, that solves half of my issue. Now how do I go about finding the file path of the recorded clip?

TimAI2

unread,
May 9, 2019, 10:25:59 AM5/9/19
to MIT App Inventor Forum
run the app in companion mode, record a video, then right click on the "get clip" block and select Do It
or set "get clip" to a label, this will show the relative file path.

You may find you need to create the full file path for moving/copying/renaming (file:///mnt/sdcard......) but this is often device dependent

Alex Traylor

unread,
May 10, 2019, 10:47:21 AM5/10/19
to MIT App Inventor Forum
Okay, here's what I've tried:

Capture1.PNG

Capture2.PNG



Here has been the result for both:

Screenshot_20190510-103407.jpeg


What am I missing?

TimAI2

unread,
May 10, 2019, 11:27:58 AM5/10/19
to MIT App Inventor Forum
Probably the content uri returned by "clip"
Use the block in Taifun's extension to convert to a filename

Like this (these blocks work / tested in Companion):

blocksrenamevideo.png


Alex Traylor

unread,
May 10, 2019, 11:46:18 AM5/10/19
to MIT App Inventor Forum
Works perfectly! Thank you both so much.

TimAI2

unread,
May 10, 2019, 12:16:44 PM5/10/19
to MIT App Inventor Forum
and using MoveAsync

blocksrenamevideowithmove.png


Reply all
Reply to author
Forward
0 new messages