Recherche avancée

Médias (1)

Mot : - Tags -/getid3

Autres articles (45)

  • 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

  • Soumettre améliorations et plugins supplémentaires

    10 avril 2011

    Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
    Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

Sur d’autres sites (5805)

  • how to add audio to exist video using FFMPEG at specific time ?

    10 janvier 2018, par Yanshof

    I have video file (.avi) that contain video of 10 minutes.
    I also have audio file (.wav) that contain 1 minute of sound.

    I need to add the audio to the exist video but the audio need to start at after one minute of the video

    How to do it ?

    ( prefer using ffmpeg if its possible )

    try already this query ( 30 seconds deley )

    -i video.avi -i audio.wav -filter_complex \"[1]adelay=30000|30000[aud] ;[0][aud]amix\" - c:v copy out.avi"

    attached the log of ffmpeg when trying to marge more then one wav

    ffmpeg started on 2018-01-10 at 11:14:57
    Report written to "ffmpeg-20180110-111457.log"
    Command line:
    ffmpeg.exe -report -i "..\\merged.avi" -i "Storage\\1.wav" -i "Storage\\2.wav" -i "Storage\\3.wav" -filter_complex "adelay=30000|30000" "adelay=91000|91000" "adelay=151000|151000" -c:v copy "Storage\\ALL.AVI"
    ffmpeg version 3.4.1 Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 7.2.0 (GCC)
     configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx
     libavutil      55. 78.100 / 55. 78.100
     libavcodec     57.107.100 / 57.107.100
     libavformat    57. 83.100 / 57. 83.100
     libavdevice    57. 10.100 / 57. 10.100
     libavfilter     6.107.100 /  6.107.100
     libswscale      4.  8.100 /  4.  8.100
     libswresample   2.  9.100 /  2.  9.100
     libpostproc    54.  7.100 / 54.  7.100
    Splitting the commandline.
    Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'.
    Reading option '-i' ... matched as input url with argument '..\mergedVideoOnly.avi'.
    Reading option '-i' ... matched as input url with argument '\Storage\0030_0130.wav'.
    Reading option '-i' ... matched as input url with argument '\Storage\0130_0230.wav'.
    Reading option '-i' ... matched as input url with argument '\Storage\0230_0330.wav'.
    Reading option '-filter_complex' ... matched as option 'filter_complex' (create a complex filtergraph) with argument 'adelay=30000|30000'.
    Reading option 'adelay=91000|91000' ... matched as output url.
    Reading option 'adelay=151000|151000' ... matched as output url.
    Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'copy'.
    Reading option 'ALL.AVI' ... matched as output url.
    Finished splitting the commandline.
    Parsing a group of options: global .
    Applying option report (generate a report) with argument 1.
    Applying option filter_complex (create a complex filtergraph) with argument adelay=30000|30000.
    Successfully parsed a group of options.
    Parsing a group of options: input url ..\mergedVideoOnly.avi.
    Successfully parsed a group of options.
    Opening an input file: ..\mergedVideoOnly.avi.
    [NULL @ 042ed360] Opening '..\mergedVideoOnly.avi' for reading
    [file @ 042ee300] Setting default whitelist 'file,crypto'
    [avi @ 042ed360] Format avi probed with size=2048 and score=100
    [avi @ 042ee500] use odml:1
    [avi @ 042ed360] Before avformat_find_stream_info() pos: 5690 bytes read:100744 seeks:4 nb_streams:1
    [avi @ 042ed360] parser not found for codec scpr, packets or times may be invalid.
    [avi @ 042ed360] parser not found for codec scpr, packets or times may be invalid.
    [avi @ 042ed360] max_analyze_duration 5000000 reached at 5000000 microseconds st:0
    [avi @ 042ed360] rfps: 2.916667 0.012539
    [avi @ 042ed360] rfps: 2.916667 0.012539
    [avi @ 042ed360] rfps: 3.000000 0.000000
    [avi @ 042ed360] rfps: 3.083333 0.012539
    [avi @ 042ed360] rfps: 3.083333 0.012539
    [avi @ 042ed360] rfps: 5.916667 0.012539
    [avi @ 042ed360] rfps: 5.916667 0.012539
    [avi @ 042ed360] rfps: 6.000000 0.000000
    [avi @ 042ed360] rfps: 6.000000 0.000000
    [avi @ 042ed360] rfps: 6.083333 0.012539
    [avi @ 042ed360] rfps: 6.083333 0.012539
    [avi @ 042ed360] rfps: 8.916667 0.012539
    [avi @ 042ed360] rfps: 8.916667 0.012539
    [avi @ 042ed360] rfps: 9.000000 0.000000
    [avi @ 042ed360] rfps: 9.083333 0.012539
    [avi @ 042ed360] rfps: 9.083333 0.012539
    [avi @ 042ed360] rfps: 11.916667 0.012539
    [avi @ 042ed360] rfps: 11.916667 0.012539
    [avi @ 042ed360] rfps: 12.000000 0.000000
    [avi @ 042ed360] rfps: 12.000000 0.000000
    [avi @ 042ed360] rfps: 12.083333 0.012539
    [avi @ 042ed360] rfps: 12.083333 0.012539
    [avi @ 042ed360] rfps: 14.916667 0.012539
    [avi @ 042ed360] rfps: 14.916667 0.012539
    [avi @ 042ed360] rfps: 15.000000 0.000000
    [avi @ 042ed360] rfps: 15.083333 0.012539
    [avi @ 042ed360] rfps: 15.083333 0.012539
    [avi @ 042ed360] rfps: 17.916667 0.012539
    [avi @ 042ed360] rfps: 17.916667 0.012539
    [avi @ 042ed360] rfps: 18.000000 0.000000
    [avi @ 042ed360] rfps: 18.000000 -0.000000
    [avi @ 042ed360] rfps: 18.083333 0.012539
    [avi @ 042ed360] rfps: 18.083333 0.012539
    [avi @ 042ed360] rfps: 20.916667 0.012539
    [avi @ 042ed360] rfps: 20.916667 0.012539
    [avi @ 042ed360] rfps: 21.000000 0.000000
    [avi @ 042ed360] rfps: 21.083333 0.012539
    [avi @ 042ed360] rfps: 21.083333 0.012539
    [avi @ 042ed360] rfps: 23.916667 0.012539
    [avi @ 042ed360] rfps: 23.916667 0.012539
    [avi @ 042ed360] rfps: 24.000000 0.000000
    [avi @ 042ed360] rfps: 24.000000 -0.000000
    [avi @ 042ed360] rfps: 24.083333 0.012539
    [avi @ 042ed360] rfps: 24.083333 0.012539
    [avi @ 042ed360] rfps: 26.916667 0.012539
    [avi @ 042ed360] rfps: 26.916667 0.012539
    [avi @ 042ed360] rfps: 27.000000 0.000000
    [avi @ 042ed360] rfps: 27.083333 0.012539
    [avi @ 042ed360] rfps: 27.083333 0.012539
    [avi @ 042ed360] rfps: 29.916667 0.012539
    [avi @ 042ed360] rfps: 29.916667 0.012539
    [avi @ 042ed360] rfps: 30.000000 0.000000
    [avi @ 042ed360] rfps: 30.000000 -0.000000
    [avi @ 042ed360] rfps: 33.000000 0.000000
    [avi @ 042ed360] rfps: 36.000000 0.000000
    [avi @ 042ed360] rfps: 36.000000 -0.000000
    [avi @ 042ed360] rfps: 39.000000 0.000000
    [avi @ 042ed360] rfps: 42.000000 0.000000
    [avi @ 042ed360] rfps: 42.000000 0.000000
    [avi @ 042ed360] rfps: 45.000000 0.000000
    [avi @ 042ed360] rfps: 48.000000 0.000000
    [avi @ 042ed360] rfps: 48.000000 0.000000
    [avi @ 042ed360] rfps: 51.000000 0.000000
    [avi @ 042ed360] rfps: 54.000000 0.000000
    [avi @ 042ed360] rfps: 54.000000 -0.000000
    [avi @ 042ed360] rfps: 57.000000 0.000000
    [avi @ 042ed360] rfps: 60.000000 0.000000
    [avi @ 042ed360] rfps: 60.000000 0.000000
    [avi @ 042ed360] rfps: 120.000000 0.000000
    [avi @ 042ed360] rfps: 120.000000 -0.000000
    [avi @ 042ed360] rfps: 240.000000 0.000000
    [avi @ 042ed360] rfps: 240.000000 -0.000000
    [avi @ 042ed360] rfps: 23.976024 0.001038
    [avi @ 042ed360] rfps: 23.976024 0.001038
    [avi @ 042ed360] rfps: 29.970030 0.001622
    [avi @ 042ed360] rfps: 29.970030 0.001622
    [avi @ 042ed360] rfps: 59.940060 0.006487
    [avi @ 042ed360] rfps: 59.940060 0.006487
    [avi @ 042ed360] rfps: 11.988012 0.000259
    [avi @ 042ed360] rfps: 11.988012 0.000259
    [avi @ 042ed360] rfps: 14.985015 0.000405
    [avi @ 042ed360] rfps: 14.985015 0.000405
    [avi @ 042ed360] rfps: 47.952048 0.004152
    [avi @ 042ed360] rfps: 47.952048 0.004152
    [avi @ 042ed360] After avformat_find_stream_info() pos: 105829 bytes read:175139 seeks:4 frames:15
    Input #0, avi, from '..\mergedVideoOnly.avi':
     Metadata:
    encoder         : Lavf57.83.100
     Duration: 00:00:25.33, start: 0.000000, bitrate: 113 kb/s
    Stream #0:0, 15, 1/3: Video: scpr (SCPR / 0x52504353), rgb0, 1920x1200, 112 kb/s, 3 fps, 3 tbr, 3 tbn, 3 tbc
    Successfully opened the file.
    Parsing a group of options: input url " "\Storage\0030_0130.wav.
    Successfully parsed a group of options.
    Opening an input file: " "\Storage\1.wav.
    [NULL @ 03be0180] Opening '" "\Storage\1.wav' for reading
    [file @ 03be0820] Setting default whitelist 'file,crypto'
    [wav @ 03be0180] Format wav probed with size=2048 and score=99
    [wav @ 03be0180] Before avformat_find_stream_info() pos: 44 bytes read:65580 seeks:1 nb_streams:1
    [wav @ 03be0180] probing stream 0 pp:32
    [wav @ 03be0180] probing stream 0 pp:31
    [wav @ 03be0180] probing stream 0 pp:30
    [wav @ 03be0180] probing stream 0 pp:29
    [wav @ 03be0180] probing stream 0 pp:28
    [wav @ 03be0180] probing stream 0 pp:27
    [wav @ 03be0180] probing stream 0 pp:26
    [wav @ 03be0180] probing stream 0 pp:25
    [wav @ 03be0180] probing stream 0 pp:24
    [wav @ 03be0180] probing stream 0 pp:23
    [wav @ 03be0180] probing stream 0 pp:22
    [wav @ 03be0180] probing stream 0 pp:21
    [wav @ 03be0180] probing stream 0 pp:20
    [wav @ 03be0180] probing stream 0 pp:19
    [wav @ 03be0180] probing stream 0 pp:18
    [wav @ 03be0180] probing stream 0 pp:17
    [wav @ 03be0180] probing stream 0 pp:16
    [wav @ 03be0180] probing stream 0 pp:15
    [wav @ 03be0180] probing stream 0 pp:14
    [wav @ 03be0180] probing stream 0 pp:13
    [wav @ 03be0180] probing stream 0 pp:12
    [wav @ 03be0180] probing stream 0 pp:11
    [wav @ 03be0180] probing stream 0 pp:10
    [wav @ 03be0180] probing stream 0 pp:9
    [wav @ 03be0180] probing stream 0 pp:8
    [wav @ 03be0180] probing stream 0 pp:7
    [wav @ 03be0180] probing stream 0 pp:6
    [wav @ 03be0180] probing stream 0 pp:5
    [wav @ 03be0180] probing stream 0 pp:4
    [wav @ 03be0180] probing stream 0 pp:3
    [wav @ 03be0180] probing stream 0 pp:2
    [wav @ 03be0180] probing stream 0 pp:1
    [wav @ 03be0180] probed stream 0
    [wav @ 03be0180] parser not found for codec pcm_s16le, packets or times may be invalid.
    [wav @ 03be0180] max_analyze_duration 5000000 reached at 5120000 microseconds st:0
    [wav @ 03be0180] After avformat_find_stream_info() pos: 131116 bytes read:196652 seeks:1 frames:22
    Guessed Channel Layout for Input Stream #1.0 : mono
    Input #1, wav, from '" "\Storage\0030_0130.wav':
     Duration: 00:00:56.80, bitrate: 128 kb/s
    Stream #1:0, 22, 1/8000: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 8000 Hz, mono, s16, 128 kb/s
    Successfully opened the file.
    Parsing a group of options: input url " "\Storage\2.wav.
    Successfully parsed a group of options.
    Opening an input file: " "\Storage\2.wav.
    [NULL @ 03bed760] Opening '" "\Storage\2.wav' for reading
    [file @ 03bb3100] Setting default whitelist 'file,crypto'
    [wav @ 03bed760] Format wav probed with size=2048 and score=99
    [wav @ 03bed760] Before avformat_find_stream_info() pos: 44 bytes read:65580 seeks:1 nb_streams:1
    [wav @ 03bed760] probing stream 0 pp:32
    [wav @ 03bed760] probing stream 0 pp:31
    [wav @ 03bed760] probing stream 0 pp:30
    [wav @ 03bed760] probing stream 0 pp:29
    [wav @ 03bed760] probing stream 0 pp:28
    [wav @ 03bed760] probing stream 0 pp:27
    [wav @ 03bed760] probing stream 0 pp:26
    [wav @ 03bed760] probing stream 0 pp:25
    [wav @ 03bed760] probing stream 0 pp:24
    [wav @ 03bed760] probing stream 0 pp:23
    [wav @ 03bed760] probing stream 0 pp:22
    [wav @ 03bed760] probing stream 0 pp:21
    [wav @ 03bed760] probing stream 0 pp:20
    [wav @ 03bed760] probing stream 0 pp:19
    [wav @ 03bed760] probing stream 0 pp:18
    [wav @ 03bed760] probing stream 0 pp:17
    [wav @ 03bed760] probing stream 0 pp:16
    [wav @ 03bed760] probing stream 0 pp:15
    [wav @ 03bed760] probing stream 0 pp:14
    [wav @ 03bed760] probing stream 0 pp:13
    [wav @ 03bed760] probing stream 0 pp:12
    [wav @ 03bed760] probing stream 0 pp:11
    [wav @ 03bed760] probing stream 0 pp:10
    [wav @ 03bed760] probing stream 0 pp:9
    [wav @ 03bed760] probing stream 0 pp:8
    [wav @ 03bed760] probing stream 0 pp:7
    [wav @ 03bed760] probing stream 0 pp:6
    [wav @ 03bed760] probing stream 0 pp:5
    [wav @ 03bed760] probing stream 0 pp:4
    [wav @ 03bed760] probing stream 0 pp:3
    [wav @ 03bed760] probing stream 0 pp:2
    [wav @ 03bed760] probing stream 0 pp:1
    [wav @ 03bed760] probed stream 0
    [wav @ 03bed760] parser not found for codec pcm_s16le, packets or times may be invalid.
    [wav @ 03bed760] max_analyze_duration 5000000 reached at 5120000 microseconds st:0
    [wav @ 03bed760] After avformat_find_stream_info() pos: 131116 bytes read:196652 seeks:1 frames:22
    Guessed Channel Layout for Input Stream #2.0 : mono
    Input #2, wav, from '" "\Storage\0130_0230.wav':
     Duration: 00:00:59.81, bitrate: 128 kb/s
    Stream #2:0, 22, 1/8000: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 8000 Hz, mono, s16, 128 kb/s
    Successfully opened the file.
    Parsing a group of options: input url " "\Storage\3.wav.
    Successfully parsed a group of options.
    Opening an input file: " "\Storage\3.wav.
    [NULL @ 03bfeea0] Opening '" "\Storage\3.wav' for reading
    [file @ 03bfe8e0] Setting default whitelist 'file,crypto'
    [wav @ 03bfeea0] Format wav probed with size=2048 and score=99
    [wav @ 03bfeea0] Before avformat_find_stream_info() pos: 44 bytes read:65580 seeks:1 nb_streams:1
    [wav @ 03bfeea0] probing stream 0 pp:32
    [wav @ 03bfeea0] probing stream 0 pp:31
    [wav @ 03bfeea0] probing stream 0 pp:30
    [wav @ 03bfeea0] probing stream 0 pp:29
    [wav @ 03bfeea0] probing stream 0 pp:28
    [wav @ 03bfeea0] probing stream 0 pp:27
    [wav @ 03bfeea0] probing stream 0 pp:26
    [wav @ 03bfeea0] probing stream 0 pp:25
    [wav @ 03bfeea0] probing stream 0 pp:24
    [wav @ 03bfeea0] probing stream 0 pp:23
    [wav @ 03bfeea0] probing stream 0 pp:22
    [wav @ 03bfeea0] probing stream 0 pp:21
    [wav @ 03bfeea0] probing stream 0 pp:20
    [wav @ 03bfeea0] probing stream 0 pp:19
    [wav @ 03bfeea0] probing stream 0 pp:18
    [wav @ 03bfeea0] probing stream 0 pp:17
    [wav @ 03bfeea0] probing stream 0 pp:16
    [wav @ 03bfeea0] probing stream 0 pp:15
    [wav @ 03bfeea0] probing stream 0 pp:14
    [wav @ 03bfeea0] probing stream 0 pp:13
    [wav @ 03bfeea0] probing stream 0 pp:12
    [wav @ 03bfeea0] probing stream 0 pp:11
    [wav @ 03bfeea0] probing stream 0 pp:10
    [wav @ 03bfeea0] probing stream 0 pp:9
    [wav @ 03bfeea0] probing stream 0 pp:8
    [wav @ 03bfeea0] probing stream 0 pp:7
    [wav @ 03bfeea0] probing stream 0 pp:6
    [wav @ 03bfeea0] probing stream 0 pp:5
    [wav @ 03bfeea0] probing stream 0 pp:4
    [wav @ 03bfeea0] probing stream 0 pp:3
    [wav @ 03bfeea0] probing stream 0 pp:2
    [wav @ 03bfeea0] probing stream 0 pp:1
    [wav @ 03bfeea0] probed stream 0
    [wav @ 03bfeea0] parser not found for codec pcm_s16le, packets or times may be invalid.
    [wav @ 03bfeea0] max_analyze_duration 5000000 reached at 5120000 microseconds st:0
    [wav @ 03bfeea0] After avformat_find_stream_info() pos: 131116 bytes read:196652 seeks:1 frames:22
    Guessed Channel Layout for Input Stream #3.0 : mono
    Input #3, wav, from '" "\Storage\0230_0330.wav':
     Duration: 00:00:59.81, bitrate: 128 kb/s
    Stream #3:0, 22, 1/8000: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 8000 Hz, mono, s16, 128 kb/s
    Successfully opened the file.
    detected 4 logical cores
    [Parsed_adelay_0 @ 03c0c460] Setting 'delays' to value '30000|30000'
    Parsing a group of options: output url adelay=91000|91000.
    Successfully parsed a group of options.
    Opening an output file: adelay=91000|91000.
    [NULL @ 03c17640] Unable to find a suitable output format for 'adelay=91000|91000'
    adelay=91000|91000: Invalid argument
    [AVIOContext @ 042ee400] Statistics: 175139 bytes read, 4 seeks
    [AVIOContext @ 03be0900] Statistics: 196652 bytes read, 1 seeks
    [AVIOContext @ 03bca7e0] Statistics: 196652 bytes read, 1 seeks
    [AVIOContext @ 03bfe9a0] Statistics: 196652 bytes read, 1 seeks
  • 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