Recherche avancée

Médias (91)

Autres articles (97)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains 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 ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-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

Sur d’autres sites (8441)

  • Creating a video using ffmpeg in a PHP script

    30 décembre 2017, par Femzy

    I 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 code

    The 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:24

    Report 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 argument

    This 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!
  • Concatenating video using FFMPEG wrapper class [duplicate]

    21 décembre 2017, par alan samuel

    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
  • Corrupt playback of .flv when using JW Player

    21 mai 2012, par Adam Ingmansson

    This question is also asked on Audio-Video Production

    I have some files that when played in jwplayer the playback is corrupt.
    The files are encoded to h.264 using FFMpeg and there is other files encoded in the same way that works.

    At the moment we only use the flash version of the player.

    The corrupt playback looks like this :

    http://adam.ingmansson.com/public/jwplayer-corrupt-video.png

    This problem started showing up after we did an upgrade to FFMpeg, so I haven't ruled out that it could be an encoding error.

    the command used to run FFMpeg is :

    ffmpeg
       -i /home/ftp/1c8f08b7d0d9e7fa4b24066156ad50bc981497a0.mov
       -vcodec libx264
       -preset ultrafast
       -profile baseline
       -acodec libfaac
       -ab 96k
       -crf 19
       -vf movie="/home/adam/logo.png [watermark]; [in][watermark] overlay=main_w-overlay_w-10:main_h-overlay_h-10 [out]"
       -y /home/ftp/1c8f08b7d0d9e7fa4b24066156ad50bc981497a0.flv

    I am in no way an expert in FFMpeg commandline, so feel free to point out any mistakes made.

    FFMpeg info :

    ffmpeg version git-2012-05-02-2330eb1 Copyright (c) 2000-2012 the FFmpeg developers
     built on May  3 2012 08:51:25 with gcc 4.4.3
     configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-version3 --enable-x11grab
     libavutil      51. 49.100 / 51. 49.100
     libavcodec     54. 17.101 / 54. 17.101
     libavformat    54.  3.100 / 54.  3.100
     libavdevice    53.  4.100 / 53.  4.100
     libavfilter     2. 72.103 /  2. 72.103
     libswscale      2.  1.100 /  2.  1.100
     libswresample   0. 11.100 /  0. 11.100
     libpostproc    52.  0.100 / 52.  0.100
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x24300e0] max_analyze_duration 5000000 reached at 5187000
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/ftp/javarecorder/1c8f08b7d0d9e7fa4b24066156ad50bc981497a0.mov':
     Metadata:
       major_brand     : qt
       minor_version   : 537199360
       compatible_brands: qt
       creation_time   : 2012-05-16 08:19:41
     Duration: 00:13:33.00, start: 0.000000, bitrate: 2164 kb/s
       Stream #0:0(eng): Video: qtrle (rle  / 0x20656C72), rgb24, 1366x768, 1457 kb/s, 8.43 fps, 1k tbr, 1k tbn, 1k tbc
       Metadata:
         creation_time   : 2012-05-16 08:19:41
         handler_name    : Apple Alias Data Handler
       Stream #0:1(eng): Audio: pcm_s16be (twos / 0x736F7774), 44100 Hz, 1 channels, s16, 705 kb/s
       Metadata:
         creation_time   : 2012-05-16 08:19:41
         handler_name    : Apple Alias Data Handler
    Please use -profile:a or -profile:v, -profile is ambiguous
    [buffer @ 0x2446ac0] w:1366 h:768 pixfmt:rgb24 tb:1/1000000 sar:0/1 sws_param:flags=2
    [movie @ 0x242f840] seek_point:0 format_name:(null) file_name:/home/adam/logo.png stream_index:0
    [overlay @ 0x2442840] auto-inserting filter 'auto-inserted scale 0' between the filter 'src' and the filter 'Parsed_overlay_1'
    [overlay @ 0x2442840] auto-inserting filter 'auto-inserted scale 1' between the filter 'Parsed_movie_0' and the filter 'Parsed_overlay_1'
    [scale @ 0x24444a0] w:1366 h:768 fmt:rgb24 sar:0/1 -> w:1366 h:768 fmt:yuv420p sar:0/1 flags:0x4
    [scale @ 0x2445100] w:80 h:80 fmt:rgba sar:1/1 -> w:80 h:80 fmt:yuva420p sar:1/1 flags:0x4
    [overlay @ 0x2442840] main w:1366 h:768 fmt:yuv420p overlay x:1276 y:678 w:80 h:80 fmt:yuva420p
    [overlay @ 0x2442840] main_tb:1/1000000 overlay_tb:1/25 -> tb:1/1000000 exact:1
    [libx264 @ 0x242d8c0] MB rate (4128000) > level limit (2073600)
    [libx264 @ 0x242d8c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
    [libx264 @ 0x242d8c0] profile Constrained Baseline, level 5.2
    [libx264 @ 0x242d8c0] 264 - core 124 r2197 69a0443 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=36 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=19.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
    [libfaac @ 0x2443540] channel_layout not specified
    Guessed Channel Layout for  Input Stream #0.1 : mono
    Output #0, flv, to '/home/ftp/javarecorder/1c8f08b7d0d9e7fa4b24066156ad50bc981497a0.flv':
     Metadata:
       major_brand     : qt
       minor_version   : 537199360
       compatible_brands: qt
       creation_time   : 2012-05-16 08:19:41
       encoder         : Lavf54.3.100
       Stream #0:0(eng): Video: h264 ([7][0][0][0] / 0x0007), yuv420p, 1366x768, q=-1--1, 1k tbn, 1k tbc
       Metadata:
         creation_time   : 2012-05-16 08:19:41
         handler_name    : Apple Alias Data Handler
       Stream #0:1(eng): Audio: aac ([10][0][0][0] / 0x000A), 44100 Hz, mono, s16, 96 kb/s
       Metadata:
         creation_time   : 2012-05-16 08:19:41
         handler_name    : Apple Alias Data Handler
    Stream mapping:
     Stream #0:0 -> #0:0 (qtrle -> libx264)
     Stream #0:1 -> #0:1 (pcm_s16be -> libfaac)
    Press [q] to stop, [?] for help
    Input stream #0:1 frame changed from rate:44100 fmt:s16 ch:1 chl:0x0 to rate:44100 fmt:s16 ch:1 chl:0x4
    frame= 6856 fps=105 q=-1.0 Lsize=   36030kB time=00:13:32.83 bitrate= 363.1kbits/s
    video:27775kB audio:7540kB global headers:0kB muxing overhead 2.026555%
    [libx264 @ 0x242d8c0] frame I:28    Avg QP: 4.61  size:238170
    [libx264 @ 0x242d8c0] frame P:6828  Avg QP: 7.31  size:  3189
    [libx264 @ 0x242d8c0] mb I  I16..4: 100.0%  0.0%  0.0%
    [libx264 @ 0x242d8c0] mb P  I16..4:  0.9%  0.0%  0.0%  P16..4:  2.2%  0.0%  0.0%  0.0%  0.0%    skip:96.9%
    [libx264 @ 0x242d8c0] coded y,uvDC,uvAC intra: 32.3% 30.0% 29.0% inter: 1.0% 1.1% 1.0%
    [libx264 @ 0x242d8c0] i16 v,h,dc,p: 66% 32%  1%  1%
    [libx264 @ 0x242d8c0] i8c dc,h,v,p: 62% 23% 14%  1%
    [libx264 @ 0x242d8c0] kb/s:279.82

    EDIT :

    A coworker was able to view a "corrupted" file. The only difference between my computer and his is that he have a Mac. Same flash version, same JW Player version. Something is not right here.