
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (21)
-
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 is the first MediaSPIP stable release.
Its official release date is June 21, 2013 and is announced here.
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)
Sur d’autres sites (5614)
-
Transcoding hevc to h264 using GPU and scale_npp
19 mai 2022, par JanZgI am trying to transcode hevc to h264 using GPU. Default input is 10 bit hevc but I also try it on 8 bit hevc. I use hevc_cuvid decoder and h264_nvenc encoder. While scaling using CPU its correct. I was also using scale_npp=w=1280:h=720:format=yuv420p and scale_cuda - > no result.


Working command without using GPU to scale :


/usr/local/bin/ffmpeg -y -v warning -c:v hevc_cuvid -an -sn -dn -reconnect_at_eof 1 -reconnect_streamed 1 -reconnect_on_network_error 1 -i http://1.2.3.4:8794 -c:v h264_nvenc -pix_fmt yuv420p -vf scale=1280:720 test_hevc.mp4



But when I try to scale using GPU for example scale_cuda or scale_npp I get this error :


Command :


/usr/local/bin/ffmpeg -y -v warning -c:v hevc_cuvid -an -sn -dn -reconnect_at_eof 1 -reconnect_streamed 1 -reconnect_on_network_error 1 -i http://1.2.3.4:8794 -c:v h264_nvenc -pix_fmt yuv420p -vf scale_npp=1280:720 test_hevc.mp4



Outputs :


Error output with trace log level


[graph 0 input from stream 0:0 @ 0x56164efb6b40] w:3840 h:2160 pixfmt:p010le tb:1/90000 fr:50/1 sar:1/1
[format @ 0x56164efb7940] Setting ‘pix_fmts’ to value ‘yuv420p’
[auto_scale_0 @ 0x56164efb9940] w:iw h:ih flags:’’ interl:0
[Parsed_scale_npp_0 @ 0x56164efb58c0] auto-inserting filter ‘auto_scale_0’ between the filter ‘graph 0 input from stream 0:0’ and the filter ‘Parsed_scale_npp_0’
Impossible to convert between the formats supported by the filter ‘graph 0 input from stream 0:0’ and the filter ‘auto_scale_0’
Error reinitializing filters!
Failed to inject frame into filter network: Function not implemented
Error while processing the decoded data for stream #0:0
[AVIOContext @ 0x56164ea41300] Statistics: 0 seeks, 0 writeouts
[AVIOContext @ 0x56164ea39c80] Statistics: 15357720 bytes read, 0 seeks
[AVHWDeviceContext @ 0x56164ea68480] Calling cu->cuCtxDestroy(hwctx->cuda_ctx)
Conversion failed!



Full output with warning log level


[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[mpegts @ 0x555bd6e85dc0] Could not find codec parameters for stream 0 (Video: hevc (HEVC / 0x43564548), none): unspecified size
Consider increasing the value for the ‘analyzeduration’ (0) and ‘probesize’ (5000000) options
[NULL @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 66 times
Impossible to convert between the formats supported by the filter ‘graph 0 input from stream 0:0’ and the filter ‘auto_scale_0’
Error reinitializing filters!
Failed to inject frame into filter network: Function not implemented
Error while processing the decoded data for stream #0:0

Additional informations:

My FFmpeg Version below:

ffmpeg version N-103630-g06de593303 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 8 (Debian 8.3.0-6)
configuration: --prefix=/usr/local --enable-libtwolame --enable-libzvbi --enable-nonfree --enable-cuda-nvcc --nvccflags=’-gencode arch=compute_75,code=sm_75 -O2’ --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64
libavutil 57. 5.100 / 57. 5.100
libavcodec 59. 7.103 / 59. 7.103
libavformat 59. 5.100 / 59. 5.100
libavdevice 59. 0.101 / 59. 0.101
libavfilter 8. 9.100 / 8. 9.100
libswscale 6. 1.100 / 6. 1.100
libswresample 4. 0.100 / 4. 0.100



GPU : Tesla T4


System : Linux tgpu 4.19.0-17-amd64 #1 SMP Debian 4.19.194-3 (2021-07-18) x86_64 GNU/Linux


Nvcc version : nvcc : NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2020 NVIDIA Corporation
Built on Mon_Oct_12_20:09:46_PDT_2020
Cuda compilation tools, release 11.1, V11.1.105
Build cuda_11.1.TC455_06.29190527_0


Is it possible to scale hevc using GPU and how to fix this ?
Thank You in advance.


-
Unable to open audio file on Heroku using Librosa
15 mars 2020, par Rohan BojjaI have a feature extraction REST API written in Python using the Librosa library (Extracting audio features), it receives an audio file through HTTP POST and responds with a list of features(such as MFCC,etc).
Since librosa depends on SoundFile (libsndfile1 / libsndfile-dev), it doesn’t support all the formats, I’m converting the audio file using ffmpeg-python wrapper (https://kkroening.github.io/ffmpeg-python/) .
It works just fine on my Windows 10 machine with Conda, but when I deploy it on Heroku, the librosa.load() functions returns an unknown format error, no matter what format I convert it to. I have tried FLAC, AIFF and WAV.
My first guess is that the converted format isn’t supported by libsndfile1, but it works on my local server (plus, their documentation says AIFF and WAV are supported), so I’m a little lost.
I have attached all the relevant snippets of code below, I can provide anything extra if necessary. Any help is highly appreciated. Thanks.
UPDATE1 :
I am using pipes instead of writing and reading from disk, worth a mention as the question could be misleading otherwise.
The log :
File "/app/app.py", line 31, in upload
x , sr = librosa.load(audioFile,mono=True,duration=5)
File "/app/.heroku/python/lib/python3.6/site-packages/librosa/core/audio.py", line 164, in load
six.reraise(*sys.exc_info())
File "/app/.heroku/python/lib/python3.6/site-packages/six.py", line 703, in reraise
raise value
File "/app/.heroku/python/lib/python3.6/site-packages/librosa/core/audio.py", line 129, in load
with sf.SoundFile(path) as sf_desc:
File "/app/.heroku/python/lib/python3.6/site-packages/soundfile.py", line 629, in __init__
self._file = self._open(file, mode_int, closefd)
File "/app/.heroku/python/lib/python3.6/site-packages/soundfile.py", line 1184, in _open
"Error opening {0!r}: ".format(self.name))
File "/app/.heroku/python/lib/python3.6/site-packages/soundfile.py", line 1357, in _error_check
raise RuntimeError(prefix + _ffi.string(err_str).decode('utf-8', 'replace'))
RuntimeError: Error opening <_io.BytesIO object at 0x7f46ad28beb8>: File contains data in an unknown format.
10.69.244.94 - - [15/Mar/2020:12:37:28 +0000] "POST /receiveWav HTTP/1.1" 500 290 "-" "curl/7.55.1"Flask/Librosa code deployed on Heroku (app.py) :
from flask import Flask, jsonify, request
import scipy.optimize
import os,pickle
import numpy as np
from sklearn.preprocessing import StandardScaler
import librosa
import logging
import soundfile as sf
from pydub import AudioSegment
import subprocess as sp
import ffmpeg
from io import BytesIO
logging.basicConfig(level=logging.DEBUG)
app = Flask(__name__)
@app.route('/receiveWav',methods = ['POST'])
def upload():
if(request.method == 'POST'):
f = request.files['file']
app.logger.info(f'AUDIO FORMAT\n\n\n\n\n\n\n\n\n\n: {f}')
proc = (
ffmpeg.input('pipe:')
.output('pipe:', format='aiff')
.run_async(pipe_stdin=True,pipe_stdout=True, pipe_stderr=True)
)
audioFile,err = proc.communicate(input=f.read())
audioFile = BytesIO(audioFile)
scaler = pickle.load(open("scaler.ok","rb"))
x , sr = librosa.load(audioFile,mono=True,duration=5)
y=x
#Extract the features
chroma_stft = librosa.feature.chroma_stft(y=y, sr=sr)
spec_cent = librosa.feature.spectral_centroid(y=y, sr=sr)
spec_bw = librosa.feature.spectral_bandwidth(y=y, sr=sr)
rolloff = librosa.feature.spectral_rolloff(y=y, sr=sr)
zcr = librosa.feature.zero_crossing_rate(y)
rmse = librosa.feature.rms(y=y)
mfcc = librosa.feature.mfcc(y=y, sr=sr)
features = f'{np.mean(chroma_stft)} {np.mean(rmse)} {np.mean(spec_cent)} {np.mean(spec_bw)} {np.mean(rolloff)} {np.mean(zcr)}'
for e in mfcc:
features += f' {np.mean(e)}'
input_data2 = np.array([float(i) for i in features.split(" ")]).reshape(1,-1)
input_data2 = scaler.transform(input_data2)
return jsonify(input_data2.tolist())
# driver function
if __name__ == '__main__':
app.run(debug = True)Aptfile :
libsndfile1
libsndfile-dev
libav-tools
libavcodec-extra-53
libavcodec-extra-53
ffmpegrequirements.txt :
aniso8601==8.0.0
audioread==2.1.8
certifi==2019.11.28
cffi==1.14.0
Click==7.0
decorator==4.4.2
ffmpeg-python==0.2.0
Flask==1.1.1
Flask-RESTful==0.3.8
future==0.18.2
gunicorn==20.0.4
itsdangerous==1.1.0
Jinja2==2.11.1
joblib==0.14.1
librosa==0.7.2
llvmlite==0.31.0
MarkupSafe==1.1.1
marshmallow==3.2.2
numba==0.48.0
numpy==1.18.1
pycparser==2.20
pydub==0.23.1
pytz==2019.3
resampy==0.2.2
scikit-learn==0.22.2.post1
scipy==1.4.1
six==1.14.0
SoundFile==0.10.3.post1
Werkzeug==1.0.0
wincertstore==0.2 -
Android-FFmpeg adding subtitle to mp4 video does not work
7 septembre 2022, par ebdaa appI am trying to add srt file to a mp4 video using android mobile-ffmpeg , the code works with no error but the generated video does not contain the subtitle


here is the code :


String cmd = "-i " + videoPath + " -vf subtitles=\"" + subtitlePath + ":force_style='Alignment=10,Fontsize=18'\" " + OutputVideoPath;
 FFmpeg.executeAsync(cmd, new ExecuteCallback() {
 @Override
 public void apply(final long executionId, final int returnCode) {
 if (returnCode == RETURN_CODE_SUCCESS) {
 } else {
 
 }
 }
 });



here are the logs


I/mobile-ffmpeg: ffmpeg version v4.4-dev-416
 Copyright (c) 2000-2020 the FFmpeg developers
I/mobile-ffmpeg: 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=arm-linux-androideabi- --sysroot=/files/android-sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/sysroot --prefix=/home/taner/Projects/mobile-ffmpeg/prebuilt/android-arm/neon/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=armv7-a --cpu=armv7-a --cc=armv7a-linux-androideabi24-clang --cxx=armv7a-linux-androideabi24-clang++ --extra-libs='-L/home/taner/Projects/mobile-ffmpeg/prebuilt/android-arm/neon/cpu-features/lib -lndk_compat' --target-os=android --enable-neon --enable-asm --enable-inline-asm --build-suffix=_neon --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --enable-shared --enable-v4l2-m2m --disable-outdev=fbdev --disable-indev=fbdev --enable-small --disable-openssl --disable-xmm-clobber-test --disable-debug --enable-lto --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 --disable-audiotoolbox --disable-appkit --disable-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gmp --enable-gnutls --enable-libmp3lame --enable-libass --enable-iconv --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxml2 --enable-libopencore-amrnb --enable-libshine --enable-libspeex --enable-libwavpack --enable-libkvazaar --enable-libilbc --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libaom --enable-libtwolame --disable-sdl2 --enable-libvo-amrwbenc --enable-zlib --enable-mediacodec
I/mobile-ffmpeg: libavutil 56. 55.100 / 56. 55.100
 libavcodec 58. 96.100 / 58. 96.100
I/mobile-ffmpeg: libavformat 58. 48.100 / 58. 48.100
 libavdevice 58. 11.101 / 58. 11.101
 libavfilter 7. 87.100 / 7. 87.100
 libswscale 5. 8.100 / 5. 8.100
I/mobile-ffmpeg: libswresample 3. 8.100 / 3. 8.100
I/mobile-ffmpeg: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Download/7b85de4d-6af2-4eea-be9d-0d13c7f7819f/001001.mp4':
 Metadata:
 major_brand : 
I/mobile-ffmpeg: isom
 minor_version : 
I/mobile-ffmpeg: 512
 compatible_brands: 
I/mobile-ffmpeg: isomiso2mp41
I/mobile-ffmpeg: encoder : 
 Lavf58.48.100
I/mobile-ffmpeg: Duration: 
 00:00:29.60
 , start: 
I/mobile-ffmpeg: 0.000000
 , bitrate: 
 466 kb/s
I/mobile-ffmpeg: Stream #0:0
 (und)
I/mobile-ffmpeg: : Video: mpeg4 (mp4v / 0x7634706D), yuv420p, 640x480 [SAR 1:2 DAR 2:3], 336 kb/s
 , 
 5 fps, 
I/mobile-ffmpeg: 5 tbr, 
 10240 tbn, 
 5 tbc
I/mobile-ffmpeg: (default)
I/mobile-ffmpeg: Metadata:
 handler_name : 
 VideoHandler
I/mobile-ffmpeg: Stream #0:1
I/mobile-ffmpeg: (und)
 : Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s
 (default)
I/mobile-ffmpeg: Metadata:
I/mobile-ffmpeg: handler_name : 
 SoundHandler
W/mobile-ffmpeg: Codec AVOption preset (Configuration preset) specified for output file #0 (/storage/emulated/0/Download/QuranYaser/7b85de4d-6af2-4eea-be9d-0d13c7f7819f/001001_sub.mp4) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
I/mobile-ffmpeg: Stream mapping:
I/mobile-ffmpeg: Stream #0:0 -> #0:0
I/mobile-ffmpeg: (mpeg4 (native) -> mpeg4 (native))
I/mobile-ffmpeg: Stream #0:1 -> #0:1
 (aac (native) -> aac (native))
I/mobile-ffmpeg: Press [q] to stop, [?] for help
 frame= 0 fps=0.0 q=0.0 size= 0kB time=-577014:32:22.77 bitrate= -0.0kbits/s speed=N/A 
I/mobile-ffmpeg: [Parsed_subtitles_0 @ 0xf35ee820] Shaper: FriBidi 1.0.9 (SIMPLE)
I/mobile-ffmpeg: [Parsed_subtitles_0 @ 0xf35ee820] 
W/mobile-ffmpeg: [Parsed_subtitles_0 @ 0xf35ee820] No usable fontconfig configuration file found, using fallback.
 [Parsed_subtitles_0 @ 0xf35ee820] 
I/mobile-ffmpeg: [Parsed_subtitles_0 @ 0xf35ee820] Using font provider fontconfig
 [Parsed_subtitles_0 @ 0xf35ee820] 
W/mobile-ffmpeg: [graph 0 input from stream 0:0 @ 0xf35ee880] sws_param option is deprecated and ignored
I/mobile-ffmpeg: Output #0, mp4, to '/storage/emulated/0/Download/QuranYaser/7b85de4d-6af2-4eea-be9d-0d13c7f7819f/001001_sub.mp4':
I/mobile-ffmpeg: Metadata:
 major_brand : 
 isom
I/mobile-ffmpeg: minor_version : 
 512
I/mobile-ffmpeg: compatible_brands: 
I/mobile-ffmpeg: isomiso2mp41
 encoder : 
I/mobile-ffmpeg: Lavf58.48.100
 Stream #0:0
I/mobile-ffmpeg: (und)
 : Video: mpeg4 (mp4v / 0x7634706D), yuv420p, 640x480 [SAR 1:2 DAR 2:3], q=2-31, 200 kb/s
 , 
I/mobile-ffmpeg: 5 fps, 
I/mobile-ffmpeg: 10240 tbn, 
 5 tbc
I/mobile-ffmpeg: (default)
 Metadata:
I/mobile-ffmpeg: handler_name : 
 VideoHandler
 encoder : 
I/mobile-ffmpeg: Lavc58.96.100 mpeg4
 Side data:
I/mobile-ffmpeg: 
 cpb: 
 bitrate max/min/avg: 0/0/200000 buffer size: 0 
 vbv_delay: N/A
I/mobile-ffmpeg: Stream #0:1
 (und)
I/mobile-ffmpeg: : Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s
 (default)
 Metadata:
I/mobile-ffmpeg: handler_name : 
 SoundHandler
I/mobile-ffmpeg: encoder : 
 Lavc58.96.100 aac
I/mobile-ffmpeg: frame= 11 fps=0.0 q=2.0 size= 0kB time=00:00:03.59 bitrate= 0.1kbits/s speed=7.16x 
I/mobile-ffmpeg: frame= 30 fps= 30 q=2.0 size= 256kB time=00:00:07.47 bitrate= 280.5kbits/s speed=7.44x 
I/mobile-ffmpeg: frame= 50 fps= 33 q=2.0 size= 512kB time=00:00:11.54 bitrate= 363.5kbits/s speed=7.67x 
I/mobile-ffmpeg: frame= 71 fps= 35 q=2.0 size= 768kB time=00:00:15.71 bitrate= 400.2kbits/s speed=7.83x 
I/mobile-ffmpeg: frame= 92 fps= 37 q=2.0 size= 1024kB time=00:00:19.78 bitrate= 424.0kbits/s speed=7.88x 
I/mobile-ffmpeg: frame= 110 fps= 36 q=2.0 size= 1280kB time=00:00:23.38 bitrate= 448.5kbits/s speed=7.75x 
I/mobile-ffmpeg: frame= 128 fps= 36 q=2.0 size= 1280kB time=00:00:27.12 bitrate= 386.6kbits/s speed=7.71x 
I/mobile-ffmpeg: frame= 148 fps= 38 q=8.4 Lsize= 1697kB time=00:00:29.40 bitrate= 472.9kbits/s speed=7.56x 
 video:1225kB audio:462kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 
I/mobile-ffmpeg: 0.559634%
I/mobile-ffmpeg: [aac @ 0xbe48c800] Qavg: 163.999



here is a sample of srt file I am trying to merge :


1
00:00:00,000 --> 00:00:03,326
 Text 1

2
00:00:03,326 --> 00:00:09,962
 Text 2

3
00:00:09,962 --> 00:00:16,160
 Text 3

4
00:00:16,160 --> 00:00:22,223
 Text 4



any idea why the generated video does not contain the subtitle ?


Update


Based on below comment , I changed my code to use the latest ffmpeg-kit version , here is the new code


String cmd = "-i " + videoPath + " -vf subtitles=\"" + subtitlePAth + ":force_style='Alignment=10,Fontsize=18\" " + 
 outputVideoPath;

 FFmpegKit.executeAsync(cmd, new FFmpegSessionCompleteCallback() {

 @Override
 public void apply(FFmpegSession session) {

 }
 }, new LogCallback() {

 @Override
 public void apply(com.arthenica.ffmpegkit.Log log) {


 }
 }, new StatisticsCallback() {

 @Override
 public void apply(Statistics statistics) { 

 }
 });`



and here is the updated log


ffmpeg version v4.5-dev-3393-g30322ebe3c Copyright (c) 2000-2021 the FFmpeg developers
 built with Android (7155654, based on r399163b1) clang version 11.0.5 (https://android.googlesource.com/toolchain/llvm-project 87f1315dfbea7c137aa2e6d362dbb457e388158d)
 configuration: --cross-prefix=arm-linux-androideabi- --sysroot=/files/android-sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/sysroot --prefix=/storage/light/projects/ffmpeg-kit/prebuilt/android-arm-neon/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=armv7-a --cpu=armv7-a --target-os=android --enable-neon --enable-asm --enable-inline-asm --build-suffix=_neon --ar=arm-linux-androideabi-ar --cc=armv7a-linux-androideabi24-clang --cxx=armv7a-linux-androideabi24-clang++ --ranlib=arm-linux-androideabi-ranlib --strip=arm-linux-androideabi-strip --nm=arm-linux-androideabi-nm --extra-libs='-L/storage/light/projects/ffmpeg-kit/prebuilt/android-arm-neon/cpu-features/lib -lndk_compat' --disable-autodetect --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --disable-static --enable-shared --enable-pthreads --enable-v4l2-m2m --disable-outdev=fbdev --disable-indev=fbdev --enable-small --disable-xmm-clobber-test --disable-debug --enable-lto --disable-neon-clobber-test --disable-programs --disable-postproc --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-sndio --disable-schannel --disable-securetransport --disable-xlib --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --disable-videotoolbox --disable-audiotoolbox --disable-appkit --disable-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gmp --enable-gnutls --enable-libmp3lame --enable-libass --enable-iconv --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxml2 --enable-libopencore-amrnb --enable-libshine --enable-libspeex --enable-libdav1d --enable-libkvazaar --enable-libilbc --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libtwolame --disable-sdl2 --enable-libvo-amrwbenc --enable-libzimg --disable-openssl --enable-zlib --enable-mediacodec
 libavutil 57. 13.100 / 57. 13.100
 libavcodec 59. 15.102 / 59. 15.102
 libavformat 59. 10.100 / 59. 10.100
 libavdevice 59. 1.100 / 59. 1.100
 libavfilter 8. 21.100 / 8. 21.100
 libswscale 6. 1.102 / 6. 1.102
 libswresample 4. 0.100 / 4. 0.100
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Download/7b85de4d-6af2-4eea-be9d-0d13c7f7819f/001001.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2mp41
 encoder : Lavf59.10.100
 Duration: 00:00:29.60, start: 0.000000, bitrate: 467 kb/s
 Stream #0:0[0x1](und): Video: mpeg4 (mp4v / 0x7634706D), yuv420p(tv, bt470bg/bt709/bt709), 640x480 [SAR 1:2 DAR 2:3], 336 kb/s, 5 fps, 5 tbr, 10240 tbn (default)
 Metadata:
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]
 Stream #0:1[0x2](und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 129 kb/s (default)
 Metadata:
 handler_name : SoundHandler
 vendor_id : [0][0][0][0]
 [mpeg4 @ 0xbacc1080] The "sub_text_format" option is deprecated: Deprecated, does nothing
 [aac @ 0xbacc1400] The "sub_text_format" option is deprecated: Deprecated, does nothing
 Stream mapping:
 Stream #0:0 -> #0:0 (mpeg4 (native) -> mpeg4 (native))
 Stream #0:1 -> #0:1 (aac (native) -> aac (native))
 Press [q] to stop, [?] for help
 [Parsed_subtitles_0 @ 0xf35141e0] libass API version: 0x1502000[Parsed_subtitles_0 @ 0xf35141e0] 
 [Parsed_subtitles_0 @ 0xf35141e0] libass source: commit: 0.15.2-0-gc967a5a3d9ec0d36af1148b3fdf2f307a21dd122[Parsed_subtitles_0 @ 0xf35141e0] 
 [Parsed_subtitles_0 @ 0xf35141e0] Shaper: FriBidi 1.0.11 (SIMPLE) HarfBuzz-ng 3.2.0 (COMPLEX)[Parsed_subtitles_0 @ 0xf35141e0] 
 [Parsed_subtitles_0 @ 0xf35141e0] No usable fontconfig configuration file found, using fallback.[Parsed_subtitles_0 @ 0xf35141e0] 
 [Parsed_subtitles_0 @ 0xf35141e0] Using font provider fontconfig[Parsed_subtitles_0 @ 0xf35141e0] 
 [Parsed_subtitles_0 @ 0xf35141e0] fontselect: failed to find any fallback with glyph 0x0 for font: (Arial, 400, 0)[Parsed_subtitles_0 @ 0xf35141e0] 
 Output #0, mp4, to '/storage/emulated/0/Download/7b85de4d-6af2-4eea-be9d-0d13c7f7819f/001001_sub5.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2mp41
 encoder : Lavf59.10.100
 Stream #0:0(und): Video: mpeg4 (mp4v / 0x7634706D), yuv420p(tv, bt470bg/bt709/bt709, progressive), 640x480 [SAR 1:2 DAR 2:3], q=2-31, 200 kb/s, 5 fps, 10240 tbn (default)
 Metadata:
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]
 encoder : Lavc59.15.102 mpeg4
 Side data:
 cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
 Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
 Metadata:
 handler_name : SoundHandler
 vendor_id : [0][0][0][0]
 encoder : Lavc59.15.102 aac
 frame= 1 fps=0.0 q=5.7 size= 0kB time=00:00:01.55 bitrate= 0.2kbits/s speed= 2.4x 
 frame= 10 fps=8.7 q=2.0 size= 0kB time=00:00:03.50 bitrate= 0.1kbits/s speed=3.04x 
 frame= 20 fps= 12 q=2.0 size= 0kB time=00:00:05.36 bitrate= 0.1kbits/s speed=3.24x 
 frame= 32 fps= 15 q=2.0 size= 256kB time=00:00:07.87 bitrate= 266.5kbits/s speed=3.65x 
 frame= 45 fps= 17 q=2.0 size= 256kB time=00:00:10.49 bitrate= 199.8kbits/s speed=3.95x 
 frame= 58 fps= 18 q=2.0 size= 512kB time=00:00:12.97 bitrate= 323.2kbits/s speed=4.11x 
 frame= 69 fps= 19 q=2.0 size= 768kB time=00:00:15.23 bitrate= 413.1kbits/s speed=4.16x 
 frame= 81 fps= 19 q=2.0 size= 768kB time=00:00:17.60 bitrate= 357.5kbits/s speed=4.23x 
 frame= 92 fps= 20 q=2.0 size= 1024kB time=00:00:19.85 bitrate= 422.6kbits/s speed=4.26x 
 frame= 102 fps= 20 q=2.0 size= 1024kB time=00:00:21.89 bitrate= 383.1kbits/s speed=4.24x 
 frame= 115 fps= 20 q=2.0 size= 1280kB time=00:00:24.40 bitrate= 429.7kbits/s speed=4.31x 
 frame= 126 fps= 20 q=2.0 size= 1280kB time=00:00:26.67 bitrate= 393.0kbits/s speed=4.32x 
 frame= 139 fps= 21 q=2.0 size= 1536kB time=00:00:29.28 bitrate= 429.8kbits/s speed=4.39x 
 frame= 148 fps= 22 q=8.4 Lsize= 1701kB time=00:00:29.40 bitrate= 473.9kbits/s speed=4.34x 
 video:1225kB audio:466kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.561835%
 [aac @ 0xbacc2200] Qavg: 482.514