I'm trying to use ffmpeg command to create a time-lapse from a bunch of images in a folder. The images are named in the format -
folder_number;timestamp.jpg
eg,
0;1423116000.jpg
0;1423137600.jpg
I run the following command,
ffmpeg -i %*.jpg -q:v 2 output.mpeg
the video is getting formed but it is a 30seconds video with only the first image in the folder.
I only assume the regex i'm using - %*.jpg is wrong. Please help.
ps: I'm newbie to ffmpeg
I used the command
ffmpeg -f image2 -i 0;%*.jpg -q:v 2 output.mpeg
This did not work.
Renamed the files to have an underscore instead of semicolon.
Used the same command
ffmpeg -f image2 -i 0_%*.jpg -q:v 2 output.mpeg
Worked.
Related
I have a list of youtube urls.
The list is stored in a batch-file.txt
I would like to download each URL and rename with a given name.m4a
batch-file.txt
youtube-dl -f 'bestaudio[ext=m4a]' 'https://www.youtube.com/watch?v= ...' --output '...m4a'
youtube-dl -f 'bestaudio[ext=m4a]' 'https://www.youtube.com/watch?v= ...' --output '...m4a'
youtube-dl -f 'bestaudio[ext=m4a]' 'https://www.youtube.com/watch?v= ...' --output '...m4a'
If I run the commands individually, it works.
If I run the batch file via
youtube-dl --batch-file='batch-file.txt'
it does not work.
What do I need to write in the batch-txt file?
How do I call the batch file to download the m4a files simultaneously (if possible)
Many Thanks,
BM
Batch file contains only the URLs, no other parameters.
batch-file.txt
https://www.youtube.com/watch?v=...
https://www.youtube.com/watch?v=...
.
Here is the line to run the youtube-dl command starting with leading number 1
youtube-dl -ciw -f 'bestaudio[ext=m4a]' --batch-file='batch-file.txt' -o '%(autonumber)02d. %(title)s.%(ext)s'
Here is the line to run the youtube-dl command starting with leading number 35 (in case you want to continue at another time)
youtube-dl -ciw -f 'bestaudio[ext=m4a]' --batch-file='batch-file.txt' -o '%(autonumber)02d. %(title)s.%(ext)s' --autonumber-start 35
Missing part:
Parallel / Simultaneous Download. But I can live with the approach above.
I am trying to start mjpg-streamer from a python script on the raspberry pi. The instructions for how to start it from the command line are here and consist of running
export LD_LIBRARY_PATH=. ./mjpg_streamer -o "output_http.so -w ./www"
-i "input_raspicam.so"
from /var/www/mjpg-streamer/mjpg-streamer-experimental. When I do it in the terminal, it works fine.
However, I am trying to run it using subprocess.call like this:
subprocess.call('export LD_LIBRARY_PATH=.', shell=True, cwd='/var/www/mjpg-streamer/mjpg-streamer-experimental')
subprocess.call('./mjpg_streamer -o "output_http.so -w ./www" -i "input_raspicam.so -x 640 -y 480 -fps 15 -vf -hf"', shell=True, cwd='/var/www/mjpg-streamer/mjpg-streamer-experimental')
And that is giving me the error:
MJPG Streamer Version: svn rev: ERROR: could not find input plugin
Perhaps you want to adjust the search path with:
# export LD_LIBRARY_PATH=/path/to/plugin/folder
dlopen: input_raspicam.so: cannot open shared object file: No such file or directory
I'm guessing it is because the first command doesn't provide the relevant link to the plugin? I'm not entirely sure of how these commands work anyway, so any insight into that would also be helpful!
I have also tried using os.system to run these commands and have received the same error.
I'm sure I'm doing something silly, so thanks in advance for your patience!
I'm having trouble running gdal2tiles.py through a command line. I followed instructions on installing gdal from http://cartometric.com/blog/2011/10/17/install-gdal-on-windows/ I then verified through command prompt that gdal was installed by typing in gdalinfo --version, and the correct version came up which means that my path and variables are set.
So when I try to run this:
gdal2tiles.py -p raster -z 0-6 test.jpg abc
I keep getting an error that says "error: No input file was specified" and
"Usage: gdal2tiles.py [options] input_file(s) [output]"
I am able to run other gdal commands and they work just fine. I've also tried to run
gdal2tiles.py test.jpg
and this gives the same error.
I'm pretty sure I have the right formatting so if anyone has any suggestions or might have a solution to this please let me know. Thanks
In command prompt just type in:
python gdal2tiles.py -p raster -z 0-6 test.jpg abc
That corrected the problem for me.
Can we use 'streamio-ffmpeg gem' for extracting mp3 songs metadata(sample rate, duration etc) and write changed metadata back to mp3 file, if so than how to do that, please recommend some tutorials and codes ??
system("ffmpeg -i input_file -acodec mp3 -f mp3 -y output.mp3")
above command directly returns you output.mp3 file with only audio.
tested with ffmpeg version N-68500-g3ba1050
In our application we allow user to upload audio file. currently we support .wav format and we use "sox" to convert the .wav file to gsm for asterisk. We would like to have mp3 support as well. Any recommendation on how to get this done ?
Your help is highly appreciated. Thanks you.
Surely you can still use sox to convert mp3 to gsm/sln/alaw/ulaw format files
Look at http://sox.sourceforge.net/soxformat.html for more info on formats sox support
Here is alot of info about asterisk file conversion.
http://www.voip-info.org/wiki/view/Asterisk+sound+files
And for sure you can use asterisk(if it compiled with mp3 support)
asterisk -rx "file convert filename.mp3 filename.gsm"
If you want convert using sox, you have recompile sox with libmad support. Here is script:
cd /usr/src/
wget -c "http://downloads.sourceforge.net/mad/libmad-0.15.1b.tar.gz?modtime=1076976000&big_mirror=0"
wget -c 'http://downloads.sourceforge.net/mad/libid3tag-0.15.1b.tar.gz?modtime=1076976000&big_mirror=0'
wget -c "http://sourceforge.net/projects/sox/files/sox/14.3.2/sox-14.3.2.tar.gz/download"
wget -c http://downloads.sourceforge.net/project/lame/lame/3.98.4/lame-3.98.4.tar.gz
wget -c "http://downloads.sourceforge.net/mad/madplay-0.15.2b.tar.gz?modtime=1077580800&big_mirror=0"
CPU=4
for i in libid3tag libmad madplay lame sox
do
cd /usr/src/
tar -xzf $i-*.gz
cd /usr/src/$i*
./configure;
make -j $CPU
make install
done;
echo /usr/local/lib/ >>/etc/ld.so.conf
ldconfig
sox
ln -s /usr/local/bin/sox /usr/bin/sox
I used a software called "switch" from NCH Software and work very well to GSM conversion and with Elastix PBX. The only problem is on Elastix GUI the upload that dont work on System Records, so I had to upload using SCP aka SFTP over SSH.
http://www.nch.com.au/switch/
Solution 1:-
localhost*CLI> help file convert
Usage: file convert
Convert from file_in to file_out. If an absolute path is not given, the
default Asterisk sounds directory will be used.
Example:
file convert tt-monkeys.gsm tt-monkeys.ulaw
Solution 2:- There are some online tool available which can work for you.
https://convertio.co/
It can convert your file in almost 20 formats. e.g gsm, wav, cdma,wma etc.