How to downloads video file with https using ffmpeg - android-ffmpeg

How to using FFmpeg download a video file with https.
I have using FFmpeg on Android to download a video file with https. But can't download. because of FFmpeg doesn't support https.
ffmpeg -i https://example.com/video.mp4 -c copy b.mp4
Logs
ffmpeg version 3.2.9 Copyright (c) 2000-2017 the FFmpeg developers configuration:
libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
https protocol not found, recompile FFmpeg with openssl, gnutls or securetransport enabled.

Related

how to enable libx264 for ffmpeg on macos

I am running a code that runs ffmpeg and breaks down because of libx264 with the following error:
Unknown encoder 'libx264'
File "/anaconda3/lib/python3.6/site-packages/imageio/plugins/ffmpeg.py", line 661, in _append_data
self._proc.stdin.write(im.tostring())
BrokenPipeError: [Errno 32] Broken pipe
So I upgrade ffmpeg to the latest and see that libx264 is installed as shown: Using Brew on MacOs
==> Pouring x264-r3027_1.high_sierra.bottle.tar.gz
/usr/local/Cellar/x264/r3027_1: 11 files, 5.5MB
But when I do
ffmpeg encoders | grep 264
I get --disable-libx264 on the last line:
ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers
built with clang version 4.0.1 (tags/RELEASE_401/final)
configuration: --prefix=/anaconda3 --cc=x86_64-apple-darwin13.4.0-clang --disable-doc --enable-shared --enable-static
--enable-zlib --enable-pic --enable-gpl
--enable-version3 --disable-nonfree --enable-hardcoded-tables --enable-avresample --enable-libfreetype --disable-openssl --disable-gnutls --enable-libvpx --enable-pthreads --enable-libopus --enable-postproc --disable-libx264
Seems like I have to change --disable-libx264 to --enable-libx264 but not sure where and how it is done. Could not find it under /anaconda3 since: --prefix=/anaconda3
If you install x264 and ffmpeg using Conda, you need today (might change in the future) to specify the versions to install. For instance, this combination works fine for me:
$ conda install -c conda-forge x264=='1!161.3030' ffmpeg=4.3.2
If I now run the command ffmpeg, I can see that I have the flag --enable-libx264. The full output is:
$ ffmpeg
ffmpeg version 4.3.2 Copyright (c) 2000-2021 the FFmpeg developers
built with clang version 11.1.0
configuration: --prefix=/Users/vincent/opt/anaconda3/envs/test2 --cc=x86_64-apple-darwin13.4.0-clang --disable-doc --disable-openssl --enable-avresample --enable-gnutls --enable-gpl --enable-hardcoded-tables --enable-libfreetype --enable-libopenh264 --enable-libx264 --enable-pic --enable-pthreads --enable-shared --enable-static --enable-version3 --enable-zlib --enable-libmp3lame --pkg-config=/Users/runner/miniforge3/conda-bld/ffmpeg_1627813741069/_build_env/bin/pkg-config
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
I guess the problem comes from the version of ffmpeg installed by default today (when this post was written). Indeed, if in a newly created virtual environment I install x264 and ffmpeg without specifying the versions to use, I get x264 1!161.3030 and ffmpeg 4.0. Using a newer version of ffmpeg seems to solve the problem.
The idea is to use compatible package versions. To create the installation line I propose above, I simply specified the latest versions available on conda-forge of both x264 and ffmpeg package. To get the list of available Conda packages for x264 and ffmpeg, simply use:
conda search -c conda-forge -f x264
conda search -c conda-forge -f ffmpeg
I removed Brew and instead ran conda install ffmpeg and it is enabled there.

Unable to use concat in stripped down version of ffmpeg

I have compiled ffmpeg for my android app to have only essential components. I have enabled following components.
--disable-everything \
--enable-demuxer=concat \
--enable-muxer=concat,mp4 \
--enable-protocol=file,subfile \
--enable-filter=amix,adelay,volume \
But when I am trying to concatenate mp4 files using following command
ffmpeg -y -f concat -safe 0 -i files.txt -c copy output.mp4
I am receiving following error
[concat # 0x7bd7d14400] Impossible to open 'file1.mp4'
files.txt: Invalid data found when processing input
Here is complete ffmpeg output for reference
Command execution failed with rc=1 and the output below.
Command execution failed ffmpeg version v4.3-dev-2955 Copyright (c) 2000-2020 the FFmpeg developers
built with Android (6454773 based on r365631c2) clang version 9.0.8 (https://android.googlesource.com/toolchain/llvm-project 98c855489587874b2a325e7a516b99d838599c6f) (based on LLVM 9.0.8svn)
configuration: --cross-prefix=aarch64-linux-android- --sysroot=/home/amit/Android/Sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/sysroot --prefix=/home/amit/work/mobile-ffmpeg/prebuilt/android-arm64/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=aarch64 --cpu=armv8-a --cc=aarch64-linux-android21-clang --cxx=aarch64-linux-android21-clang++ --target-os=android --enable-neon --enable-asm --enable-inline-asm --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --enable-shared --enable-v4l2-m2m --disable-outdev=fbdev --disable-indev=fbdev --disable-openssl --disable-xmm-clobber-test --enable-debug --disable-neon-clobber-test --disable-programs --disable-postproc --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --disable-sndio --disable-schannel --disable-securetransport --disable-xlib --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --disable-videotoolbox --d libavutil 56. 42.102 / 56. 42.102
libavcodec 58. 78.102 / 58. 78.102
libavformat 58. 42.100 / 58. 42.100
libavdevice 58. 9.103 / 58. 9.103
libavfilter 7. 77.101 / 7. 77.101
libswscale 5. 6.101 / 5. 6.101
libswresample 3. 6.100 / 3. 6.100
[concat # 0x7bd7d14400] Impossible to open 'absolute path here/1.mp4'
absolute path here/files.txt: Invalid data found when processing input
Command execution 7
Exact same command works when I compile complete ffmpeg. What components I might be missing for getting this error? Help is appreciated.

rtsp server using ffmpeg c code

I am using ffmpeg lib:
ffmpeg version git-2017-09-16-08ec828
Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
configuration: --enable-pic --enable-shared --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-postproc --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree
libavutil 55. 75.100 / 55. 75.100
libavcodec 57.106.101 / 57.106.101
libavformat 57. 82.100 / 57. 82.100
libavdevice 57. 8.101 / 57. 8.101
libavfilter 6.105.100 / 6.105.100
libswscale 4. 7.103 / 4. 7.103
libswresample 2. 8.100 / 2. 8.100
libpostproc 54. 6.100 / 54. 6.100
Hyper fast Audio and Video encoder
I am trying to write an RTSP server using the above version of ffmpeg libs. I have tried a large variety of approachess with no success. Has anyone already written such code with this ffmpeg version or does anyone know of such code? Or, do I need to change versions? Any suggestions or answers are welcome.

FFMPEG installed but not found

I'm trying to install pHash , but when I execute ./configure this message is returned:
...
*** Configuring video Hash ***
checking whether FFmpeg is present... checking for avcodec_alloc_frame in -lavcodec... no
configure: error:
*** libavcodec not found.
You need FFmpeg. Get it at <http://ffmpeg.org/>
But FFMPEG is correctly installed, in fact executing ffmpeg it returns:
ffmpeg version 3.0.2 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.1)
configuration:
libavutil 55. 17.103 / 55. 17.103
libavcodec 57. 24.102 / 57. 24.102
libavformat 57. 25.100 / 57. 25.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 31.100 / 6. 31.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
Use -h to get full help or, even better, run 'man ffmpeg'
Why this happens?
Unfortunately, I didn't solve the problem on Ubuntu 15. I installed Ubuntu 16 (which include FFMPEG again) and everything went fine.

Error in FFMpeg and png images (glob/libavformat) [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I'm trying to use FFMpeg to produce an animation based on several png images
that don't follow a sequence number. With
the following command line
ffmpeg -f image2 -r 1 -pattern_type glob -i '*.png' -c:v libx264 mov.mp4
I obtain the following error
ffmpeg version N-53033-g56ba331 Copyright (c) 2000-2013 the FFmpeg developers
built on May 13 2013 22:18:29 with gcc 4.7.3 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
--enable-gnutls --enable-iconv --enable-libass --enable-libbluray
--enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc
--enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libopenjpeg --enable-libopus --enable-librtmp
--enable-libschroedinger --enable-libsoxr --enable-libspeex
--enable-libtheora --enable-libtwolame --enable-libvo-aacenc
--enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264
--enable-libxavs --enable-libxvid --enable-zlib
libavutil 52. 31.100 / 52. 31.100
libavcodec 55. 9.100 / 55. 9.100
libavformat 55. 7.100 / 55. 7.100
libavdevice 55. 0.100 / 55. 0.100
libavfilter 3. 65.100 / 3. 65.100
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 3.100 / 52. 3.100
[image2 # 0268b600] Pattern type 'glob' was selected but globbing is not
supported by this libavformat build
'*.png': Function not implemented
I am working on Windows 7.
As you
can see here,
for globbing to work you need glob.h.
From my quick looking MinGW-w64 does not contain this file, so you would need to use a Cygwin compiler. However this might not be desirable because the resulting FFmpeg would require the Cygwin dll.

Resources