
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (49)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
Other interesting software
13 avril 2011, parWe don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
We don’t know them, we didn’t try them, but you can take a peek.
Videopress
Website : http://videopress.com/
License : GNU/GPL v2
Source code : (...) -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
Sur d’autres sites (5469)
-
Conversion does not end using ffmpeg on Android device
3 février 2016, par BelhaverI am trying to make an application with usage of ffmpeg-android-java https://github.com/WritingMinds/ffmpeg-android-java and i have a problem. File conversion just does not end.
Here is code which i am using :
try {
// code...
String commandStr = "-y -i /storage/emulated/0/input.mp4 -strict experimental -s " + fileWidth + "x" + fileHeight + " -vcodec libx264 -r 30 /storage/emulated/0/output.mp4";
ffmpeg.execute(commandStr, new ExecuteBinaryResponseHandler() {
@Override
public void onSuccess(String message) {
Log.d("FFMPEG success", "");
// code...
}
@Override
public void onFailure(String message) {
Log.d("FFMPEG failure: ", message);
// code...
}
@Override
public void onProgress(String message) {
Log.d("FFMPEG process: ", message);
}
@Override
public void onFinish() {
Log.d("FFMPEG done", "");
}
});
} catch (Throwable e) {
e.printStackTrace();
}Here is the output process :
FFMPEG process:: WARNING: linker: /data/data/pl.tradesoft.testowa/files/ffmpeg has text relocations. This is wasting memory and prevents security hardening. Please fix.
FFMPEG process:: ffmpeg version n2.4.2 Copyright (c) 2000-2014 the FFmpeg developers
FFMPEG process:: built on Oct 7 2014 15:08:46 with gcc 4.8 (GCC)
FFMPEG process:: configuration: --target-os=linux --cross-prefix=/home/sb/Source-Code/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/sb/Source-Code/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/sb/Source-Code/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/sb/Source-Code/ffmpeg-android/build/armeabi-v7a-neon --extra-cflags='-I/home/sb/Source-Code/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all -mfpu=neon' --extra-ldflags='-L/home/sb/Source-Code/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
FFMPEG process:: libavutil 54. 7.100 / 54. 7.100
FFMPEG process:: libavcodec 56. 1.100 / 56. 1.100
FFMPEG process:: libavformat 56. 4.101 / 56. 4.101
FFMPEG process:: libavdevice 56. 0.100 / 56. 0.100
FFMPEG process:: libavfilter 5. 1.100 / 5. 1.100
FFMPEG process:: libswscale 3. 0.100 / 3. 0.100
FFMPEG process:: libswresample 1. 1.100 / 1. 1.100
FFMPEG process:: libpostproc 53. 0.100 / 53. 0.100
FFMPEG process:: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/input.mp4':
FFMPEG process:: Metadata:
FFMPEG process:: major_brand : isom
FFMPEG process:: minor_version : 512
FFMPEG process:: compatible_brands: isomiso2avc1mp41
FFMPEG process:: encoder : Lavf54.63.104
FFMPEG process:: Duration: 00:01:00.35, start: 0.000000, bitrate: 3267 kb/s
FFMPEG process:: Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1368x768 [SAR 1:1 DAR 57:32], 3258 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
FFMPEG process:: Metadata:
FFMPEG process:: handler_name : VideoHandler
FFMPEG process:: Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 3 kb/s (default)
FFMPEG process:: Metadata:
FFMPEG process:: handler_name : SoundHandler
FFMPEG process:: [libx264 @ 0xb5e08800] using SAR=1/1
FFMPEG process:: [libx264 @ 0xb5e08800] using cpu capabilities: none!
FFMPEG process:: [libx264 @ 0xb5e08800] profile High, level 3.2
FFMPEG process:: [libx264 @ 0xb5e08800] 264 - core 142 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
FFMPEG process:: Output #0, mp4, to '/storage/emulated/0/output.mp4':
FFMPEG process:: Metadata:
FFMPEG process:: major_brand : isom
FFMPEG process:: minor_version : 512
FFMPEG process:: compatible_brands: isomiso2avc1mp41
FFMPEG process:: encoder : Lavf56.4.101
FFMPEG process:: Stream #0:0(und): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1368x768 [SAR 1:1 DAR 57:32], q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)
FFMPEG process:: Metadata:
FFMPEG process:: handler_name : VideoHandler
FFMPEG process:: encoder : Lavc56.1.100 libx264
FFMPEG process:: Stream #0:1(und): Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz, stereo, fltp, 128 kb/s (default)
FFMPEG process:: Metadata:
FFMPEG process:: handler_name : SoundHandler
FFMPEG process:: encoder : Lavc56.1.100 aac
FFMPEG process:: Stream mapping:
FFMPEG process:: Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
FFMPEG process:: Stream #0:1 -> #0:1 (aac (native) -> aac (native))
FFMPEG process:: Press [q] to stop, [?] for help
FFMPEG process:: frame= 16 fps=0.0 q=0.0 size= 0kB time=00:00:00.62 bitrate= 0.6kbits/s
FFMPEG process:: frame= 31 fps= 30 q=0.0 size= 0kB time=00:00:01.11 bitrate= 0.3kbits/s
.......
FFMPEG process:: frame= 1801 fps=2.7 q=29.0 size= 4550kB time=00:01:00.11 bitrate= 620.0kbits/s
FFMPEG process:: frame= 1805 fps=2.7 q=29.0 size= 4552kB time=00:01:00.25 bitrate= 618.8kbits/s
FFMPEG process:: frame= 1808 fps=2.7 q=29.0 size= 4555kB time=00:01:00.30 bitrate= 618.8kbits/s
FFMPEG process:: frame= 1810 fps=2.7 q=-1.0 Lsize= 4640kB time=00:01:00.34 bitrate= 629.9kbits/s
FFMPEG process:: video:4561kB audio:15kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.407034%
FFMPEG process:: [libx264 @ 0xb5e08800] frame I:8 Avg QP:16.53 size:114657
FFMPEG process:: [libx264 @ 0xb5e08800] frame P:571 Avg QP:19.19 size: 5161
FFMPEG process:: [libx264 @ 0xb5e08800] frame B:1231 Avg QP:26.30 size: 654
FFMPEG process:: [libx264 @ 0xb5e08800] consecutive B-frames: 8.7% 1.3% 1.3% 88.6%
FFMPEG process:: [libx264 @ 0xb5e08800] mb I I16..4: 19.9% 33.4% 46.7%
FFMPEG process:: [libx264 @ 0xb5e08800] mb P I16..4: 1.7% 2.3% 0.5% P16..4: 16.5% 2.5% 2.0% 0.0% 0.0% skip:74.5%
FFMPEG process:: [libx264 @ 0xb5e08800] mb B I16..4: 0.1% 0.1% 0.0% B16..8: 5.8% 0.4% 0.1% direct: 0.2% skip:93.2% L0:37.8% L1:59.7% BI: 2.5%
FFMPEG process:: [libx264 @ 0xb5e08800] 8x8 transform intra:47.6% inter:79.3%
FFMPEG process:: [libx264 @ 0xb5e08800] coded y,uvDC,uvAC intra: 38.4% 73.1% 35.2% inter: 2.0% 4.6% 0.4%
FFMPEG process:: [libx264 @ 0xb5e08800] i16 v,h,dc,p: 40% 30% 15% 16%
FFMPEG process:: [libx264 @ 0xb5e08800] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 15% 38% 5% 6% 3% 3% 3% 4%
FFMPEG process:: [libx264 @ 0xb5e08800] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 30% 26% 18% 5% 6% 4% 4% 3% 3%
FFMPEG process:: [libx264 @ 0xb5e08800] i8c dc,h,v,p: 40% 25% 29% 7%
FFMPEG process:: [libx264 @ 0xb5e08800] Weighted P-Frames: Y:2.6% UV:2.6%
FFMPEG process:: [libx264 @ 0xb5e08800] ref P L0: 68.8% 8.0% 15.3% 7.5% 0.5%
FFMPEG process:: [libx264 @ 0xb5e08800] ref B L0: 85.0% 12.4% 2.6%
FFMPEG process:: [libx264 @ 0xb5e08800] ref B L1: 94.1% 5.9%
FFMPEG process:: [libx264 @ 0xb5e08800] kb/s:619.16And that’s all, nothing more is showing up. I was trying to change codec etc. and it didn’t work. Do you have any idea how can i resolve that problem ?
-
Demuxing a video media file with FFMPEG
23 février 2016, par MOHWAfter starting this question Extracting the h264 part of a video file (demuxing) I was actually able to figure out that,
- When I reverted to an older version of FFMPEG (avcodec-55.dll) as against the avcodec-57.dll I was using earlier, the code worked perfectly without any error and the resultant h264 file played with ffplay.
- When I tracked my output when using the avcodec-57.dll version of FFMPEG (most recent version), there was actually an error
"Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead"
after the callavformat_write_header(ofmt_ctx_v, NULL)
and another one after the call toavformat_write_header(ofmt_ctx_a, NULL)
. The program continued executing, the audio was fine but the .h264 file wasn’t.
The output
Press any key to continue . . .
Press any key to continue . . .
Press any key to continue . . .
Press any key to continue . . .
==============Input Video=============
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'sample.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
title : 10153755968775490
encoder : Lavf57.19.100
Duration: 00:01:07.27, start: 0.020021, bitrate: 1058 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 400x224 [
SAR 199:200 DAR 199:112], 927 kb/s, 15 fps, 15 tbr, 15360 tbn, 30 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(eng): Audio: mp3 (mp4a / 0x6134706D), 48000 Hz, stereo, s16p, 12
8 kb/s (default)
Metadata:
handler_name : SoundHandler
==============Output Video============
Output #0, h264, to 'sample.h264':
Stream #0:0: Video: h264 (High), yuv420p, 400x224 [SAR 199:200 DAR 199:112],
q=2-31, 927 kb/s, 30 tbc
==============Output Audio============
Output #0, mp3, to 'sample.mp3':
Stream #0:0: Audio: mp3, 48000 Hz, stereo, s16p, 128 kb/s
======================================
[h264 @ 00a3ee20] Using AVStream.codec.time_base as a timebase hint to the muxer
is deprecated. Set AVStream.time_base instead.
[mp3 @ 00a4fec0] Using AVStream.codec.time_base as a timebase hint to the muxer
is deprecated. Set AVStream.time_base instead.
Press any key to continue . . .The code
#include
#define __STDC_CONSTANT_MACROS
extern "C"
{
#include "libavformat/avformat.h"
}
#define USE_H264BSF 1
int main()
{
AVOutputFormat *ofmt_a = NULL,*ofmt_v = NULL;
AVFormatContext *ifmt_ctx = NULL, *ofmt_ctx_a = NULL, *ofmt_ctx_v = NULL;
AVPacket pkt;
int ret, i;
int videoindex=-1,audioindex=-1;
int frame_index=0;
const char *in_filename = "sample.mp4";
const char *out_filename_v = "sample.h264";
const char *out_filename_a = "sample.mp3";
av_register_all();
//Input
if ((ret = avformat_open_input(&ifmt_ctx, in_filename, 0, 0)) < 0) {
printf( "Could not open input file.");
goto end;
}
if ((ret = avformat_find_stream_info(ifmt_ctx, 0)) < 0) {
printf( "Failed to retrieve input stream information");
goto end;
}
system("pause");
//Output
avformat_alloc_output_context2(&ofmt_ctx_v, NULL, NULL, out_filename_v);
if (!ofmt_ctx_v) {
printf( "Could not create output context\n");
ret = AVERROR_UNKNOWN;
goto end;
}
ofmt_v = ofmt_ctx_v->oformat;
system("pause");
avformat_alloc_output_context2(&ofmt_ctx_a, NULL, NULL, out_filename_a);
if (!ofmt_ctx_a) {
printf( "Could not create output context\n");
ret = AVERROR_UNKNOWN;
goto end;
}
ofmt_a = ofmt_ctx_a->oformat;
system("pause");
for (i = 0; i < ifmt_ctx->nb_streams; i++) {
//Create output AVStream according to input AVStream
AVFormatContext *ofmt_ctx;
AVStream *in_stream = ifmt_ctx->streams[i];
AVStream *out_stream = NULL;
if(ifmt_ctx->streams[i]->codec->codec_type==AVMEDIA_TYPE_VIDEO){
videoindex=i;
out_stream=avformat_new_stream(ofmt_ctx_v, in_stream->codec->codec);
ofmt_ctx=ofmt_ctx_v;
}else if(ifmt_ctx->streams[i]->codec->codec_type==AVMEDIA_TYPE_AUDIO){
audioindex=i;
out_stream=avformat_new_stream(ofmt_ctx_a, in_stream->codec->codec);
ofmt_ctx=ofmt_ctx_a;
}else{
break;
}
if (!out_stream) {
printf( "Failed allocating output stream\n");
ret = AVERROR_UNKNOWN;
goto end;
}
//Copy the settings of AVCodecContext
if (avcodec_copy_context(out_stream->codec, in_stream->codec) < 0) {
printf( "Failed to copy context from input to output stream codec context\n");
goto end;
}
out_stream->codec->codec_tag = 0;
if (ofmt_ctx->oformat->flags & AVFMT_GLOBALHEADER)
out_stream->codec->flags |= CODEC_FLAG_GLOBAL_HEADER;
}
system("pause");
//Dump Format------------------
printf("\n==============Input Video=============\n");
av_dump_format(ifmt_ctx, 0, in_filename, 0);
printf("\n==============Output Video============\n");
av_dump_format(ofmt_ctx_v, 0, out_filename_v, 1);
printf("\n==============Output Audio============\n");
av_dump_format(ofmt_ctx_a, 0, out_filename_a, 1);
printf("\n======================================\n");
//Open output file
if (!(ofmt_v->flags & AVFMT_NOFILE)) {
if (avio_open(&ofmt_ctx_v->pb, out_filename_v, AVIO_FLAG_WRITE) < 0) {
printf( "Could not open output file '%s'", out_filename_v);
goto end;
}
}
if (!(ofmt_a->flags & AVFMT_NOFILE)) {
if (avio_open(&ofmt_ctx_a->pb, out_filename_a, AVIO_FLAG_WRITE) < 0) {
printf( "Could not open output file '%s'", out_filename_a);
goto end;
}
}
//Write file header
if (avformat_write_header(ofmt_ctx_v, NULL) < 0) {
printf( "Error occurred when opening video output file\n");
goto end;
}
if (avformat_write_header(ofmt_ctx_a, NULL) < 0) {
printf( "Error occurred when opening audio output file\n");
goto end;
}
system("pause");
#if USE_H264BSF
AVBitStreamFilterContext* h264bsfc = av_bitstream_filter_init("h264_mp4toannexb");
#endif
while (1) {
AVFormatContext *ofmt_ctx;
AVStream *in_stream, *out_stream;
//Get an AVPacket
if (av_read_frame(ifmt_ctx, &pkt) < 0)
break;
in_stream = ifmt_ctx->streams[pkt.stream_index];
if(pkt.stream_index==videoindex){
out_stream = ofmt_ctx_v->streams[0];
ofmt_ctx=ofmt_ctx_v;
#if USE_H264BSF
av_bitstream_filter_filter(h264bsfc, in_stream->codec, NULL, &pkt.data, &pkt.size, pkt.data, pkt.size, 0);
#endif
printf("Write Video Packet. size:%d\tpts:%lld\n",pkt.size,pkt.pts);
}else if(pkt.stream_index==audioindex){
out_stream = ofmt_ctx_a->streams[0];
ofmt_ctx=ofmt_ctx_a;
printf("Write Audio Packet. size:%d\tpts:%lld\n",pkt.size,pkt.pts);
}else{
continue;
}
//Convert PTS/DTS
pkt.pts = av_rescale_q_rnd(pkt.pts, in_stream->time_base, out_stream->time_base, (AVRounding)(AV_ROUND_NEAR_INF|AV_ROUND_PASS_MINMAX));
pkt.dts = av_rescale_q_rnd(pkt.dts, in_stream->time_base, out_stream->time_base, (AVRounding)(AV_ROUND_NEAR_INF|AV_ROUND_PASS_MINMAX));
pkt.duration = av_rescale_q(pkt.duration, in_stream->time_base, out_stream->time_base);
pkt.pos = -1;
pkt.stream_index=0;
//Write
if (av_interleaved_write_frame(ofmt_ctx, &pkt) < 0) {
printf( "Error muxing packet\n");
break;
}
//printf("Write %8d frames to output file\n", frame_index);
av_free_packet(&pkt);
frame_index++;
}
system("pause");
#if USE_H264BSF
av_bitstream_filter_close(h264bsfc);
#endif
//Write file trailer
av_write_trailer(ofmt_ctx_a);
av_write_trailer(ofmt_ctx_v);
end:
avformat_close_input(&ifmt_ctx);
/* close output */
if (ofmt_ctx_a && !(ofmt_a->flags & AVFMT_NOFILE))
avio_close(ofmt_ctx_a->pb);
if (ofmt_ctx_v && !(ofmt_v->flags & AVFMT_NOFILE))
avio_close(ofmt_ctx_v->pb);
avformat_free_context(ofmt_ctx_a);
avformat_free_context(ofmt_ctx_v);
system("pause");
if (ret < 0 && ret != AVERROR_EOF) {
printf( "Error occurred.\n");
return -1;
}
return 0;
}EDIT 1
After reading through http://lists.libav.org/pipermail/libav-devel/2014-June/060048.html, I figured what was causing the"Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead"
. I fixed it by addingout_stream->time_base = in_stream->time_base;
before the call toavformat_write_header
. The code now runs without any error ! The h264 file created with the old FFMPEG (avcodec-55.dll) works fine while that created by the recent avcodec-57.dll is still invalid. -
how to build ffmpeg with burn text on hls output while maintaining the aspect ratio
26 février 2016, par AameerMy objective is to burn a text(watermark) at a particular time range on the outputed hls video, I also have to change just the height and maintain the aspect ratio which I am able to do but the burning in text part is not working. First the ffmpeg I used is for 14.04 ubuntu, details are here. I don’t think this build supports subtitle (docs) filter which I could have used for my purpose as described here. when i enter ffmpeg into the terminal this is the output
(ffmpeg)aameer@falcon:~/Documents/projects/ffmpeg$ ffmpeg
ffmpeg version N-78590-g5590ab4 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.1)
configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --mandir=/usr/share/man --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse --enable-libfreetype --enable-gnutls --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvidstab
libavutil 55. 18.100 / 55. 18.100
libavcodec 57. 24.103 / 57. 24.103
libavformat 57. 25.100 / 57. 25.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 32.100 / 6. 32.100
libavresample 3. 0. 0 / 3. 0. 0
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
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'I tried
(ffmpeg)aameer@falcon:~/Documents/projects/ffmpeg$ ffmpeg -threads 4 -i "input_sintel_trailer_720p.mp4" -profile:v baseline -level 4.0 -vf scale="trunc(360*a/2)*2:360, subtitles='subtitles.srt'" -start_number 0 -hls_time 10 -hls_list_size 0 -f hls videos/4444/index_4444_360_.m3u8
and got an error
[Parsed_subtitles_1 @ 0x2f1b7e0] Shaper: FriBidi 0.19.6 (SIMPLE) HarfBuzz-ng 0.9.27 (COMPLEX)
[Parsed_subtitles_1 @ 0x2f1b7e0] Unable to open subtitles.srt
[AVFilterGraph @ 0x2f1ac00] Error initializing filter 'subtitles' with args 'subtitles.srt'
Error opening filters!then I tried this
(ffmpeg)aameer@falcon:~/Documents/projects/ffmpeg$ ffmpeg -threads 4 -i "input_sintel_trailer_720p.mp4" -profile:v baseline -level 4.0 -vf "scale='trunc(360*a/2)*2:360', drawtext:drawtext" -start_number 0 -hls_time 10 -hls_list_size 0 -f hls videos/4444/index_4444_360_.m3u8
based on an answer here and got this error
[AVFilterGraph @ 0x2695c20] No such filter: 'drawtext:drawtext'
Error opening filters!I tried a static build too which i got from here but still couldn’t make it work. with this static build i tried :
ffmpeg version N-63893-gc69defd Copyright (c) 2000-2014 the FFmpeg developers
built on Jul 16 2014 05:38:01 with gcc 4.6 (Debian 4.6.3-1)
configuration: --prefix=/root/ffmpeg-static/64bit --extra-cflags='-I/root/ffmpeg-static/64bit/include -static' --extra-ldflags='-L/root/ffmpeg-static/64bit/lib -static' --extra-libs='-lxml2 -lexpat -lfreetype' --enable-static --disable-shared --disable-ffserver --disable-doc --enable-bzlib --enable-zlib --enable-postproc --enable-runtime-cpudetect --enable-libx264 --enable-gpl --enable-libtheora --enable-libvorbis --enable-libmp3lame --enable-gray --enable-libass --enable-libfreetype --enable-libopenjpeg --enable-libspeex --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-version3 --enable-libvpx
libavutil 52. 89.100 / 52. 89.100
libavcodec 55. 66.101 / 55. 66.101
libavformat 55. 43.100 / 55. 43.100
libavdevice 55. 13.101 / 55. 13.101
libavfilter 4. 8.100 / 4. 8.100
libswscale 2. 6.100 / 2. 6.100
libswresample 0. 19.100 / 0. 19.100
libpostproc 52. 3.100 / 52. 3.100
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'
(ffmpeg)aameer@falcon:~/Documents/projects/ffmpeg$ ./ffmpeg -threads 4 -i "input_sintel_trailer_720p.mp4" -profile:v baseline -level 4.0 -vf scale="trunc(360*a/2)*2:360, subtitles='subtitle.srt'" -start_number 0 -hls_time 10 -hls_list_size 0 -f hls videos/4444/index_4444_360_.m3u8but got an error
Could not write header for output file #0 (incorrect codec parameters ?): No such file or directory
Any help in this regard would be appreciated. I don’t have much experience with compiling , otherwise would have done with support for libass as mentioned in the documentation here
console output after trying the first potential answer :
(ffmpeg)aameer@falcon:~/Documents/projects/ffmpeg$ ls
bbb_sunflower_1080p_30fps_normal.mp4 ffmpeg_log_multiprocess.txt ffmpeg.static.64bit.latest input_sintel_trailer_720p.mp4 watermark.png
encoding_script.sh ffmpeg_log_simple.txt ffprobe subtitle.srt
ffmpeg ffmpeg_log.txt fontconfig videos
(ffmpeg)aameer@falcon:~/Documents/projects/ffmpeg$ ffmpeg -threads 4 -i input_sintel_trailer_720p.mp4 -profile:v baseline -level 4.0 -vf "scale=-2:360,subtitles='subtitle.srt'" -start_number 0 -hls_time 10 -hls_list_size 0 -f hls videos/4444/index_4444_360_.m3u8
ffmpeg version N-78590-g5590ab4 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.1)
configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --mandir=/usr/share/man --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse --enable-libfreetype --enable-gnutls --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvidstab
libavutil 55. 18.100 / 55. 18.100
libavcodec 57. 24.103 / 57. 24.103
libavformat 57. 25.100 / 57. 25.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 32.100 / 6. 32.100
libavresample 3. 0. 0 / 3. 0. 0
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input_sintel_trailer_720p.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
creation_time : 1970-01-01 00:00:00
title : Sintel Trailer
artist : Durian Open Movie Team
encoder : Lavf52.62.0
copyright : (c) copyright Blender Foundation | durian.blender.org
description : Trailer for the Sintel open movie project
Duration: 00:00:52.21, start: 0.000000, bitrate: 1165 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 1033 kb/s, 24 fps, 24 tbr, 24 tbn, 48 tbc (default)
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 126 kb/s (default)
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : SoundHandler
[Parsed_subtitles_1 @ 0x2bdb700] Shaper: FriBidi 0.19.6 (SIMPLE) HarfBuzz-ng 0.9.27 (COMPLEX)
[Parsed_subtitles_1 @ 0x2bdb700] Using font provider fontconfig
[libx264 @ 0x2bc8b60] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x2bc8b60] profile Constrained Baseline, level 4.0
Output #0, hls, to 'videos/4444/index_4444_360_.m3u8':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
description : Trailer for the Sintel open movie project
title : Sintel Trailer
artist : Durian Open Movie Team
copyright : (c) copyright Blender Foundation | durian.blender.org
encoder : Lavf57.25.100
Stream #0:0(und): Video: h264 (libx264), yuv420p, 640x360, q=-1--1, 24 fps, 24 tbn, 24 tbc (default)
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : VideoHandler
encoder : Lavc57.24.103 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream #0:1(und): Audio: aac (LC), 48000 Hz, stereo, fltp, 128 kb/s (default)
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : SoundHandler
encoder : Lavc57.24.103 aac
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Could not write header for output file #0 (incorrect codec parameters ?): No such file or directory
[aac @ 0x2bc9ac0] Qavg: -nan
(ffmpeg)aameer@falcon:~/Documents/projects/ffmpeg$