ffmpeg: Remove audio from nested folders filled with videos without renaming - ffmpeg

I have a dataset that is filled with videos, only the visual component of the videos is useful to me so I would like remove the audio data to save space and hopefully improve load times. How can I accomplish this with ffmpeg? Furthuremore, the file names must be kept the same. The dataset is ucf101 and is formated in 101 sub-folders full of .avi videos ~7gb. I would like to use windows 10 cmd.

Related

How to extract Geolocation metadata from an Apple Live Photo?

I'm trying to organize my photo collection and convert .mov files to .jpeg files while retaining all of the meta data that has been stored. I'm running into a problem with Apple's "Live Photos" though...
I recently downloaded all of the photos from my iCloud account and found that many have been stored as .mov files as "Live Photos". As I only want to include photos in this collection, I'd like to convert all of these .mov files to .jpg files.
So... I'm trying to use python and shell commands to do this. Here's an extract of my code:
# Convert the .mov file into a series of jpegs using ffmpeg
os.system(f'ffmpeg -i {movie} -r {numFrames} -map_metadata 0 -movflags use_metadata_tags {imageRoot}_%0004d.jpg')
# ... some code to find the best slice of the movie to keep as an image ...
# Add any meta tags that may have been missed
os.system(f'exiftool -tagsFromFile {movie} {image}"
Unfortunately, the Geolocation metadata isn't being copied from the .mov file to the .jpg files. exiftool {movie}.mov doesn't list any GPS or Geolocation tags either, but I know that this data is included somewhere within the file as Apple is able to map the location that the 2 second video was taken. Any thoughts as to how I can extract this meta data from Apple's Live Photo .mov clips?
Thanks in advance.
PP
think I found it. The latitude and longitude are there, but then I have to convert that to a City, State,and Country using geopy. Seems to work now

Streaming video playlist from collection of identical mp4 files

I am looking for a way to play/stream to browser tag a list of mp4 files (same size, bitrate, etc) without hickups in between the files. I am hoping the following approach would work:
* convert mp4 files to m4s/m4v files
* generate MPEG-Dash MPD file (xml)
* stream MPD to dash player in browser
Is this in any way possible? I am aware the m4s/m4v files need special headers and an entry file must be made somehow, and there you have my roadblock.
Bottom-line is I want to avoid to concatenate the separate videos into one big video file and avoid the hick-ups you see when sequencing via a straightforward 'ended-event' way in JS.
Any suggestion much appreciated!
If you want a basic client side solution you can use two separate players or video tags in your web page, showing one and hiding the other.
The one that is visible plays the current video.
The other player loads starts and immediately pauses the next video.
When the first video ends, you hide that player and make the other one visible, un-pausing the video at the same time.
You then preload the next video into the original player and continue.
This technique is used successfully in some sites where ad breaks are mixed with the main video, as an example.

Edit m4s files video

In my application i'm saving my video files in M4S format.
I want to make an editing option for these files, my requirements are adding text and images at specific point of a video.
My first thought was to generate photo for text inserting (using jimp) which is very easy.
Now my goal is to make a single photo as a m4s file. preferably i would like to choose my own name for that file.
How can i achieve that?
The flow should be:
image.jpg -> 5.m4s
m4s files do not contain the metadata that allow to play it (also called segment initialization) so they are not independent.
You can try this:
Merge the m4s files to one mp4 file.
Do simple image overlay (with your text image) to step 1 output file.
Split again the output file of step 2 to m4s files.

FFmpeg image sequence to video with variable image durations

I have been looking for a way to convert a sequence of PNGs to a video. There are ways to do that using the CONCAT function within FFmpeg and using a script.
The problem is that I want to show certain images longer than others. And I need it to be accurate. I can set a duration (in seconds) in the script file. But I need it to be frame-accurate. So far I have not been successful.
This is what I want to make:
Quicktime video with transparancy (Prores4444 or other codec that supports transparancy + alpha channel)
25fps
This is what I have: [ TimecodeIn - TimecodeOut in destination video ]
img001.png [0:00:05:10 - 0:00:07:24]
img002.png [0:00:09:02 - 0:00:12:11]
img003.png [0:00:15:00 - 0:00:17:20]
...
img120.png [0:17:03:11 - 0:17:07:01]
Of course this is not the format of the script file. Just an idea about what kind of data I am dealing with. The PNG-imagefiles are subtitles I generate elsewhere in my application. I would like to be able to export the subtitles as a transparent movie that I can easily import in my video editing software.
I also have been thinking of using blank transparent images I will use as spacers, between the actual subtitle images.
After looking around I think this might help:
On the FFMPEG site they explain about making a timed slideshow
In the Concat demuxer section they talk about making a slideshow, based on a text file, with references to the image files and the duration of the image.
So, I create all the PNG images I need. These images have the subtitle text. Each image holds one subtitle page.
For the moments I want to hide the subtitle, I use a blank PNG.
I generate a text file as explained on the FFMPEG website.
This text file will reference to all the PNGs. For the duration I just calculate the outcue - incue. Easy... I think...

Script to make movie from images

Hello I want a script or a way to make a video from images. I have a folder with a lot of pictures named randomly like "flowers.jpg", "tree.jpg", etc.
I also have an "intro.jpg" photo which I want to add at the start of every video.
What I want exactly is to create a video (any format, .avi etc) for a custom duration with only two photos like this:
intro.jpg (10-20 seconds or how much i want) + tree.jpg (1 hour or how much i want)
intro.jpg + flowers.jpg
...
and so on.
Sorry for being a newbie, but I have no clue how to accomplish this.
The easiest way might be to use a free online creation tool. You can just upload you photos and specify the duration. You can also add audio and transitions.
My daughter uses Animoto
https://animoto.com/
or you could try this.
https://www.wevideo.com/
If you just want to make the video locally it is easy in Adobe Premiere, iMovie, Sony Vegas or any number of easy to use programs with free version or free trials.
By script do you mean code and if so under what environment? You can use FFMpeg which is open source and command line and execute from code.
FFmpeg create video from images
If you want guidance in building the FFMpeg script or just want to use ffmpeg locally try a GUI for ffmpeg such as
http://www.free-codecs.com/download/ffmpegGUI.htm

Resources