Recherche avancée

Médias (0)

Mot : - Tags -/organisation

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

Autres articles (61)

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

  • Pas question de marché, de cloud etc...

    10 avril 2011

    Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
    sur le web 2.0 et dans les entreprises qui en vivent.
    Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
    Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
    le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
    Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

Sur d’autres sites (6954)

  • FFMPEG Video Cropping slower [duplicate]

    23 juin 2016, par syed imty

    This question already has an answer here :

    I am trying to crop rectangular video into a square one using FFMPEG. The video conversion take too much time.

    For a video of 30 secs, it takes around 60-70secs to convert

    FFMPEG Command

    String commandStr =" -i "+videoPath+"  -vcodec libx264 -b:v 880k -vf crop=" + videoSize.height + ":"+ videoSize.height + ":" + cropStart +":0 -preset ultrafast -strict -2 " +compressedVideoPath;

    Progress Log

    D/ViewRootImpl: ViewPostImeInputStage ACTION_DOWN
    I/System.out: Video converison : /storage/emulated/0/IHH_y/147.mp4 /storage/emulated/0/IHH_y/147upload.mp4  wxh1080:1080:420
    I/System.out: FFMpeg lib onStart
    D/FFmpeg: Running publishing updates method
    I/System.out: FFMpeg lib onProgressWARNING: linker: /data/data/com.x.y/files/ffmpeg has text relocations. This is wasting memory and prevents security hardening. Please fix.
    I/System.out: FFMpeg lib onProgressffmpeg version n2.4.2 Copyright (c) 2000-2014 the FFmpeg developers
    I/System.out: FFMpeg lib onProgress  built on Oct  7 2014 15:08:46 with gcc 4.8 (GCC)
    I/System.out: FFMpeg lib onProgress  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=
    I/System.out: FFMpeg lib onProgress  libavutil      54.  7.100 / 54.  7.100
    I/System.out: FFMpeg lib onProgress  libavcodec     56.  1.100 / 56.  1.100
    I/System.out: FFMpeg lib onProgress  libavformat    56.  4.101 / 56.  4.101
    I/System.out: FFMpeg lib onProgress  libavdevice    56.  0.100 / 56.  0.100
    I/System.out: FFMpeg lib onProgress  libavfilter     5.  1.100 /  5.  1.100
    I/System.out: FFMpeg lib onProgress  libswscale      3.  0.100 /  3.  0.100
    I/System.out: FFMpeg lib onProgress  libswresample   1.  1.100 /  1.  1.100
    I/System.out: FFMpeg lib onProgress  libpostproc    53.  0.100 / 53.  0.100
    I/System.out: FFMpeg lib onProgressInput #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/IHH_y/147.mp4':
    I/System.out: FFMpeg lib onProgress  Metadata:
    I/System.out: FFMpeg lib onProgress    major_brand     : mp42
    I/System.out: FFMpeg lib onProgress    minor_version   : 0
    I/System.out: FFMpeg lib onProgress    compatible_brands: isommp42
    I/System.out: FFMpeg lib onProgress    creation_time   : 2016-06-23 20:00:50
    I/System.out: FFMpeg lib onProgress  Duration: 00:00:08.92, start: 0.000000, bitrate: 8966 kb/s
    I/System.out: FFMpeg lib onProgress    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 8983 kb/s, 16.66 fps, 16.67 tbr, 90k tbn, 180k tbc (default)
    I/System.out: FFMpeg lib onProgress    Metadata:
    I/System.out: FFMpeg lib onProgress      rotate          : 90
    I/System.out: FFMpeg lib onProgress      creation_time   : 2016-06-23 20:00:50
    I/System.out: FFMpeg lib onProgress      handler_name    : VideoHandle
    I/System.out: FFMpeg lib onProgress    Side data:
    I/System.out: FFMpeg lib onProgress      displaymatrix: rotation of -90.00 degrees
    I/System.out: FFMpeg lib onProgress    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 254 kb/s (default)
    I/System.out: FFMpeg lib onProgress    Metadata:
    I/System.out: FFMpeg lib onProgress      creation_time   : 2016-06-23 20:00:50
    I/System.out: FFMpeg lib onProgress      handler_name    : SoundHandle
    I/System.out: FFMpeg lib onProgress[libx264 @ 0xb5e08800] using cpu capabilities: none!
    I/System.out: FFMpeg lib onProgress[libx264 @ 0xb5e08800] profile Constrained Baseline, level 3.2
    I/System.out: FFMpeg lib onProgress[libx264 @ 0xb5e08800] 264 - core 142 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - 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=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=16 scenecut=0 intra_refresh=0 rc=abr mbtree=0 bitrate=880 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
    I/System.out: FFMpeg lib onProgressOutput #0, mp4, to '/storage/emulated/0/IHH_y/147upload.mp4':
    I/System.out: FFMpeg lib onProgress  Metadata:
    I/System.out: FFMpeg lib onProgress    major_brand     : mp42
    I/System.out: FFMpeg lib onProgress    minor_version   : 0
    I/System.out: FFMpeg lib onProgress    compatible_brands: isommp42
    I/System.out: FFMpeg lib onProgress    encoder         : Lavf56.4.101
    I/System.out: FFMpeg lib onProgress    Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1080x1080, q=-1--1, 880 kb/s, 16.67 fps, 12800 tbn, 16.67 tbc (default)
    I/System.out: FFMpeg lib onProgress    Metadata:
    I/System.out: FFMpeg lib onProgress      rotate          : 90
    I/System.out: FFMpeg lib onProgress      creation_time   : 2016-06-23 20:00:50
    I/System.out: FFMpeg lib onProgress      handler_name    : VideoHandle
    I/System.out: FFMpeg lib onProgress      encoder         : Lavc56.1.100 libx264
    I/System.out: FFMpeg lib onProgress    Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, fltp, 128 kb/s (default)
    I/System.out: FFMpeg lib onProgress    Metadata:
    I/System.out: FFMpeg lib onProgress      creation_time   : 2016-06-23 20:00:50
    I/System.out: FFMpeg lib onProgress      handler_name    : SoundHandle
    I/System.out: FFMpeg lib onProgress      encoder         : Lavc56.1.100 aac
    I/System.out: FFMpeg lib onProgressStream mapping:
    I/System.out: FFMpeg lib onProgress  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
    I/System.out: FFMpeg lib onProgress  Stream #0:1 -> #0:1 (aac (native) -> aac (native))
    I/System.out: FFMpeg lib onProgressPress [q] to stop, [?] for help
    I/System.out: FFMpeg lib onProgressframe=    0 fps=0.0 q=0.0 size=       0kB time=00:00:00.96 bitrate=   0.4kbits/s    
    I/System.out: FFMpeg lib onProgressframe=    7 fps=6.8 q=0.0 size=       0kB time=00:00:01.05 bitrate=   0.4kbits/s    
    I/System.out: FFMpeg lib onProgressframe=   15 fps=9.7 q=35.0 size=      87kB time=00:00:01.07 bitrate= 660.5kbits/s    
    I/System.out: FFMpeg lib onProgressframe=   15 fps=7.3 q=35.0 size=      87kB time=00:00:01.88 bitrate= 376.7kbits/s    
    I/System.out: FFMpeg lib onProgressframe=   25 fps=9.6 q=35.0 size=     154kB time=00:00:02.05 bitrate= 613.4kbits/s    
    I/System.out: FFMpeg lib onProgressframe=   32 fps= 10 q=35.0 size=     199kB time=00:00:02.07 bitrate= 784.7kbits/s    
    I/System.out: FFMpeg lib onProgressframe=   32 fps=8.8 q=35.0 size=     199kB time=00:00:02.93 bitrate= 556.4kbits/s    
    I/System.out: FFMpeg lib onProgressframe=   42 fps= 10 q=35.0 size=     263kB time=00:00:03.06 bitrate= 705.2kbits/s    
    I/System.out: FFMpeg lib onProgressframe=   49 fps= 10 q=36.0 size=     328kB time=00:00:03.08 bitrate= 870.9kbits/s    
    I/System.out: FFMpeg lib onProgressframe=   50 fps=9.5 q=36.0 size=     341kB time=00:00:04.06 bitrate= 687.2kbits/s    
    I/System.out: FFMpeg lib onProgressframe=   59 fps= 10 q=36.0 size=     407kB time=00:00:04.06 bitrate= 821.2kbits/s    
    I/System.out: FFMpeg lib onProgressframe=   66 fps= 10 q=36.0 size=     462kB time=00:00:04.10 bitrate= 922.7kbits/s    
    I/System.out: FFMpeg lib onProgressframe=   66 fps=9.7 q=36.0 size=     462kB time=00:00:05.00 bitrate= 757.4kbits/s    
    I/System.out: FFMpeg lib onProgressframe=   77 fps= 10 q=35.0 size=     534kB time=00:00:05.06 bitrate= 864.0kbits/s    
    I/System.out: FFMpeg lib onProgressframe=   83 fps= 11 q=34.0 size=     566kB time=00:00:05.44 bitrate= 850.2kbits/s    
    I/System.out: FFMpeg lib onProgressframe=   89 fps= 11 q=34.0 size=     600kB time=00:00:06.06 bitrate= 810.6kbits/s    
    I/System.out: FFMpeg lib onProgressframe=   95 fps= 11 q=35.0 size=     636kB time=00:00:06.06 bitrate= 859.0kbits/s    
    I/System.out: FFMpeg lib onProgressframe=  100 fps= 11 q=34.0 size=     676kB time=00:00:06.28 bitrate= 881.8kbits/s    
    I/System.out: FFMpeg lib onProgressframe=  104 fps= 11 q=33.0 size=     702kB time=00:00:07.07 bitrate= 812.8kbits/s    
    I/System.out: FFMpeg lib onProgressframe=  114 fps= 11 q=34.0 size=     765kB time=00:00:07.07 bitrate= 885.7kbits/s    
    I/System.out: FFMpeg lib onProgressframe=  117 fps= 11 q=33.0 size=     787kB time=00:00:07.26 bitrate= 887.7kbits/s    
    I/System.out: FFMpeg lib onProgressframe=  117 fps= 10 q=33.0 size=     787kB time=00:00:08.03 bitrate= 802.8kbits/s    
    I/System.out: FFMpeg lib onProgressframe=  129 fps= 11 q=33.0 size=     857kB time=00:00:08.07 bitrate= 869.1kbits/s    
    I/System.out: FFMpeg lib onProgressframe=  138 fps= 11 q=34.0 size=     922kB time=00:00:08.07 bitrate= 935.1kbits/s    
    I/System.out: FFMpeg lib onProgressframe=  140 fps= 11 q=33.0 size=     937kB time=00:00:08.58 bitrate= 894.1kbits/s    
    I/System.out: FFMpeg lib onProgressframe=  144 fps= 11 q=-1.0 Lsize=    1032kB time=00:00:08.96 bitrate= 943.0kbits/s    
    I/System.out: FFMpeg lib onProgressvideo:889kB audio:138kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.512610%
    I/System.out: FFMpeg lib onProgress[libx264 @ 0xb5e08800] frame I:1     Avg QP:33.00  size: 21090
    I/System.out: FFMpeg lib onProgress[libx264 @ 0xb5e08800] frame P:143   Avg QP:34.49  size:  6217
    I/System.out: FFMpeg lib onProgress[libx264 @ 0xb5e08800] mb I  I16..4: 100.0%  0.0%  0.0%
    I/System.out: FFMpeg lib onProgress[libx264 @ 0xb5e08800] mb P  I16..4: 10.3%  0.0%  0.0%  P16..4: 21.2%  0.0%  0.0%  0.0%  0.0%    skip:68.5%
    I/System.out: FFMpeg lib onProgress[libx264 @ 0xb5e08800] final ratefactor: 34.56
    I/System.out: FFMpeg lib onProgress[libx264 @ 0xb5e08800] coded y,uvDC,uvAC intra: 16.9% 5.8% 0.1% inter: 6.2% 0.9% 0.0%
    I/System.out: FFMpeg lib onProgress[libx264 @ 0xb5e08800] i16 v,h,dc,p: 55% 30%  8%  7%
    I/System.out: FFMpeg lib onProgress[libx264 @ 0xb5e08800] i8c dc,h,v,p: 55% 18% 24%  3%
    I/System.out: FFMpeg lib onProgress[libx264 @ 0xb5e08800] kb/s:842.72
    I/System.out: FFMpeg lib onSuccessWARNING: linker: /data/data/com.x.y/files/ffmpeg has text relocations. This is wasting memory and prevents security hardening. Please fix.
    I/System.out: ffmpeg version n2.4.2 Copyright (c) 2000-2014 the FFmpeg developers
    I/System.out:   built on Oct  7 2014 15:08:46 with gcc 4.8 (GCC)
    I/System.out:   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=
    I/System.out:   libavutil      54.  7.100 / 54.  7.100
    I/System.out:   libavcodec     56.  1.100 / 56.  1.100
    I/System.out:   libavformat    56.  4.101 / 56.  4.101
    I/System.out:   libavdevice    56.  0.100 / 56.  0.100
    I/System.out:   libavfilter     5.  1.100 /  5.  1.100
    I/System.out:   libswscale      3.  0.100 /  3.  0.100
    I/System.out:   libswresample   1.  1.100 /  1.  1.100
    I/System.out:   libpostproc    53.  0.100 / 53.  0.100
    I/System.out: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/IHH_y/147.mp4':
    I/System.out:   Metadata:
    I/System.out:     major_brand     : mp42
    I/System.out:     minor_version   : 0
    I/System.out:     compatible_brands: isommp42
    I/System.out:     creation_time   : 2016-06-23 20:00:50
    I/System.out:   Duration: 00:00:08.92, start: 0.000000, bitrate: 8966 kb/s
    I/System.out:     Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 8983 kb/s, 16.66 fps, 16.67 tbr, 90k tbn, 180k tbc (default)
    I/System.out:     Metadata:
    I/System.out:       rotate          : 90
    I/System.out:       creation_time   : 2016-06-23 20:00:50
    I/System.out:       handler_name    : VideoHandle
    I/System.out:     Side data:
    I/System.out:       displaymatrix: rotation of -90.00 degrees
    I/System.out:     Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 254 kb/s (default)
    I/System.out:     Metadata:
    I/System.out:       creation_time   : 2016-06-23 20:00:50
    I/System.out:       handler_name    : SoundHandle
    I/System.out: [libx264 @ 0xb5e08800] using cpu capabilities: none!
    I/System.out: [libx264 @ 0xb5e08800] profile Constrained Baseline, level 3.2
    I/System.out: [libx264 @ 0xb5e08800] 264 - core 142 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - 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=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=16 scenecut=0 intra_refresh=0 rc=abr mbtree=0 bitrate=880 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
    I/System.out: Output #0, mp4, to '/storage/emulated/0/IHH_y/147upload.mp4':
    I/System.out:   Metadata:
    I/System.out:     major_brand     : mp42
    I/System.out:     minor_version   : 0
    I/System.out:     compatible_brands: isommp42
    I/System.out:     encoder         : Lavf56.4.101
    I/System.out:     Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1080x1080, q=-1--1, 880 kb/s, 16.67 fps, 12800 tbn, 16.67 tbc (default)
    I/System.out:     Metadata:
    I/System.out:       rotate          : 90
    I/System.out:       creation_time   : 2016-06-23 20:00:50
    I/System.out:       handler_name    : VideoHandle
    I/System.out:       encoder         : Lavc56.1.100 libx264
    I/System.out:     Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, fltp, 128 kb/s (default)
    I/System.out:     Metadata:
    I/System.out:       creation_time   : 2016-06-23 20:00:50
    I/System.out:       handler_name    : SoundHandle
    I/System.out:       encoder         : Lavc56.1.100 aac
    I/System.out: Stream mapping:
    I/System.out:   Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
    I/System.out:   Stream #0:1 -> #0:1 (aac (native) -> aac (native))
    I/System.out: Press [q] to stop, [?] for help
    I/System.out: frame=    0 fps=0.0 q=0.0 size=       0kB time=00:00:00.96 bitrate=   0.4kbits/s    
    I/System.out: frame=    7 fps=6.8 q=0.0 size=       0kB time=00:00:01.05 bitrate=   0.4kbits/s    
    I/System.out: frame=   15 fps=9.7 q=35.0 size=      87kB time=00:00:01.07 bitrate= 660.5kbits/s    
    I/System.out: frame=   15 fps=7.3 q=35.0 size=      87kB time=00:00:01.88 bitrate= 376.7kbits/s    
    I/System.out: frame=   25 fps=9.6 q=35.0 size=     154kB time=00:00:02.05 bitrate= 613.4kbits/s    
    I/System.out: frame=   32 fps= 10 q=35.0 size=     199kB time=00:00:02.07 bitrate= 784.7kbits/s    
    I/System.out: frame=   32 fps=8.8 q=35.0 size=     199kB time=00:00:02.93 bitrate= 556.4kbits/s    
    I/System.out: frame=   42 fps= 10 q=35.0 size=     263kB time=00:00:03.06 bitrate= 705.2kbits/s    
    I/System.out: frame=   49 fps= 10 q=36.0 size=     328kB time=00:00:03.08 bitrate= 870.9kbits/s    
    I/System.out: frame=   50 fps=9.5 q=36.0 size=     341kB time=00:00:04.06 bitrate= 687.2kbits/s    
    I/System.out: frame=   59 fps= 10 q=36.0 size=     407kB time=00:00:04.06 bitrate= 821.2kbits/s    
    I/System.out: frame=   66 fps= 10 q=36.0 size=     462kB time=00:00:04.10 bitrate= 922.7kbits/s    
    I/System.out: frame=   66 fps=9.7 q=36.0 size=     462kB time=00:00:05.00 bitrate= 757.4kbits/s    
    I/System.out: frame=   77 fps= 10 q=35.0 size=     534kB time=00:00:05.06 bitrate= 864.0kbits/s    
    I/System.out: frame=   83 fps= 11 q=34.0 size=     566kB time=00:00:05.44 bitrate= 850.2kbits/s    
    I/System.out: frame=   89 fps= 11 q=34.0 size=     600kB time=00:00:06.06 bitrate= 810.6kbits/s    
    I/System.out: frame=   95 fps= 11 q=35.0 size=     636kB time=00:00:06.06 bitrate= 859.0kbits/s    
    I/System.out: frame=  100 fps= 11 q=34.0 size=     676kB time=00:00:06.28 bitrate= 881.8kbits/s    
    I/System.out: frame=  104 fps= 11 q=33.0 size=     702kB time=00:00:07.07 bitrate= 812.8kbits/s    
    I/System.out: frame=  114 fps= 11 q=34.0 size=     765kB time=00:00:07.07 bitrate= 885.7kbits/s    
    I/System.out: frame=  117 fps= 11 q=33.0 size=     787kB time=00:00:07.26 bitrate= 887.7kbits/s    
    I/System.out: frame=  117 fps= 10 q=33.0 size=     787kB time=00:00:08.03 bitrate= 802.8kbits/s    
    I/System.out: frame=  129 fps= 11 q=33.0 size=     857kB time=00:00:08.07 bitrate= 869.1kbits/s    
    I/System.out: frame=  138 fps= 11 q=34.0 size=     922kB time=00:00:08.07 bitrate= 935.1kbits/s    
    I/System.out: frame=  140 fps= 11 q=33.0 size=     937kB time=00:00:08.58 bitrate= 894.1kbits/s    
    I/System.out: frame=  144 fps= 11 q=-1.0 Lsize=    1032kB time=00:00:08.96 bitrate= 943.0kbits/s    
    I/System.out: video:889kB audio:138kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.512610%
    I/System.out: [libx264 @ 0xb5e08800] frame I:1     Avg QP:33.00  size: 21090
    I/System.out: [libx264 @ 0xb5e08800] frame P:143   Avg QP:34.49  size:  6217
    I/System.out: [libx264 @ 0xb5e08800] mb I  I16..4: 100.0%  0.0%  0.0%
    I/System.out: [libx264 @ 0xb5e08800] mb P  I16..4: 10.3%  0.0%  0.0%  P16..4: 21.2%  0.0%  0.0%  0.0%  0.0%    skip:68.5%
    I/System.out: [libx264 @ 0xb5e08800] final ratefactor: 34.56
    I/System.out: [libx264 @ 0xb5e08800] coded y,uvDC,uvAC intra: 16.9% 5.8% 0.1% inter: 6.2% 0.9% 0.0%
    I/System.out: [libx264 @ 0xb5e08800] i16 v,h,dc,p: 55% 30%  8%  7%

    As you can see from the log, the conversion fps is very low
    Need help to make it faster.

    Note : The source file is MP4 and output file is MP4 as well

  • Cannot get mp4 video to play in JavaFX app

    23 juin 2016, par CelestialCoyote

    I am trying to use the media player in Java FX to play an mp4 video. I am using the example code from the Oracle. Here is the link.

    http://docs.oracle.com/javafx/2/media/simpleplayer.htm

    I am using the same code with the exception that I want to play the video from my computer rather than going to the internet to get it. I also changed the size of the window to match the size of my video. The video was rendered using FFMPEG with the following parameters.

    ffmpeg -y -r 30 -i ’CellCellCell_Trailer_%05d.jpg’ -r 30 -pix_fmt yuv420p -s 512x512 -vcodec libx264 ’CellCellCell.mp4’

    Could not attach the video to post.

    The video plays in Quicktime and VLC without problems. In the Java App it appears to load, but does not start playing. If I move the time slider, it throws an error, otherwise it just sits there and nothing happens. The file is in a folder called ’media’.

    I have tried several mp4 videos, all with the same results. The player opens, but then does nothing. Any help would be appreciated.

    Here is the code for MediaControl.java file. It is unmodified from the Oracle example.

    package embeddedmediaplayer;

    import javafx.application.Platform;
    import javafx.beans.InvalidationListener;
    import javafx.beans.Observable;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.scene.layout.Priority;
    import javafx.scene.layout.Region;
    import javafx.geometry.Insets;
    import javafx.geometry.Pos;
    import javafx.scene.control.Button;
    import javafx.scene.control.Label;
    import javafx.scene.control.Slider;
    import javafx.scene.layout.BorderPane;
    import javafx.scene.layout.HBox;
    import javafx.scene.layout.Pane;
    import javafx.scene.media.MediaPlayer;
    import javafx.scene.media.MediaPlayer.Status;
    import javafx.scene.media.MediaView;
    import javafx.util.Duration;

    public class MediaControl extends BorderPane {

    private MediaPlayer mp;
    private MediaView mediaView;
    private final boolean repeat = false;
    private boolean stopRequested = false;
    private boolean atEndOfMedia = false;
    private Duration duration;
    private Slider timeSlider;
    private Label playTime;
    private Slider volumeSlider;
    private HBox mediaBar;

    public MediaControl(final MediaPlayer mp) {
       this.mp = mp;
       setStyle("-fx-background-color: #bfc2c7;");
       mediaView = new MediaView(mp);
       Pane mvPane = new Pane() {
       };
       mvPane.getChildren().add(mediaView);
       mvPane.setStyle("-fx-background-color: black;");
       setCenter(mvPane);

       mediaBar = new HBox();
       mediaBar.setAlignment(Pos.CENTER);
       mediaBar.setPadding(new Insets(5, 10, 5, 10));
       BorderPane.setAlignment(mediaBar, Pos.CENTER);

       final Button playButton = new Button(">");

       playButton.setOnAction(new EventHandler<actionevent>() {
           public void handle(ActionEvent e) {
               Status status = mp.getStatus();

               if (status == Status.UNKNOWN || status == Status.HALTED) {
                   // don't do anything in these states
                   return;
               }

               if (status == Status.PAUSED
                       || status == Status.READY
                       || status == Status.STOPPED) {
                   // rewind the movie if we're sitting at the end
                   if (atEndOfMedia) {
                       mp.seek(mp.getStartTime());
                       atEndOfMedia = false;
                   }
                   mp.play();
               } else {
                   mp.pause();
               }
           }
       });
       mp.currentTimeProperty().addListener(new InvalidationListener() {
           public void invalidated(Observable ov) {
               updateValues();
           }
       });

       mp.setOnPlaying(new Runnable() {
           public void run() {
               if (stopRequested) {
                   mp.pause();
                   stopRequested = false;
               } else {
                   playButton.setText("||");
               }
           }
       });

       mp.setOnPaused(new Runnable() {
           public void run() {
               System.out.println("onPaused");
               playButton.setText(">");
           }
       });

       mp.setOnReady(new Runnable() {
           public void run() {
               duration = mp.getMedia().getDuration();
               updateValues();
           }
       });

       mp.setCycleCount(repeat ? MediaPlayer.INDEFINITE : 1);
       mp.setOnEndOfMedia(new Runnable() {
           public void run() {
               if (!repeat) {
                   playButton.setText(">");
                   stopRequested = true;
                   atEndOfMedia = true;
               }
           }
       });

       mediaBar.getChildren().add(playButton);
       // Add spacer
       Label spacer = new Label("   ");
       mediaBar.getChildren().add(spacer);

       // Add Time label
       Label timeLabel = new Label("Time: ");
       mediaBar.getChildren().add(timeLabel);

       // Add time slider
       timeSlider = new Slider();
       HBox.setHgrow(timeSlider, Priority.ALWAYS);
       timeSlider.setMinWidth(50);
       timeSlider.setMaxWidth(Double.MAX_VALUE);
       timeSlider.valueProperty().addListener(new InvalidationListener() {
           public void invalidated(Observable ov) {
               if (timeSlider.isValueChanging()) {
                   // multiply duration by percentage calculated by slider position
                   mp.seek(duration.multiply(timeSlider.getValue() / 100.0));
               }
           }
       });
       mediaBar.getChildren().add(timeSlider);

       // Add Play label
       playTime = new Label();
       playTime.setPrefWidth(130);
       playTime.setMinWidth(50);
       mediaBar.getChildren().add(playTime);

       // Add the volume label
       Label volumeLabel = new Label("Vol: ");
       mediaBar.getChildren().add(volumeLabel);

       // Add Volume slider
       volumeSlider = new Slider();
       volumeSlider.setPrefWidth(70);
       volumeSlider.setMaxWidth(Region.USE_PREF_SIZE);
       volumeSlider.setMinWidth(30);
       volumeSlider.valueProperty().addListener(new InvalidationListener() {
           public void invalidated(Observable ov) {
               if (volumeSlider.isValueChanging()) {
                   mp.setVolume(volumeSlider.getValue() / 100.0);
               }
           }
       });
       mediaBar.getChildren().add(volumeSlider);

       setBottom(mediaBar);
    }

    protected void updateValues() {
       if (playTime != null &amp;&amp; timeSlider != null &amp;&amp; volumeSlider != null) {
           Platform.runLater(new Runnable() {
               public void run() {
                   Duration currentTime = mp.getCurrentTime();
                   playTime.setText(formatTime(currentTime, duration));
                   timeSlider.setDisable(duration.isUnknown());
                   if (!timeSlider.isDisabled()
                           &amp;&amp; duration.greaterThan(Duration.ZERO)
                           &amp;&amp; !timeSlider.isValueChanging()) {
                       timeSlider.setValue(currentTime.divide(duration).toMillis()
                               * 100.0);
                   }
                   if (!volumeSlider.isValueChanging()) {
                       volumeSlider.setValue((int) Math.round(mp.getVolume()
                               * 100));
                   }
               }
           });
       }
    }

    private static String formatTime(Duration elapsed, Duration duration) {
       int intElapsed = (int) Math.floor(elapsed.toSeconds());
       int elapsedHours = intElapsed / (60 * 60);
       if (elapsedHours > 0) {
           intElapsed -= elapsedHours * 60 * 60;
       }
       int elapsedMinutes = intElapsed / 60;
       int elapsedSeconds = intElapsed - elapsedHours * 60 * 60
               - elapsedMinutes * 60;

       if (duration.greaterThan(Duration.ZERO)) {
           int intDuration = (int) Math.floor(duration.toSeconds());
           int durationHours = intDuration / (60 * 60);
           if (durationHours > 0) {
               intDuration -= durationHours * 60 * 60;
           }
           int durationMinutes = intDuration / 60;
           int durationSeconds = intDuration - durationHours * 60 * 60
                   - durationMinutes * 60;
           if (durationHours > 0) {
               return String.format("%d:%02d:%02d/%d:%02d:%02d",
                       elapsedHours, elapsedMinutes, elapsedSeconds,
                       durationHours, durationMinutes, durationSeconds);
           } else {
               return String.format("%02d:%02d/%02d:%02d",
                       elapsedMinutes, elapsedSeconds, durationMinutes,
                       durationSeconds);
           }
       } else {
           if (elapsedHours > 0) {
               return String.format("%d:%02d:%02d", elapsedHours,
                       elapsedMinutes, elapsedSeconds);
           } else {
               return String.format("%02d:%02d", elapsedMinutes,
                       elapsedSeconds);
           }
       }
    }
    }
    </actionevent>

    Here is the code for the EmbeddedMediaPlayer.java file. Only modifications are the file to be played and the size of the window.

    package embeddedmediaplayer;

    import javafx.application.Application;
    import javafx.scene.Group;
    import javafx.scene.Scene;
    import javafx.scene.media.Media;
    import javafx.scene.media.MediaPlayer;
    import javafx.scene.media.MediaView;
    import javafx.scene.Scene;
    import javafx.stage.Stage;

    public class EmbeddedMediaPlayer extends Application {

    //    private static final String MEDIA_URL =
    //            "http://download.oracle.com/otndocs/products/javafx/oow2010-  2.flv";

    private static final String MEDIA_URL =
           "file:./media/CellCellCell.mp4";

    @Override
    public void start(Stage primaryStage) {
       primaryStage.setTitle("Embedded Media Player");
       Group root = new Group();
       Scene scene = new Scene(root, 512, 512);

       // create media player
       Media media = new Media (MEDIA_URL);
       MediaPlayer mediaPlayer = new MediaPlayer(media);
       mediaPlayer.setAutoPlay(true);
       MediaControl mediaControl = new MediaControl(mediaPlayer);
       scene.setRoot(mediaControl);

       primaryStage.setScene(scene);
       primaryStage.show();
    }


    public static void main(String[] args) {
       launch(args);
    }
    }
  • avformat/http: check the auth string contents not the pointer which cannot be NULL

    14 octobre 2013, par Michael Niedermayer
    avformat/http: check the auth string contents not the pointer which cannot be NULL
    

    It appears this bug originates from a "work in progress" patch from
    ffmpeg-devel that was heavily redesigned by and integrated in libav

    And that patch even had a reply and review on the mailing list pointing
    out that it had a bug.

    This fixes a deadlock with ffserver

    See : [FFmpeg-devel] [PATCH] Fix HTTP authentication problem for POST actions.
    [FFmpeg-devel] [PATCH 1/3] Introduce auth_phase flag, which will be true if authorization needs to be sent, but the type of authorization is not known yet Partial fix #3036
    [FFmpeg-devel] [PATCH 2/3] Only add Transfer-Encoding header when not in authorization phase, because server will wait (indefinitely) for data when receiving this header Partial fix #3036
    [FFmpeg-devel] [PATCH 3/3] Only allow posting data and/or forcing a 200 code, enabling posting isml chunks, -after- we did a possible first request to get a 403 from the server telling us which type of authentication to apply Final part fix #3036
    See : 71549a857b13edf4c4f95037de6ed5bb4c4bd4af
    Signed-off-by : Michael Niedermayer <michaelni@gmx.at>

    • [DH] libavformat/http.c