Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (103)

  • Changer son thème graphique

    22 février 2011, par

    Le thème graphique ne touche pas à la disposition à proprement dite des éléments dans la page. Il ne fait que modifier l’apparence des éléments.
    Le placement peut être modifié effectivement, mais cette modification n’est que visuelle et non pas au niveau de la représentation sémantique de la page.
    Modifier le thème graphique utilisé
    Pour modifier le thème graphique utilisé, il est nécessaire que le plugin zen-garden soit activé sur le site.
    Il suffit ensuite de se rendre dans l’espace de configuration du (...)

  • 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

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

Sur d’autres sites (11373)

  • Ffmpeg avs to avi lossless conversion

    21 février 2016, par Piotr

    How to convert avs (Avisynth file) to avi without loss of quality ?

    Firstly, I’m changing avs to 264 :

    ffmpeg -i "Source.avs" -c:v libx264 -preset veryslow -crf 24 "Output.264"

    Secondly, I’m trying to convert 264 to avi :

    ffmpeg -i "input.264" "output.avi"

    Final avi should have almost 200MB, but has only 2MB. 264 file has almost 150MB, so it should be good. I think that I should use some codec in second command, but I don’t know which. I’m trying to change this for a few days, but without effect.

    Or maybe there is a way to lossless conversion without 264, only avs to avi ?

    Thank you for your help.

    Edit :

    Thank you for answers. Unfortunatelly, both methods fail.
    First gives me a video, which is blurry and I can’t see anything on it.

    Output :

    C:\Users\Piotr>"C:\Users\Piotr\Documents\Visual Studio 2010\Projects\SoRecorder\
    SoRecorder\bin\Release\Ffmpeg\ffmpeg.exe" -i "C:\Users\Piotr\Documents\Visual St
    udio 2010\Projects\SoRecorder\SoRecorder\bin\Release\Scripts\-2016-02-20.avs" -c
    copy "E:\-2016-02-20.avi"
    ffmpeg version N-78559-g2e8ad2d Copyright (c) 2000-2016 the FFmpeg developers
     built with gcc 5.3.0 (GCC)
     configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
    isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
    le-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --
    enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-l
    ibilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enab
    le-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --en
    able-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --ena
    ble-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --
    enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-lib
    x265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-d
    ecklink --enable-zlib
     libavutil      55. 17.103 / 55. 17.103
     libavcodec     57. 24.103 / 57. 24.103
     libavformat    57. 25.100 / 57. 25.100
     libavdevice    57.  0.101 / 57.  0.101
     libavfilter     6. 32.100 /  6. 32.100
     libswscale      4.  0.100 /  4.  0.100
     libswresample   2.  0.101 /  2.  0.101
     libpostproc    54.  0.100 / 54.  0.100
    Input #0, avisynth, from 'C:\Users\Piotr\Documents\Visual Studio 2010\Projects\S
    oRecorder\SoRecorder\bin\Release\Scripts\-2016-02-20.avs':
     Duration: 00:00:21.80, start: 0.000000, bitrate: 0 kb/s
       Stream #0:0: Video: rawvideo (BGRA / 0x41524742), bgra, 1280x720, 15 fps, 15
    tbr, 15 tbn, 15 tbc
    [avi @ 048d8cc0] bgra rawvideo cannot be written to avi, output file will be unr
    eadable
    Output #0, avi, to 'E:\-2016-02-20.avi':
     Metadata:
       ISFT            : Lavf57.25.100
       Stream #0:0: Video: rawvideo, bgra, 1280x720, q=2-31, 15 fps, 15 tbr, 15 tbn
    , 15 tbc
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
    Press [q] to stop, [?] for help
    frame=   41 fps=0.0 q=-1.0 size=  147606kB time=00:00:02.73 bitrate=442385.6kbit
    frame=   65 fps= 63 q=-1.0 size=  234006kB time=00:00:04.33 bitrate=442379.5kbit
    frame=   93 fps= 60 q=-1.0 size=  334806kB time=00:00:06.20 bitrate=442376.3kbit
    frame=  110 fps= 51 q=-1.0 size=  396006kB time=00:00:07.33 bitrate=442375.2kbit
    frame=  116 fps= 42 q=-1.0 size=  417606kB time=00:00:07.73 bitrate=442374.9kbit
    frame=  122 fps= 37 q=-1.0 size=  439206kB time=00:00:08.13 bitrate=442374.6kbit
    frame=  128 fps= 33 q=-1.0 size=  460807kB time=00:00:08.53 bitrate=442374.3kbit
    frame=  133 fps= 31 q=-1.0 size=  478807kB time=00:00:08.86 bitrate=442374.1kbit
    frame=  139 fps= 29 q=-1.0 size=  500407kB time=00:00:09.26 bitrate=442373.8kbit
    frame=  145 fps= 27 q=-1.0 size=  522007kB time=00:00:09.66 bitrate=442373.6kbit
    frame=  151 fps= 25 q=-1.0 size=  543607kB time=00:00:10.06 bitrate=442373.5kbit
    frame=  157 fps= 24 q=-1.0 size=  565207kB time=00:00:10.46 bitrate=442373.3kbit
    frame=  163 fps= 23 q=-1.0 size=  586807kB time=00:00:10.86 bitrate=442373.1kbit
    frame=  169 fps= 22 q=-1.0 size=  608407kB time=00:00:11.26 bitrate=442373.0kbit
    frame=  175 fps= 21 q=-1.0 size=  630007kB time=00:00:11.66 bitrate=442372.8kbit
    frame=  181 fps= 21 q=-1.0 size=  651607kB time=00:00:12.06 bitrate=442372.7kbit
    frame=  187 fps= 20 q=-1.0 size=  673207kB time=00:00:12.46 bitrate=442372.6kbit
    frame=  193 fps= 19 q=-1.0 size=  694807kB time=00:00:12.86 bitrate=442372.5kbit
    frame=  199 fps= 19 q=-1.0 size=  716407kB time=00:00:13.26 bitrate=442372.4kbit
    frame=  204 fps= 19 q=-1.0 size=  734407kB time=00:00:13.60 bitrate=442372.3kbit
    frame=  210 fps= 18 q=-1.0 size=  756007kB time=00:00:14.00 bitrate=442372.2kbit
    frame=  215 fps= 18 q=-1.0 size=  774007kB time=00:00:14.33 bitrate=442372.1kbit
    frame=  221 fps= 18 q=-1.0 size=  795607kB time=00:00:14.73 bitrate=442372.1kbit
    frame=  226 fps= 17 q=-1.0 size=  813607kB time=00:00:15.06 bitrate=442372.0kbit
    frame=  232 fps= 17 q=-1.0 size=  835207kB time=00:00:15.46 bitrate=442371.9kbit
    frame=  238 fps= 17 q=-1.0 size=  856807kB time=00:00:15.86 bitrate=442371.8kbit
    frame=  244 fps= 17 q=-1.0 size=  878407kB time=00:00:16.26 bitrate=442371.7kbit
    frame=  250 fps= 16 q=-1.0 size=  900007kB time=00:00:16.66 bitrate=442371.7kbit
    frame=  256 fps= 16 q=-1.0 size=  921608kB time=00:00:17.06 bitrate=442371.6kbit
    frame=  261 fps= 16 q=-1.0 size=  939608kB time=00:00:17.40 bitrate=442371.6kbit
    frame=  267 fps= 16 q=-1.0 size=  961208kB time=00:00:17.80 bitrate=442371.5kbit
    frame=  273 fps= 16 q=-1.0 size=  982808kB time=00:00:18.20 bitrate=442371.5kbit
    frame=  278 fps= 16 q=-1.0 size= 1000808kB time=00:00:18.53 bitrate=442371.4kbit
    frame=  284 fps= 15 q=-1.0 size= 1022408kB time=00:00:18.93 bitrate=442371.4kbit
    frame=  290 fps= 15 q=-1.0 size= 1044008kB time=00:00:19.33 bitrate=442371.3kbit
    frame=  296 fps= 15 q=-1.0 size= 1065615kB time=00:00:19.73 bitrate=442374.1kbit
    frame=  302 fps= 15 q=-1.0 size= 1087215kB time=00:00:20.13 bitrate=442374.0kbit
    frame=  308 fps= 15 q=-1.0 size= 1108815kB time=00:00:20.53 bitrate=442373.9kbit
    frame=  314 fps= 15 q=-1.0 size= 1130415kB time=00:00:20.93 bitrate=442373.8kbit
    frame=  320 fps= 15 q=-1.0 size= 1152015kB time=00:00:21.33 bitrate=442373.7kbit
    frame=  326 fps= 15 q=-1.0 size= 1173615kB time=00:00:21.73 bitrate=442373.7kbit
    frame=  327 fps= 15 q=-1.0 Lsize= 1177215kB time=00:00:21.80 bitrate=442373.8kbi
    ts/s speed=0.967x
    video:1177200kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxi
    ng overhead: 0.001301%

    EDIT : Output after PNG command :

    C:\Users\Piotr>"C:\Users\Piotr\Documents\Visual Studio 2010\Projects\SoRecorder\
    SoRecorder\bin\Release\Ffmpeg\ffmpeg.exe" -i "C:\Users\Piotr\Documents\Visual St
    udio 2010\Projects\SoRecorder\SoRecorder\bin\Release\Scripts\-2016-02-21--1.avs"
    -c:v png -pix_fmt bgra "E:\-2016-02-21.avi"
    ffmpeg version N-78559-g2e8ad2d Copyright (c) 2000-2016 the FFmpeg developers
     built with gcc 5.3.0 (GCC)
     configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
    isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
    le-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --
    enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-l
    ibilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enab
    le-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --en
    able-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --ena
    ble-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --
    enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-lib
    x265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-d
    ecklink --enable-zlib
     libavutil      55. 17.103 / 55. 17.103
     libavcodec     57. 24.103 / 57. 24.103
     libavformat    57. 25.100 / 57. 25.100
     libavdevice    57.  0.101 / 57.  0.101
     libavfilter     6. 32.100 /  6. 32.100
     libswscale      4.  0.100 /  4.  0.100
     libswresample   2.  0.101 /  2.  0.101
     libpostproc    54.  0.100 / 54.  0.100
    Input #0, avisynth, from 'C:\Users\Piotr\Documents\Visual Studio 2010\Projects\S
    oRecorder\SoRecorder\bin\Release\Scripts\-2016-02-21--1.avs':
     Duration: 00:00:25.07, start: 0.000000, bitrate: 0 kb/s
       Stream #0:0: Video: rawvideo (BGRA / 0x41524742), bgra, 640x480, 30 fps, 30
    tbr, 30 tbn, 30 tbc
    Incompatible pixel format 'bgra' for codec 'png', auto-selecting format 'rgba'
    Output #0, avi, to 'E:\-2016-02-21.avi':
     Metadata:
       ISFT            : Lavf57.25.100
       Stream #0:0: Video: png (MPNG / 0x474E504D), rgba, 640x480, q=2-31, 200 kb/s
    , 30 fps, 30 tbn, 30 tbc
       Metadata:
         encoder         : Lavc57.24.103 png
    Stream mapping:
     Stream #0:0 -> #0:0 (rawvideo (native) -> png (native))
    Press [q] to stop, [?] for help
    frame=   18 fps=0.0 q=-0.0 size=   10716kB time=00:00:00.46 bitrate=188119.0kbit
    frame=   35 fps= 34 q=-0.0 size=   23722kB time=00:00:01.03 bitrate=188065.8kbit
    frame=   48 fps= 27 q=-0.0 size=   33668kB time=00:00:01.46 bitrate=188052.7kbit
    frame=   61 fps= 26 q=-0.0 size=   43614kB time=00:00:01.90 bitrate=188045.7kbit
    frame=   74 fps= 26 q=-0.0 size=   53560kB time=00:00:02.33 bitrate=188041.3kbit
    frame=   89 fps= 26 q=-0.0 size=   65036kB time=00:00:02.83 bitrate=188037.8kbit
    frame=  106 fps= 27 q=-0.0 size=   78042kB time=00:00:03.40 bitrate=188035.1kbit
    frame=  123 fps= 28 q=-0.0 size=   91048kB time=00:00:03.96 bitrate=188033.2kbit
    frame=  137 fps= 28 q=-0.0 size=  101759kB time=00:00:04.43 bitrate=188032.0kbit
    frame=  155 fps= 28 q=-0.0 size=  115530kB time=00:00:05.03 bitrate=188030.8kbit
    frame=  186 fps= 31 q=-0.0 size=  125735kB time=00:00:06.06 bitrate=169783.8kbit
    frame=  224 fps= 35 q=-0.0 size=  133831kB time=00:00:07.33 bitrate=149501.7kbit
    frame=  261 fps= 37 q=-0.0 size=  142679kB time=00:00:08.56 bitrate=136438.4kbit
    frame=  300 fps= 40 q=-0.0 size=  151249kB time=00:00:09.86 bitrate=125577.5kbit
    frame=  338 fps= 42 q=-0.0 size=  159452kB time=00:00:11.13 bitrate=117326.2kbit
    frame=  371 fps= 44 q=-0.0 size=  169169kB time=00:00:12.23 bitrate=113283.3kbit
    frame=  407 fps= 45 q=-0.0 size=  178924kB time=00:00:13.43 bitrate=109112.3kbit
    frame=  444 fps= 47 q=-0.0 size=  187571kB time=00:00:14.66 bitrate=104767.1kbit
    frame=  488 fps= 49 q=-0.0 size=  194672kB time=00:00:16.13 bitrate=98848.5kbits
    frame=  535 fps= 51 q=-0.0 size=  199781kB time=00:00:17.70 bitrate=92463.5kbits
    frame=  569 fps= 52 q=-0.0 size=  208530kB time=00:00:18.83 bitrate=90705.2kbits
    frame=  604 fps= 52 q=-0.0 size=  216658kB time=00:00:20.00 bitrate=88743.0kbits
    frame=  622 fps= 52 q=-0.0 size=  229851kB time=00:00:20.60 bitrate=91404.7kbits
    frame=  639 fps= 51 q=-0.0 size=  242857kB time=00:00:21.16 bitrate=93991.3kbits
    frame=  656 fps= 50 q=-0.0 size=  255863kB time=00:00:21.73 bitrate=96443.0kbits
    frame=  673 fps= 49 q=-0.0 size=  268869kB time=00:00:22.30 bitrate=98770.1kbits
    frame=  690 fps= 49 q=-0.0 size=  281875kB time=00:00:22.86 bitrate=100981.9kbit
    frame=  707 fps= 48 q=-0.0 size=  294881kB time=00:00:23.43 bitrate=103086.7kbit
    frame=  724 fps= 48 q=-0.0 size=  307887kB time=00:00:24.00 bitrate=105092.1kbit
    frame=  741 fps= 47 q=-0.0 size=  320893kB time=00:00:24.56 bitrate=107005.0kbit
    frame=  752 fps= 46 q=-0.0 Lsize=  332381kB time=00:00:25.06 bitrate=108624.9kbi
    ts/s speed=1.54x
    video:332357kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxin
    g overhead: 0.007042%
  • Conversion does not end using ffmpeg on Android device

    3 février 2016, par Belhaver

    I am trying to make an application with usage of ffmpeg-android-java https://github.com/WritingMinds/ffmpeg-android-java and i have a problem. File conversion just does not end.

    Here is code which i am using :

    try {
       // code...
           String commandStr = "-y -i /storage/emulated/0/input.mp4 -strict experimental -s " + fileWidth + "x" + fileHeight + " -vcodec libx264 -r 30 /storage/emulated/0/output.mp4";

           ffmpeg.execute(commandStr, new ExecuteBinaryResponseHandler() {
               @Override
               public void onSuccess(String message) {
                   Log.d("FFMPEG success", "");
                   // code...
               }

               @Override
               public void onFailure(String message) {

                   Log.d("FFMPEG failure: ", message);
                   // code...
               }

               @Override
               public void onProgress(String message) {
                   Log.d("FFMPEG process: ", message);
               }

               @Override
               public void onFinish() {
                   Log.d("FFMPEG done", "");
               }
           });
       } catch (Throwable e) {
           e.printStackTrace();
       }

    Here is the output process :

    FFMPEG process:: WARNING: linker: /data/data/pl.tradesoft.testowa/files/ffmpeg has text relocations. This is wasting memory and prevents security hardening. Please fix.
    FFMPEG process:: ffmpeg version n2.4.2 Copyright (c) 2000-2014 the FFmpeg developers
    FFMPEG process::   built on Oct  7 2014 15:08:46 with gcc 4.8 (GCC)
    FFMPEG process::   configuration: --target-os=linux --cross-prefix=/home/sb/Source-Code/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/sb/Source-Code/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/sb/Source-Code/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/sb/Source-Code/ffmpeg-android/build/armeabi-v7a-neon --extra-cflags='-I/home/sb/Source-Code/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all -mfpu=neon' --extra-ldflags='-L/home/sb/Source-Code/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
    FFMPEG process::   libavutil      54.  7.100 / 54.  7.100
    FFMPEG process::   libavcodec     56.  1.100 / 56.  1.100
    FFMPEG process::   libavformat    56.  4.101 / 56.  4.101
    FFMPEG process::   libavdevice    56.  0.100 / 56.  0.100
    FFMPEG process::   libavfilter     5.  1.100 /  5.  1.100
    FFMPEG process::   libswscale      3.  0.100 /  3.  0.100
    FFMPEG process::   libswresample   1.  1.100 /  1.  1.100
    FFMPEG process::   libpostproc    53.  0.100 / 53.  0.100
    FFMPEG process:: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/input.mp4':
    FFMPEG process::   Metadata:
    FFMPEG process::     major_brand     : isom
    FFMPEG process::     minor_version   : 512
    FFMPEG process::     compatible_brands: isomiso2avc1mp41
    FFMPEG process::     encoder         : Lavf54.63.104
    FFMPEG process::   Duration: 00:01:00.35, start: 0.000000, bitrate: 3267 kb/s
    FFMPEG process::     Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1368x768 [SAR 1:1 DAR 57:32], 3258 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
    FFMPEG process::     Metadata:
    FFMPEG process::       handler_name    : VideoHandler
    FFMPEG process::     Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 3 kb/s (default)
    FFMPEG process::     Metadata:
    FFMPEG process::       handler_name    : SoundHandler
    FFMPEG process:: [libx264 @ 0xb5e08800] using SAR=1/1
    FFMPEG process:: [libx264 @ 0xb5e08800] using cpu capabilities: none!
    FFMPEG process:: [libx264 @ 0xb5e08800] profile High, level 3.2
    FFMPEG process:: [libx264 @ 0xb5e08800] 264 - core 142 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    FFMPEG process:: Output #0, mp4, to '/storage/emulated/0/output.mp4':
    FFMPEG process::   Metadata:
    FFMPEG process::     major_brand     : isom
    FFMPEG process::     minor_version   : 512
    FFMPEG process::     compatible_brands: isomiso2avc1mp41
    FFMPEG process::     encoder         : Lavf56.4.101
    FFMPEG process::     Stream #0:0(und): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1368x768 [SAR 1:1 DAR 57:32], q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)
    FFMPEG process::     Metadata:
    FFMPEG process::       handler_name    : VideoHandler
    FFMPEG process::       encoder         : Lavc56.1.100 libx264
    FFMPEG process::     Stream #0:1(und): Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz, stereo, fltp, 128 kb/s (default)
    FFMPEG process::     Metadata:
    FFMPEG process::       handler_name    : SoundHandler
    FFMPEG process::       encoder         : Lavc56.1.100 aac
    FFMPEG process:: Stream mapping:
    FFMPEG process::   Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
    FFMPEG process::   Stream #0:1 -> #0:1 (aac (native) -> aac (native))
    FFMPEG process:: Press [q] to stop, [?] for help
    FFMPEG process:: frame=   16 fps=0.0 q=0.0 size=       0kB time=00:00:00.62 bitrate=   0.6kbits/s    
    FFMPEG process:: frame=   31 fps= 30 q=0.0 size=       0kB time=00:00:01.11 bitrate=   0.3kbits/s    

    .......

    FFMPEG process:: frame= 1801 fps=2.7 q=29.0 size=    4550kB time=00:01:00.11 bitrate= 620.0kbits/s    
    FFMPEG process:: frame= 1805 fps=2.7 q=29.0 size=    4552kB time=00:01:00.25 bitrate= 618.8kbits/s    
    FFMPEG process:: frame= 1808 fps=2.7 q=29.0 size=    4555kB time=00:01:00.30 bitrate= 618.8kbits/s    
    FFMPEG process:: frame= 1810 fps=2.7 q=-1.0 Lsize=    4640kB time=00:01:00.34 bitrate= 629.9kbits/s    
    FFMPEG process:: video:4561kB audio:15kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.407034%
    FFMPEG process:: [libx264 @ 0xb5e08800] frame I:8     Avg QP:16.53  size:114657
    FFMPEG process:: [libx264 @ 0xb5e08800] frame P:571   Avg QP:19.19  size:  5161
    FFMPEG process:: [libx264 @ 0xb5e08800] frame B:1231  Avg QP:26.30  size:   654
    FFMPEG process:: [libx264 @ 0xb5e08800] consecutive B-frames:  8.7%  1.3%  1.3% 88.6%
    FFMPEG process:: [libx264 @ 0xb5e08800] mb I  I16..4: 19.9% 33.4% 46.7%
    FFMPEG process:: [libx264 @ 0xb5e08800] mb P  I16..4:  1.7%  2.3%  0.5%  P16..4: 16.5%  2.5%  2.0%  0.0%  0.0%    skip:74.5%
    FFMPEG process:: [libx264 @ 0xb5e08800] mb B  I16..4:  0.1%  0.1%  0.0%  B16..8:  5.8%  0.4%  0.1%  direct: 0.2%  skip:93.2%  L0:37.8% L1:59.7% BI: 2.5%
    FFMPEG process:: [libx264 @ 0xb5e08800] 8x8 transform intra:47.6% inter:79.3%
    FFMPEG process:: [libx264 @ 0xb5e08800] coded y,uvDC,uvAC intra: 38.4% 73.1% 35.2% inter: 2.0% 4.6% 0.4%
    FFMPEG process:: [libx264 @ 0xb5e08800] i16 v,h,dc,p: 40% 30% 15% 16%
    FFMPEG process:: [libx264 @ 0xb5e08800] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 15% 38%  5%  6%  3%  3%  3%  4%
    FFMPEG process:: [libx264 @ 0xb5e08800] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 30% 26% 18%  5%  6%  4%  4%  3%  3%
    FFMPEG process:: [libx264 @ 0xb5e08800] i8c dc,h,v,p: 40% 25% 29%  7%
    FFMPEG process:: [libx264 @ 0xb5e08800] Weighted P-Frames: Y:2.6% UV:2.6%
    FFMPEG process:: [libx264 @ 0xb5e08800] ref P L0: 68.8%  8.0% 15.3%  7.5%  0.5%
    FFMPEG process:: [libx264 @ 0xb5e08800] ref B L0: 85.0% 12.4%  2.6%
    FFMPEG process:: [libx264 @ 0xb5e08800] ref B L1: 94.1%  5.9%
    FFMPEG process:: [libx264 @ 0xb5e08800] kb/s:619.16

    And that’s all, nothing more is showing up. I was trying to change codec etc. and it didn’t work. Do you have any idea how can i resolve that problem ?

  • Building my JAVA parameter array for FFMPEG

    29 janvier 2016, par user3541092

    FFmpeg Version : N-63893-gc69defd Copyright (c) 2000-2014 the FFmpeg developers
    built on Jul 16 2014 05:38:01 with gcc 4.6 (Debian 4.6.3-1)

    Machine : Amazon Linux t2.micro (free tier)

    Sample File : sample_iTunes.mov
    Sample File URL : https://support.apple.com/en-us/HT201549

    I’m trying to replicate the following FFmpeg command, using a string array and then pass this array into the Runtime.getRuntime().exec().

    ffmpeg -i file:/var/local/ffmpegtest/media_input/sample_iTunes.mov -pix_fmt yuv420p -c:v libx264 -vtag mp42 -metadata major_brand="mp42" -b:v 8000k -minrate 8000k -maxrate 10000k -ac 2 -strict experimental -c:a aac -b:a 256k -metadata:s:a:0 handler="Stereo" /var/local/ffmpegtest/media_output/sample_iTunes.mp4 -y

    NOTE : This works when I pass the full command, as a single string into Runtime.getRuntime().exec().

       String _cmd = "ffmpeg -i %s -pix_fmt yuv420p -c:v libx264 -vtag mp42 -metadata major_brand=\"mp42\" "
               + "-b:v 8000k -minrate 8000k -maxrate 10000k -ac 2 -strict experimental -c:a aac -b:a 256k -metadata:s:a:0 handler=\"Stereo\" %s -y";
       String _ffmpegCommand = String.format(_cmd, _inputFile, _outPutFile);
       p = Runtime.getRuntime().exec(_ffmpegCommand);
       BufferedReader _reader = new BufferedReader(new InputStreamReader(p.getErrorStream()));

       String _line = null;

       while((_line = _reader.readLine()) != null) {
           lw.writeLine(_logPath + _logName, _line);
           System.out.println(_line);
       }

    I started out with just a basic parameter list. As I add add each additional parameter, I re-build the JAR file and upload it to my EC2 instance to test for any errors.

    The following string array works :

    try
           {
               String[] _params = {"ffmpeg",
                          "-i",
                          String.format("%s", _inputFile),
                          "-pix_fmt",
                          "yuv420p",
                          "-c:v",
                          "libx264",
                          String.format("%s", _outPutFile),
                          "-y"};

               p = Runtime.getRuntime().exec(_params);

               BufferedReader _reader = new BufferedReader(new InputStreamReader(p.getErrorStream()));

               String _line = null;

               while((_line = _reader.readLine()) != null) {
                   lw.writeLine(_logPath + _logName, _line);
                   System.out.println(_line);
               }
           }
           catch (Exception e) {
               BufferedReader _reader = new BufferedReader(new InputStreamReader(p.getErrorStream()));

               String _line = null;

               while((_line = _reader.readLine()) != null) {
                   lw.writeLine(_logPath + _logName, _line);
                   System.out.println(_line);
               }

           }

    However, when I continue to build the array with additional parameters, I begin to experience problems (lets add -vtag mp42) :

    try
           {
               String[] _params = {"ffmpeg",
                          "-i",
                          String.format("%s", _inputFile),
                          "-pix_fmt",
                          "yuv420p",
                          "-c:v",
                          "libx264",
                          "-vtag", // <---- New
                          "mp42", // <---  New
                          String.format("%s", _outPutFile),
                          "-y"};

               p = Runtime.getRuntime().exec(_params);

               BufferedReader _reader = new BufferedReader(new InputStreamReader(p.getErrorStream()));

               String _line = null;

               while((_line = _reader.readLine()) != null) {
                   lw.writeLine(_logPath + _logName, _line);
                   System.out.println(_line);
               }
           }
           catch (Exception e) {
               BufferedReader _reader = new BufferedReader(new InputStreamReader(p.getErrorStream()));

               String _line = null;

               while((_line = _reader.readLine()) != null) {
                   lw.writeLine(_logPath + _logName, _line);
                   System.out.println(_line);
               }

           }

    Error Message : Could not write header for output file #0 (incorrect codec parameters ?) : Invalid data found when processing input

    Full Log output for errant trail run :

    29 Jan 2016 03:45:09 UTC - Running FFMpeg...
    29 Jan 2016 03:45:09 UTC -  Input file: /var/local/ffmpegtest/media_input/sample_iTunes.mov
    29 Jan 2016 03:45:09 UTC -  Output file: /var/local/ffmpegtest/media_output/sample_iTunes.mp4
    29 Jan 2016 03:45:09 UTC - ffmpeg version N-63893-gc69defd Copyright (c) 2000-2014 the FFmpeg developers
    29 Jan 2016 03:45:09 UTC -   built on Jul 16 2014 05:38:01 with gcc 4.6 (Debian 4.6.3-1)
    29 Jan 2016 03:45:09 UTC -   configuration: --prefix=/root/ffmpeg-static/64bit --extra-cflags='-I/root/ffmpeg-static/64bit/include -static' --extra-ldflags='-L/root/ffmpeg-static/64bit/lib -static' --extra-libs='-lxml2 -lexpat -lfreetype' --enable-static --disable-shared --disable-ffserver --disable-doc --enable-bzlib --enable-zlib --enable-postproc --enable-runtime-cpudetect --enable-libx264 --enable-gpl --enable-libtheora --enable-libvorbis --enable-libmp3lame --enable-gray --enable-libass --enable-libfreetype --enable-libopenjpeg --enable-libspeex --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-version3 --enable-libvpx
    29 Jan 2016 03:45:09 UTC -   libavutil      52. 89.100 / 52. 89.100
    29 Jan 2016 03:45:09 UTC -   libavcodec     55. 66.101 / 55. 66.101
    29 Jan 2016 03:45:09 UTC -   libavformat    55. 43.100 / 55. 43.100
    29 Jan 2016 03:45:09 UTC -   libavdevice    55. 13.101 / 55. 13.101
    29 Jan 2016 03:45:09 UTC -   libavfilter     4.  8.100 /  4.  8.100
    29 Jan 2016 03:45:09 UTC -   libswscale      2.  6.100 /  2.  6.100
    29 Jan 2016 03:45:09 UTC -   libswresample   0. 19.100 /  0. 19.100
    29 Jan 2016 03:45:09 UTC -   libpostproc    52.  3.100 / 52.  3.100
    29 Jan 2016 03:45:09 UTC - Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/var/local/ffmpegtest/media_input/sample_iTunes.mov':
    29 Jan 2016 03:45:09 UTC -   Metadata:
    29 Jan 2016 03:45:09 UTC -     major_brand     : qt  
    29 Jan 2016 03:45:09 UTC -     minor_version   : 537199360
    29 Jan 2016 03:45:09 UTC -     compatible_brands: qt  
    29 Jan 2016 03:45:09 UTC -     creation_time   : 2005-10-17 22:54:32
    29 Jan 2016 03:45:09 UTC -   Duration: 00:01:25.50, start: 0.000000, bitrate: 307 kb/s
    29 Jan 2016 03:45:09 UTC -     Stream #0:0(eng): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 261 kb/s, 10 fps, 10 tbr, 3k tbn, 25 tbc (default)
    29 Jan 2016 03:45:09 UTC -     Metadata:
    29 Jan 2016 03:45:09 UTC -       creation_time   : 2005-10-17 22:54:33
    29 Jan 2016 03:45:09 UTC -       handler_name    : Apple Video Media Handler
    29 Jan 2016 03:45:09 UTC -       encoder         : 3ivx D4 4.5.1
    29 Jan 2016 03:45:09 UTC -     Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 32000 Hz, mono, fltp, 43 kb/s (default)
    29 Jan 2016 03:45:09 UTC -     Metadata:
    29 Jan 2016 03:45:09 UTC -       creation_time   : 2005-10-17 22:54:34
    29 Jan 2016 03:45:09 UTC -       handler_name    : Apple Sound Media Handler
    29 Jan 2016 03:45:09 UTC - [libx264 @ 0x30c2c00] using SAR=1/1
    29 Jan 2016 03:45:09 UTC - [libx264 @ 0x30c2c00] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX AVX2 FMA3 BMI1 BMI2
    29 Jan 2016 03:45:09 UTC - [libx264 @ 0x30c2c00] profile High, level 2.2
    29 Jan 2016 03:45:09 UTC - [libx264 @ 0x30c2c00] 264 - core 129 r2230 1cffe9f - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=1 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=10 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    29 Jan 2016 03:45:09 UTC - [mp4 @ 0x30c21a0] Tag mp42/0x3234706d incompatible with output codec id '28' ([33][0][0][0])
    29 Jan 2016 03:45:09 UTC - Output #0, mp4, to '/var/local/ffmpegtest/media_output/sample_iTunes.mp4':
    29 Jan 2016 03:45:09 UTC -   Metadata:
    29 Jan 2016 03:45:09 UTC -     major_brand     : qt  
    29 Jan 2016 03:45:09 UTC -     minor_version   : 537199360
    29 Jan 2016 03:45:09 UTC -     compatible_brands: qt  
    29 Jan 2016 03:45:09 UTC -     Stream #0:0(eng): Video: h264 (libx264) (mp42 / 0x3234706D), yuv420p, 640x480 [SAR 1:1 DAR 4:3], q=-1--1, 10 fps, 90k tbn, 10 tbc (default)
    29 Jan 2016 03:45:09 UTC -     Metadata:
    29 Jan 2016 03:45:09 UTC -       creation_time   : 2005-10-17 22:54:33
    29 Jan 2016 03:45:09 UTC -       handler_name    : Apple Video Media Handler
    29 Jan 2016 03:45:09 UTC -       encoder         : Lavc55.66.101 libx264
    29 Jan 2016 03:45:09 UTC -     Stream #0:1(eng): Audio: aac (libvo_aacenc), 32000 Hz, mono, s16, 128 kb/s (default)
    29 Jan 2016 03:45:09 UTC -     Metadata:
    29 Jan 2016 03:45:09 UTC -       creation_time   : 2005-10-17 22:54:34
    29 Jan 2016 03:45:09 UTC -       handler_name    : Apple Sound Media Handler
    29 Jan 2016 03:45:09 UTC -       encoder         : Lavc55.66.101 libvo_aacenc
    29 Jan 2016 03:45:09 UTC - Stream mapping:
    29 Jan 2016 03:45:09 UTC -   Stream #0:0 -> #0:0 (mpeg4 (native) -> h264 (libx264))
    29 Jan 2016 03:45:09 UTC -   Stream #0:1 -> #0:1 (aac (native) -> aac (libvo_aacenc))
    29 Jan 2016 03:45:09 UTC - Could not write header for output file #0 (incorrect codec parameters ?): Invalid data found when processing input