
Recherche avancée
Autres articles (95)
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Les vidéos
21 avril 2011, parComme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...) -
Que fait exactement ce script ?
18 janvier 2011, parCe script est écrit en bash. Il est donc facilement utilisable sur n’importe quel serveur.
Il n’est compatible qu’avec une liste de distributions précises (voir Liste des distributions compatibles).
Installation de dépendances de MediaSPIP
Son rôle principal est d’installer l’ensemble des dépendances logicielles nécessaires coté serveur à savoir :
Les outils de base pour pouvoir installer le reste des dépendances Les outils de développements : build-essential (via APT depuis les dépôts officiels) ; (...)
Sur d’autres sites (7205)
-
C++ OpenCV 3.4 / FFMPEG 3.4.1 VideoWriter and MP4 Output File Format
11 janvier 2019, par PhilBotI’m running on an ARM BeagleBone X-15 Debian machine with Linux Kernel 4.9.35-ti-r44. In my C++ ( Qt 5 ) application, I want to save my cv::Mat frames to an MP4 format video. I have libx264 installed and compiled from scratch both ffmpeg and OpenCv. I can successfully record and view video with MJPEG with the AVI video container type but not MP4. Whenever I try to write an MP4 video, I get run time errors of the form :
OpenCV: FFMPEG: tag 0x44495658/'XVID' is not supported with codec id 13 and format 'mp4 / MP4 (MPEG-4 Part 14)'
OpenCV: FFMPEG: fallback to use tag 0x00000020/' ???'I’ve tried various Google answers but none have worked.
Relevant code :
cv::Size frameSize = frame.size();
qDebug() << "Initializing Video Recording to save Video file here: " << destinationFileName;
std::string filename = destinationFileName.toStdString();
//int fcc = CV_FOURCC('M','J','P','G');
//int fcc = CV_FOURCC('X','2','6','4');
int fcc = CV_FOURCC('X','V','I','D');
int fps = 1;
videoRecorder = new cv::VideoWriter(filename,fcc,fps,frameSize);
...
videoRecorder->write(frame);I’ve downloaded and built the latest OpenCV 3.4 but the problem persists.
How can I write to an MP4 File with OpenCV’s video writer ?When I try the ’X’,’2’,’6’,’4’ format I get the error :
Initializing Video Recording to save Video file here: "/tmp/Garage.mp4"
OpenCV: FFMPEG: tag 0x34363258/'X264' is not supported with codec id 28 and format 'mp4 / MP4 (MPEG-4 Part 14)'
OpenCV: FFMPEG: fallback to use tag 0x31637661/'avc1'
[h264_v4l2m2m @ 0x81042020] Could not find a valid device
[h264_v4l2m2m @ 0x81042020] can't configure encoder
Could not open codec 'h264_v4l2m2m': Unspecified error
StartingWhen I try the ’X’,’V’,’I’,’D’ format I get the error :
Initializing Video Recording to save Video file here: "/tmp/Garage.mp4"
OpenCV: FFMPEG: tag 0x44495658/'XVID' is not supported with codec id 13 and format 'mp4 / MP4 (MPEG-4 Part 14)'
OpenCV: FFMPEG: fallback to use tag 0x7634706d/'mp4v'
StartingWhen I try the ’M’,’P’,’E’,’G’ format I get the error :
Initializing Video Recording to save Video file here: "/tmp/Garage.mp4"
OpenCV: FFMPEG: tag 0x4745504d/'MPEG' is not supported with codec id 2 and format 'mp4 / MP4 (MPEG-4 Part 14)'
OpenCV: FFMPEG: fallback to use tag 0x7634706d/'mp4v'
StartingWhen I try the ’H’,’2’,’6’,’4’ format I get the error :
OpenCV: FFMPEG: tag 0x34363248/'H264' is not supported with codec id 28 and format 'mp4 / MP4 (MPEG-4 Part 14)'
OpenCV: FFMPEG: fallback to use tag 0x31637661/'avc1'
[h264_v4l2m2m @ 0x7fdde340] Could not find a valid device
[h264_v4l2m2m @ 0x7fdde340] can't configure encoder
Could not open codec 'h264_v4l2m2m': Unspecified error
StartingWhen I try the ’M’,’P’,’4’,’V’ format I get the error :
Initializing Video Recording to save Video file here: "/tmp/Garage.mp4"
OpenCV: FFMPEG: tag 0x5634504d/'MP4V' is not supported with codec id 13 and format 'mp4 / MP4 (MPEG-4 Part 14)'
OpenCV: FFMPEG: fallback to use tag 0x7634706d/'mp4v'
StartingWhen I try the ’A’,’V’,’C’,’1’ format I get the error :
Initializing Video Recording to save Video file here: "/tmp/Garage.mp4"
OpenCV: FFMPEG: tag 0x31435641/'AVC1' is not supported with codec id 28 and format 'mp4 / MP4 (MPEG-4 Part 14)'
OpenCV: FFMPEG: fallback to use tag 0x31637661/'avc1'
[h264_v4l2m2m @ 0x810f5f50] Could not find a valid device
[h264_v4l2m2m @ 0x810f5f50] can't configure encoder
Could not open codec 'h264_v4l2m2m': Unspecified error
StartingWhen I try the ’D’,’I’,’V’,’X’ format I get the error :
Initializing Video Recording to save Video file here: "/tmp/Garage.mp4"
OpenCV: FFMPEG: tag 0x58564944/'DIVX' is not supported with codec id 13 and format 'mp4 / MP4 (MPEG-4 Part 14)'
OpenCV: FFMPEG: fallback to use tag 0x7634706d/'mp4v'
StartingWhen I try the 0x21 format I get the error :
Initializing Video Recording to save Video file here: "/tmp/Garage.mp4"
OpenCV: FFMPEG: tag 0x00000021/'!???' is not found (format 'mp4 / MP4 (MPEG-4 Part 14)')'
StartingHere is my complete class which shows all tried formats :
#include "downloader.h"
Downloader::Downloader(QString url, QString destinationFile) : downloadUrl(url) , destinationFileName(destinationFile)
{
didInitializeVideoWriter = false;
qDebug() << "Initialized Downloader...";
}
Downloader::~Downloader() {
videoRecorder->release();
delete videoRecorder;
}
void Downloader::doDownload()
{
networkManager = new QNetworkAccessManager(this);
connect(networkManager, SIGNAL(finished(QNetworkReply*)),
this, SLOT(replyFinished(QNetworkReply*)));
networkManager->get(QNetworkRequest(QUrl(downloadUrl)));
}
void Downloader::writeFrame(cv::Mat frame) {
QMutexLocker locker(&videoFrameMutex);
videoRecorder->write(frame);
}
void Downloader::replyFinished(QNetworkReply *reply)
{
if(reply->error())
{
qDebug() << "ERROR!";
qDebug() << reply->errorString();
}
else
{
//qDebug() << reply->header(QNetworkRequest::ContentTypeHeader).toString();
//qDebug() << reply->header(QNetworkRequest::LastModifiedHeader).toDateTime().toString();
//qDebug() << reply->header(QNetworkRequest::ContentLengthHeader).toULongLong();
qDebug() << reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
qDebug() << reply->attribute(QNetworkRequest::HttpReasonPhraseAttribute).toString();
QString tempFileName = destinationFileName;
QString jpegTempFilename = QString("%1").arg(tempFileName.replace("mp4","jpeg"));
qDebug() << "Overwriting: " << jpegTempFilename;
QFile *file = new QFile(jpegTempFilename);
if(file->open(QFile::WriteOnly))
{
file->write(reply->readAll());
file->flush();
file->close();
}
delete file;
cv::Mat frame = imread(jpegTempFilename.toStdString(), CV_LOAD_IMAGE_COLOR); // CV_LOAD_IMAGE_COLOR (>0) loads the image in the BGR format
cv::cvtColor(frame,frame,CV_BGR2RGB);
// Now lazy load the recorder
if ( !didInitializeVideoWriter ) {
cv::Size frameSize = frame.size();
qDebug() << "Initializing Video Recording to save Video file here: " << destinationFileName;
std::string filename = destinationFileName.toStdString();
//int fcc = CV_FOURCC('M','J','P','G');
int fcc = CV_FOURCC('X','2','6','4');
//int fcc = CV_FOURCC('X','V','I','D');
//int fcc = CV_FOURCC('M','P','E','G');
//int fcc = CV_FOURCC('H','2','6','4');
//int fcc = CV_FOURCC('M','P','4','V');
//int fcc = CV_FOURCC('A','V','C','1');
//int fcc = CV_FOURCC('D','I','V','X');
//int fcc = 0x21;
//int fcc = 0x00000021;
int fps = 1;
videoRecorder = new cv::VideoWriter(filename,fcc,fps,frameSize);
qDebug() << "Starting";
frameCounter = 1;
performanceTimer.start();
didInitializeVideoWriter = true;
}
cv::putText(frame,"[REC]",cv::Point(50,50),5,1,cv::Scalar(0,0,225));
QFuture<void> backgroundRun = QtConcurrent::run(this, &Downloader::writeFrame, frame);
//backgroundRun.waitForFinished();
}
reply->deleteLater();
qDebug() << "RequestTimer: " << performanceTimer.elapsed() << frameCounter;
// Requests Again
networkManager->get(QNetworkRequest(QUrl(downloadUrl)));
frameCounter++;
performanceTimer.restart();
}
</void>Update - I tried ’a’,’v’,’c’,’1’ and unfortunately that also does not work :
Initializing Video Recording to save Video file here: "/tmp/Garage.mp4"
[h264_v4l2m2m @ 0x810f6aa0] Could not find a valid device
[h264_v4l2m2m @ 0x810f6aa0] can't configure encoder
Could not open codec 'h264_v4l2m2m': Unspecified error
(qt-downloader:6234): GStreamer-CRITICAL **: gst_element_make_from_uri: assertion 'gst_uri_is_valid (uri)' failed
OpenCV Error: Unspecified error (GStreamer: cannot link elements
) in CvVideoWriter_GStreamer::open, file /media/usb/opencv/modules/videoio/src/cap_gstreamer.cpp, line 1635
VIDEOIO(cvCreateVideoWriter_GStreamer (filename, fourcc, fps, frameSize, is_color)): raised OpenCV exception:
/media/usb/opencv/modules/videoio/src/cap_gstreamer.cpp:1635: error: (-2) GStreamer: cannot link elements
in function CvVideoWriter_GStreamer::openWhen I try the X264 FOURCC, the mp4 file is 48 bytes and never grows :
Initializing Video Recording to save Video file here: "/tmp/Garage.mp4"
OpenCV: FFMPEG: tag 0x34363258/'X264' is not supported with codec id 27 and format 'mp4 / MP4 (MPEG-4 Part 14)'
OpenCV: FFMPEG: fallback to use tag 0x31637661/'avc1'Static Size :
debian@BeagleBoard-X15:/tmp$ ls -lrt Garage.*
-rw-r--r-- 1 debian debian 48 Dec 24 21:13 Garage.mp4
-rw-r--r-- 1 debian debian 100424 Dec 24 21:14 Garage.jpeg
debian@BeagleBoard-X15:/tmp$ hexdump Garage.mp4
0000000 0000 2000 7466 7079 7369 6d6f 0000 0002
0000010 7369 6d6f 7369 326f 7661 3163 706d 3134
0000020 0000 0800 7266 6565 0000 0000 646d 7461
0000030Here is my ffmpeg build conf :
debian@BeagleBoard-X15:/tmp$ ffmpeg -buildconf
ffmpeg version N-89524-g74f408cc8e Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 6.3.0 (Debian 6.3.0-18) 20170516
configuration: --enable-gpl --enable-libx264 --enable-pthreads --enable-static --extra-cflags=-I./x264/include --extra-ldflags=-L./x264/lib --extra-libs=-ldl
libavutil 56. 6.100 / 56. 6.100
libavcodec 58. 8.100 / 58. 8.100
libavformat 58. 3.100 / 58. 3.100
libavdevice 58. 0.100 / 58. 0.100
libavfilter 7. 7.100 / 7. 7.100
libswscale 5. 0.101 / 5. 0.101
libswresample 3. 0.101 / 3. 0.101
libpostproc 55. 0.100 / 55. 0.100
configuration:
--enable-gpl
--enable-libx264
--enable-pthreads
--enable-static
--extra-cflags=-I./x264/include
--extra-ldflags=-L./x264/lib
--extra-libs=-ldl -
Concatenating video using FFMPEG wrapper class [duplicate]
21 décembre 2017, par alan samuelThis question already has an answer here :
I am trying to concatenate video using NReco.VideoConverter wrapper class made for FFMPEG.
I have three video files with the same frame rate and same frame size.
Here is what I have done.
string toconcatfile = @"C:\Users\Alan\Desktop\Black.mp4";
string output1 = @"C:\Users\Alan\Desktop\output1.mp4";
string output2 = @"C:\Users\Alan\Desktop\output2.mp4";
string finaloutput = @"C:\Users\Alan\Desktop\finaloutput.mp4";All the three videos have a frame rate of 25 and Video frame size yet it fails when I add in toconcatfile to the final conversion method.
It works when its just output1 and output2 meaning there must be a different setting in toconcatfile.
Here is what I have tried.
FFMpegConverter fFMpeg = new FFMpegConverter();
//Slices first video
ConvertSettings settings = new ConvertSettings
{
VideoFrameRate = 25,
VideoFrameSize = FrameSize.hd480,
MaxDuration = startcut,
AudioSampleRate = 44100
};
//Slices second video
ConvertSettings settings2 = new ConvertSettings
{
VideoFrameRate = 25,
VideoFrameSize = FrameSize.hd480,
Seek = endcut,
AudioSampleRate = 44100
};
//Copies framerate and size from the previous video to the concatenation video
ConvertSettings settings3 = new ConvertSettings
{
VideoFrameRate = 25,
VideoFrameSize = FrameSize.hd480,
MaxDuration = 4,
AppendSilentAudioStream = true,
AudioSampleRate = 44100
};
string newblack = @"C:\Users\Alan\Desktop\newblack.mp4";
//Slice method called
fFMpeg.ConvertMedia(pathtofile, Format.mp4, output1, Format.mp4, settings);
fFMpeg.ConvertMedia(pathtofile, Format.mp4, output2, Format.mp4, settings2);
fFMpeg.ConvertMedia(toconcatfile, Format.mp4, newblack, Format.mp4, settings3);
String[] inputfiles = new String[2];
inputfiles[0] = output1;
inputfiles[1] = newblack;
//inputfiles[1] = output2;
ConcatSettings concatSettings = new ConcatSettings
{
//CustomOutputArgs = output1+" "+ toconcatfile+ " "+output2+ " -filter_complex \"[0:v:0][0:a:0][1:v:0][1:a:0][2:v:0][2:a:0]concat=n=3:v=1:a=1[outv][outa]\" -map \"[outv]\" - map \"[outa]\""
};
fFMpeg.ConcatMedia(inputfiles, finaloutput, Format.mp4, concatSettings);Can anyone help ?
Edit : I get the exception message - "Invalid argument (exit code : 1)",
Here is the output log of FFMPEG
FFMPEG LOG ITEM - ffmpeg version 3.2.2 Copyright (c) 2000-2016 the
FFmpeg developers
FFMPEG LOG ITEM - built with gcc 5.4.0 (GCC)
FFMPEG LOG ITEM - configuration: --enable-gpl --enable-version3 --enable-
dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --
enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
FFMPEG LOG ITEM - libavutil 55. 34.100 / 55. 34.100
FFMPEG LOG ITEM - libavcodec 57. 64.101 / 57. 64.101
FFMPEG LOG ITEM - libavformat 57. 56.100 / 57. 56.100
FFMPEG LOG ITEM - libavdevice 57. 1.100 / 57. 1.100
FFMPEG LOG ITEM - libavfilter 6. 65.100 / 6. 65.100
FFMPEG LOG ITEM - libswscale 4. 2.100 / 4. 2.100
FFMPEG LOG ITEM - libswresample 2. 3.100 / 2. 3.100
FFMPEG LOG ITEM - libpostproc 54. 1.100 / 54. 1.100
FFMPEG LOG ITEM - Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\Alan\Desktop\output1.mp4':
FFMPEG LOG ITEM - Metadata:
FFMPEG LOG ITEM - major_brand : isom
FFMPEG LOG ITEM - minor_version : 512
FFMPEG LOG ITEM - compatible_brands: isomiso2avc1mp41
FFMPEG LOG ITEM - encoder : Lavf57.56.100
FFMPEG LOG ITEM - Duration: 00:00:30.02, start: 0.000000, bitrate: 543 kb/s
FFMPEG LOG ITEM - Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 852x480 [SAR 3893:2872 DAR 276403:114880], 407 kb/s, SAR 12800:9443 DAR 320:133, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
FFMPEG LOG ITEM - Metadata:
FFMPEG LOG ITEM - handler_name : VideoHandler
FFMPEG LOG ITEM - Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 129 kb/s (default)
FFMPEG LOG ITEM - Metadata:
FFMPEG LOG ITEM - handler_name : SoundHandler
FFMPEG LOG ITEM - Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\Alan\Desktop\newblack.mp4':
FFMPEG LOG ITEM - Metadata:
FFMPEG LOG ITEM - major_brand : isom
FFMPEG LOG ITEM - minor_version : 512
FFMPEG LOG ITEM - compatible_brands: isomiso2avc1mp41
FFMPEG LOG ITEM - encoder : Lavf57.56.100
FFMPEG LOG ITEM - Duration: 00:00:04.02, start: 0.000000, bitrate: 19 kb/s
FFMPEG LOG ITEM - Stream #1:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 852x480 [SAR 160:213 DAR 4:3], 7 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
FFMPEG LOG ITEM - Metadata:
FFMPEG LOG ITEM - handler_name : VideoHandler
FFMPEG LOG ITEM - Stream #1:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 2 kb/s (default)
FFMPEG LOG ITEM - Metadata:
FFMPEG LOG ITEM - handler_name : SoundHandler
FFMPEG LOG ITEM - Input #2, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\Alan\Desktop\output2.mp4':
FFMPEG LOG ITEM - Metadata:
FFMPEG LOG ITEM - major_brand : isom
FFMPEG LOG ITEM - minor_version : 512
FFMPEG LOG ITEM - compatible_brands: isomiso2avc1mp41
FFMPEG LOG ITEM - encoder : Lavf57.56.100
FFMPEG LOG ITEM - Duration: 00:01:34.22, start: 0.000000, bitrate: 1058 kb/s
FFMPEG LOG ITEM - Stream #2:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 852x480 [SAR 3893:2872 DAR 276403:114880], 923 kb/s, SAR 12800:9443 DAR 320:133, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
FFMPEG LOG ITEM - Metadata:
Exception thrown: 'NReco.VideoConverter.FFMpegException' in NReco.VideoConverter.dll
FFMPEG LOG ITEM - handler_name : VideoHandler
FFMPEG LOG ITEM - Stream #2:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
FFMPEG LOG ITEM - Metadata:
FFMPEG LOG ITEM - handler_name : SoundHandler
FFMPEG LOG ITEM - [Parsed_concat_0 @ 04ded5e0] Input link in1:v0 parameters (size 852x480, SAR 160:213) do not match the corresponding output link in0:v0 parameters (852x480, SAR 12800:9443)
FFMPEG LOG ITEM - [Parsed_concat_0 @ 04ded5e0] Failed to configure output pad on Parsed_concat_0
FFMPEG LOG ITEM - Error configuring complex filters.
FFMPEG LOG ITEM - Invalid argument -
Creating a video using ffmpeg in a PHP script
30 décembre 2017, par FemzyI have been trying to solve this problem for a while now, but i have not got it through please someone should help me..
My main objective is to collect user’n inputs and convert it to a video with black background, then the input text will be moving from left to right while the video is playing with audio in the background. Currently i was suggested to use "drawtext" but i have not find it working
This is the code I use just to test the drawtext but the thing is, if i try it 10 times it will create a video file ones in many times i tried and even the video file would have 0 kb in size
The Below code is my codeThe Below is the Report i got from the not working ffmpeg cmmand
echo shell_exec('ffmpeg -f lavfi -i testsrc=duration=5:size=800x600:rate=30 -vf drawtext="fontfile=/usr/share/fonts/truetype/dejavu/DejaVuSerif-Bold.ttf:textfile=text.txt: x=(w-tw)/2: y=h-(2*lh): fontcolor=white: box=1: boxcolor=0x00000000@1" -preset ultrafast outex.mp4');
ffmpeg started on 2017-12-29 at 16:43:24Report written to "ffmpeg-20171229-164324.log"
Command line :
ffmpeg -f test.mp4 -vf "drawtext=fontsize=64:fontcolor=white@0.8:box=1:boxcolor=black@0.75:boxborderw=16:fontfile=OCRA.ttf:text=my_video:x=(w-tw)/2:y=th" textover09.mpg -report
ffmpeg version git-2017-12-28-be4dfbf Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-18)
configuration : —prefix=/usr/local/ffmpeg —extra-cflags=-I/usr/local/ffmpeg/include —extra-ldflags=-L/usr/local/ffmpeg/lib —bindir=/usr/local/bin —enable-gpl —enable-nonfree —enable-libfdk_aac —enable-libmp3lame —enable-libopus —enable-libvpx —enable-libx264 —enable-libtheora —enable-filter=drawtext
libavutil 56. 7.100 / 56. 7.100
libavcodec 58. 9.100 / 58. 9.100
libavformat 58. 3.100 / 58. 3.100
libavdevice 58. 0.100 / 58. 0.100
libavfilter 7. 8.100 / 7. 8.100
libswscale 5. 0.101 / 5. 0.101
libswresample 3. 0.101 / 3. 0.101
libpostproc 55. 0.100 / 55. 0.100
Splitting the commandline.
Reading option ’-f’ ... matched as option ’f’ (force format) with argument ’test.mp4’.
Reading option ’-vf’ ... matched as option ’vf’ (set video filters) with argument ’drawtext=fontsize=64:fontcolor=white@0.8:box=1:boxcolor=black@0.75:boxborderw=16:fontfile=OCRA.ttf:text=my_video:x=(w-tw)/2:y=th’.
Reading option ’textover09.mpg’ ... matched as output url.
Reading option ’-report’ ... matched as option ’report’ (generate a report) with argument ’1’.
Finished splitting the commandline.
Parsing a group of options : global .
Applying option report (generate a report) with argument 1.
Successfully parsed a group of options.
Parsing a group of options : output url textover09.mpg.
Applying option f (force format) with argument test.mp4.
Applying option vf (set video filters) with argument drawtext=fontsize=64:fontcolor=white@0.8:box=1:boxcolor=black@0.75:boxborderw=16:fontfile=OCRA.ttf:text=my_video:x=(w-tw)/2:y=th.
Successfully parsed a group of options.
Opening an output file : textover09.mpg.
[NULL @ 0x4671e80] Requested output format ’test.mp4’ is not a suitable output format
textover09.mpg : Invalid argumentThis is Another report i got, in this report it is saying" Drawtext no such filters"
ffmpeg started on 2017-12-29 at 09:00:43
Report written to "ffmpeg-20171229-090043.log"
Command line:
ffmpeg -i test.mp4 -vf "drawtext=fontfile=/usr/share/fonts/truetype/dejavu/DejaVuSerif-Bold.ttf:textfile=text.txt:reload=1:y=h-line_h-10:x=(W/tw)*n" textover7.mpg -report
ffmpeg version git-2017-12-28-be4dfbf Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-18)
configuration: --prefix=/usr/local/ffmpeg --extra-cflags=-I/usr/local/ffmpeg/include --extra-ldflags=-L/usr/local/ffmpeg/lib --bindir=/usr/local/bin --enable-gpl --enable-nonfree --enable-libfdk_aac --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libx264 --enable-libtheora --enable-filter=drawtext
libavutil 56. 7.100 / 56. 7.100
libavcodec 58. 9.100 / 58. 9.100
libavformat 58. 3.100 / 58. 3.100
libavdevice 58. 0.100 / 58. 0.100
libavfilter 7. 8.100 / 7. 8.100
libswscale 5. 0.101 / 5. 0.101
libswresample 3. 0.101 / 3. 0.101
libpostproc 55. 0.100 / 55. 0.100
Splitting the commandline.
Reading option '-i' ... matched as input url with argument 'test.mp4'.
Reading option '-vf' ... matched as option 'vf' (set video filters) with argument 'drawtext=fontfile=/usr/share/fonts/truetype/dejavu/DejaVuSerif-Bold.ttf:textfile=text.txt:reload=1:y=h-line_h-10:x=(W/tw)*n'.
Reading option 'textover7.mpg' ... matched as output url.
Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option report (generate a report) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input url test.mp4.
Successfully parsed a group of options.
Opening an input file: test.mp4.
[NULL @ 0x42d2d80] Opening 'test.mp4' for reading
[file @ 0x42d3700] Setting default whitelist 'file,crypto'
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x42d2d80] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x42d2d80] ISO: File Type Major Brand: mp42
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x42d2d80] Unknown dref type 0x206c7275 size 12
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x42d2d80] Processing st: 0, edit list 0 - media time: 0, duration: 13049
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x42d2d80] Unknown dref type 0x206c7275 size 12
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x42d2d80] Before avformat_find_stream_info() pos: 112452 bytes read:141356 seeks:0 nb_streams:2
[h264 @ 0x42d4640] nal_unit_type: 7, nal_ref_idc: 3
[h264 @ 0x42d4640] nal_unit_type: 8, nal_ref_idc: 3
[h264 @ 0x42d4640] nal_unit_type: 5, nal_ref_idc: 3
[h264 @ 0x42d4640] Format yuv420p chosen by get_format().
[h264 @ 0x42d4640] Reinit context to 640x368, pix_fmt: yuv420p
[h264 @ 0x42d4640] nal_unit_type: 1, nal_ref_idc: 2
[h264 @ 0x42d4640] nal_unit_type: 1, nal_ref_idc: 2
[h264 @ 0x42d4640] nal_unit_type: 1, nal_ref_idc: 2
[h264 @ 0x42d4640] nal_unit_type: 1, nal_ref_idc: 2
[h264 @ 0x42d4640] nal_unit_type: 1, nal_ref_idc: 2
[h264 @ 0x42d4640] nal_unit_type: 1, nal_ref_idc: 2
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x42d2d80] All info found
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x42d2d80] After avformat_find_stream_info() pos: 159483 bytes read:174124 seeks:0 frames:9
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2014-01-19T03:12:30.000000Z
Duration: 00:07:15.00, start: 0.000000, bitrate: 201 kb/s
Stream #0:0(und), 8, 1/30: Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x360, 103 kb/s, 15 fps, 15 tbr, 30 tbn, 30 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und), 1, 1/44100: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 96 kb/s (default)
Metadata:
creation_time : 2014-01-19T03:12:31.000000Z
handler_name : IsoMedia File Produced by Google, 5-11-2011
Successfully opened the file.
Parsing a group of options: output url textover7.mpg.
Applying option vf (set video filters) with argument drawtext=fontfile=/usr/share/fonts/truetype/dejavu/DejaVuSerif-Bold.ttf:textfile=text.txt:reload=1:y=h-line_h-10:x=(W/tw)*n.
Successfully parsed a group of options.
Opening an output file: textover7.mpg.
[file @ 0x42e9e40] Setting default whitelist 'file,crypto'
Successfully opened the file.
detected 12 logical cores
[h264 @ 0x43ece00] nal_unit_type: 7, nal_ref_idc: 3
[h264 @ 0x43ece00] nal_unit_type: 8, nal_ref_idc: 3
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> mpeg1video (native))
Stream #0:1 -> #0:1 (aac (native) -> mp2 (native))
Press [q] to stop, [?] for help
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[h264 @ 0x43ece00] nal_unit_type: 5, nal_ref_idc: 3
[h264 @ 0x43ece00] Format yuv420p chosen by get_format().
[h264 @ 0x43ece00] Reinit context to 640x368, pix_fmt: yuv420p
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[h264 @ 0x43f91c0] nal_unit_type: 1, nal_ref_idc: 2
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[h264 @ 0x43376c0] nal_unit_type: 1, nal_ref_idc: 2
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[h264 @ 0x4339d40] nal_unit_type: 1, nal_ref_idc: 2
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[h264 @ 0x43c1840] nal_unit_type: 1, nal_ref_idc: 2
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[h264 @ 0x43de0c0] nal_unit_type: 1, nal_ref_idc: 2
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[h264 @ 0x439b000] nal_unit_type: 1, nal_ref_idc: 2
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[h264 @ 0x445ae80] nal_unit_type: 1, nal_ref_idc: 2
[graph_1_in_0_1 @ 0x4657a40] Setting 'time_base' to value '1/44100'
[graph_1_in_0_1 @ 0x4657a40] Setting 'sample_rate' to value '44100'
[graph_1_in_0_1 @ 0x4657a40] Setting 'sample_fmt' to value 'fltp'
[graph_1_in_0_1 @ 0x4657a40] Setting 'channel_layout' to value '0x3'
[graph_1_in_0_1 @ 0x4657a40] tb:1/44100 samplefmt:fltp samplerate:44100 chlayout:0x3
[format_out_0_1 @ 0x4657cc0] Setting 'sample_fmts' to value 's16'
[format_out_0_1 @ 0x4657cc0] Setting 'sample_rates' to value '44100|48000|32000|22050|24000|16000'
[format_out_0_1 @ 0x4657cc0] Setting 'channel_layouts' to value '0x4|0x3'
[format_out_0_1 @ 0x4657cc0] auto-inserting filter 'auto_resampler_0' between the filter 'Parsed_anull_0' and the filter 'format_out_0_1'
[AVFilterGraph @ 0x42d2c40] query_formats: 4 queried, 6 merged, 3 already done, 0 delayed
[auto_resampler_0 @ 0x4658dc0] [SWR @ 0x4659140] Using fltp internally between filters
[auto_resampler_0 @ 0x4658dc0] ch:2 chl:stereo fmt:fltp r:44100Hz -> ch:2 chl:stereo fmt:s16 r:44100Hz
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[h264 @ 0x4477580] nal_unit_type: 1, nal_ref_idc: 2
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[h264 @ 0x4493cc0] nal_unit_type: 1, nal_ref_idc: 2
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[h264 @ 0x44b0340] nal_unit_type: 1, nal_ref_idc: 2
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[h264 @ 0x44cca80] nal_unit_type: 1, nal_ref_idc: 2
[AVFilterGraph @ 0x466e4c0] No such filter: 'drawtext'
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #0:0
[h264 @ 0x44e91c0] nal_unit_type: 1, nal_ref_idc: 2
[AVIOContext @ 0x43c0280] Statistics: 0 seeks, 0 writeouts
[AVIOContext @ 0x42db980] Statistics: 174124 bytes read, 0 seeks
Conversion failed!