Recherche avancée

Médias (1)

Mot : - Tags -/copyleft

Autres articles (64)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

Sur d’autres sites (11220)

  • ffmpeg android java. Unable to use single and regular quotes

    14 février 2016, par MalusDarkb

    First off, in the long run I want to implement a speedometer for a MP4 file using Android. I did some research and apparently the best way to do that is through FFmpeg. I decided on using this library : https://github.com/WritingMinds/ffmpeg-android-java . It implements FFmpeg for Android. It was quite simple to include into my project. (Instructions : http://writingminds.github.io/ffmpeg-android-java/)

    I use the following method. As cmd I am using a String in Quotations marks

       ffmpeg.execute(cmd, new ExecuteBinaryResponseHandler() {
       ...
       };

    Now I was trying to overlay some dynamic text over an MP4 file. I thought I would start trying it with a timestamp. For a timestamp something like this is needed : ... timecode=’02:36:17~;00’ ...

    My Problem is I am getting this error " Unable to find a suitable output format for ’’’. It doesn’t matter if i try to use "\" (escaping) or if i try to use regular quotes. Whenever I use some kind of quotation mark I am getting an error. That makes it impossible to use an dynamic timestamp. I think.

    Does anyone have an idea as to how I can fix this ? Keep in mind the timecode is within a String in an Android(Java) class.

    Thanks in advance for your help

    EDIT :

    Can someone provide me with a working command ? The cmd 1-3 work, but 4 and 5 don’t work (even as String[]).

       String cmd1 = "-i /storage/emulated/0/dir1/dir2/TestVideo.MP4 -i /storage/emulated/0/dir1/dir2/logo.png -preset ultrafast -filter_complex overlay=10:main_h-overlay_h-10 -acodec: copy /storage/emulated/0/dir1/dir2/LogoOverlay1.mp4";// working PNG overlay

       String cmd2 = "-i /storage/emulated/0/dir1/dir2/TestVideo.MP4 -i /storage/emulated/0/dir1/dir2/logo.png -preset ultrafast -filter_complex overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2 -acodec: copy /storage/emulated/0/dir1/dir2/LogoOverlay2.mp4";// working PNG overlay

       String cmd3 = "-i /storage/emulated/0/dir1/dir2/TestVideo.MP4 -i /storage/emulated/0/dir1/dir2/logo.png -preset ultrafast -filter_complex [0:v][1:v]overlay=main_w-overlay_w-10:main_h-overlay_h-10[out] -map [out] -map 0:a -acodec: copy /storage/emulated/0/dir1/dir2/LogoOverlay3.mp4";// working PNG overlay

       String cmd4 = "-i /storage/emulated/0/dir1/dir2/TestVideo2.MP4 -vf drawtext=fontfile=/usr/share/fonts/TTF/Vera.ttf: text=\'Stack Overflow\': fontcolor=white: fontsize=24: box=1: boxcolor=black: x=(w-text_w)/2: y=(h-text_h-line_h)/2\"  -acodec: copy /storage/emulated/0/dir1/dir2/TextOverlay.mp4";

       String cmd5 = "-i /storage/emulated/0/dir1/dir2/TestVideo2.MP4 -vf \'transpose=1\' /storage/emulated/0/dir1/dir2/rotated.mp4"; //rotate video

       String[] cmd4arr = new String[]{"-i", "/storage/emulated/0/dir1/dir2/TestVideo.MP4", "-vf", "drawtext=fontfile=/usr/share/fonts/TTF/Vera.ttf: text='Stack Overflow': fontcolor=white: fontsize=24: box=1: boxcolor=black: x=(w-text_w)/2: y=(h-text_h-line_h)/2", "-acodec:", "copy /storage/emulated/0/dir1/dir2/TextOverlay.mp4"};

       String[] cmd5arr = new String[]{"-i", "/storage/emulated/0/dir1/dir2/TestVideo2.MP4","-preset","ultrafast", "-vf", "\'transpose=1\'", "/storage/emulated/0/dir1/dir2/rotated.mp4"};


       String[] cmd4ArrAlt = new String[]{"-i", "/storage/extSdCard/DCIM/Camera/Test.MP4", "-vf", "drawtext=fontfile=/usr/share/fonts/TTF/Vera.ttf:", "text=\'Stack Overflow\':", "fontcolor=white:", "fontsize=24:", "box=1:", "boxcolor=black:", "x=(w-text_w)/2:", "y=(h-text_h-line_h)/2", "-acodec:", "copy", "/storage/emulated/0/dir/TextOverlay.mp4"};

    cmd4arr produces this Log :

       .../MainActivity﹕ onProgress ffmpeg version n2.4.2 Copyright (c) 2000-2014 the FFmpeg developers
       .../MainActivity﹕ onProgress   built on Oct  7 2014 15:08:46 with gcc 4.8 (GCC)
       .../MainActivity﹕ 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=
       .../MainActivity﹕ onProgress   libavutil      54.  7.100 / 54.  7.100
       .../MainActivity﹕ onProgress   libavcodec     56.  1.100 / 56.  1.100
       .../MainActivity﹕ onProgress   libavformat    56.  4.101 / 56.  4.101
       .../MainActivity﹕ onProgress   libavdevice    56.  0.100 / 56.  0.100
       .../MainActivity﹕ onProgress   libavfilter     5.  1.100 /  5.  1.100
       .../MainActivity﹕ onProgress   libswscale      3.  0.100 /  3.  0.100
       .../MainActivity﹕ onProgress   libswresample   1.  1.100 /  1.  1.100
       .../MainActivity﹕ onProgress   libpostproc    53.  0.100 / 53.  0.100
       .../MainActivity﹕ onProgress Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/dir1/dir2/TestVideo2.MP4':
       .../MainActivity﹕ onProgress   Metadata:
       .../MainActivity﹕ onProgress     major_brand     : isom
       .../MainActivity﹕ onProgress     minor_version   : 512
       .../MainActivity﹕ onProgress     compatible_brands: isomiso2mp41
       .../MainActivity﹕ onProgress     creation_time   : 1970-01-01 00:00:00
       .../MainActivity﹕ onProgress     encoder         : Lavf53.24.2
       .../MainActivity﹕ onProgress   Duration: 00:00:06.40, start: 0.000000, bitrate: 1321 kb/s
       .../MainActivity﹕ onProgress     Stream #0:0(und): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 640x368 [SAR 1:1 DAR 40:23], 932 kb/s, 25 fps, 25 tbr, 12800 tbn, 25 tbc (default)
       .../MainActivity﹕ onProgress     Metadata:
       .../MainActivity﹕ onProgress       creation_time   : 1970-01-01 00:00:00
       .../MainActivity﹕ onProgress       handler_name    : VideoHandler
       .../MainActivity﹕ onProgress     Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 383 kb/s (default)
       .../MainActivity﹕ onProgress     Metadata:
       .../MainActivity﹕ onProgress       creation_time   : 1970-01-01 00:00:00
       .../MainActivity﹕ onProgress       handler_name    : SoundHandler

    cmd4ArrAlt produces this Log :

       .
       .
       .
       /MainA: onProgress:       handler_name    : SoundHandle
       /MainA: onProgress: [NULL @ 0xb5ec4a00] Unable to find a suitable output format for 'text='Stack Overflow':'
       /MainA: onProgress: text='Stack Overflow':: Invalid argument

    cmd4arr and cmd5arr create an new MP4 file. But it has a size of 0KB. The commands seem not to process the frames at all. It always stops with this last line of the Log posted above.

    Edit :

    Answered question : "What how can I use a String [ ] with this Library ? Information on that might fix the other issues."

    Answer : I imported the project as arr before. When it is imported as a regular library you can’t use a normal String anymore but it is implemented as an String[].

  • Playing 120fps in browser between original and re-made video, original is normal speed, new video is slo-mo

    1er mars 2023, par Patrick Vellia

    I used my GoPro Hero10 to record at 4k 120fps on a green screen. This original video plays slo-mo in QuickTime but "normal" speed in the browser. I want it playing normal speed, and if end user wants to slow it down they have the extra frames for that to maintain clarity, which is why I record at 120.

    


    I then used FFMPEG to create an image sequence of the video.

    


    Then I ran Image Magic to create the transparent frames.

    


    Then I put it back together with the following command for a HEVC mov file :

    


    ffmpeg -r 120 -f image2 -i transparent/image_transparent_%08d.png -vcodec hevc_videotoolbox -crf 28 -alpha_quality 1  -tag:v hvc1 output.mov


    


    I am still on an Intel MacBook Pro running FFMPEG 4.6 (as I've found 5+ was buggy with one of my commands a few months ago but can't remember which one, I think it was the videotoolbox).

    


    The GoPro video has the following stream data as input to the FFMPEG :

    


    Duration: 00:00:08.15, start: 0.000000, bitrate: 60160 kb/s
  Stream #0:0(eng): Video: hevc (Main) (hvc1 / 0x31637668), yuvj420p(pc, bt709), 3840x2160 [SAR 1:1 DAR 16:9], 59891 kb/s, 119.88 fps, 119.88 tbr, 120k tbn, 119.88 tbc (default)
    Metadata:
      creation_time   : 2023-02-28T19:06:41.000000Z
      handler_name    : GoPro H.265
      vendor_id       : [0][0][0][0]
      encoder         : GoPro H.265 encoder
      timecode        : 19:05:32:105
  Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 189 kb/s (default)
    Metadata:
      creation_time   : 2023-02-28T19:06:41.000000Z
      handler_name    : GoPro AAC  
      vendor_id       : [0][0][0][0]
      timecode        : 19:05:32:105
  Stream #0:2(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
    Metadata:
      creation_time   : 2023-02-28T19:06:41.000000Z
      handler_name    : GoPro TCD  
      timecode        : 19:05:32:105
  Stream #0:3(eng): Data: bin_data (gpmd / 0x646D7067), 76 kb/s (default)
    Metadata:
      creation_time   : 2023-02-28T19:06:41.000000Z
      handler_name    : GoPro MET  


    


    Whereas the re-constructed video has the following data :

    


    Duration: 00:00:08.13, start: 0.000000, bitrate: 763650 kb/s
  Stream #0:0: Video: hevc (Main) (hvc1 / 0x31637668), yuv420p(tv, progressive), 3840x2160 [SAR 1:1 DAR 16:9], 763696 kb/s, 120 fps, 120 tbr, 15360 tbn, 15360 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : FFMP
      encoder         : Lavc58.134.100 hevc_videotoolbo


    


    When this re-constructed video plays in the browser, it is in slow-mo and I need to set the playbackRate to 4.0 for it to play "normally".

    


    Is there something I need to add to the video for the browser to play it at "normal" speed ?

    


  • how to get 120fps encoded video to play at "normal" speed instead of slow mo

    1er mars 2023, par Patrick Vellia

    I used my GoPro Hero10 to record at 4k 120fps on a green screen. This original video plays slo-mo in QuickTime but "normal" speed in the browser. I want it playing normal speed, and if end user wants to slow it down they have the extra frames for that to maintain clarity, which is why I record at 120.

    


    I then used FFMPEG to create an image sequence of the video.

    


    Then I ran Image Magic to create the transparent frames.

    


    Then I put it back together with the following command for a HEVC mov file :

    


    ffmpeg -r 120 -f image2 -i transparent/image_transparent_%08d.png -vcodec hevc_videotoolbox -crf 28 -alpha_quality 1  -tag:v hvc1 output.mov


    


    I am still on an Intel MacBook Pro running FFMPEG 4.6 (as I've found 5+ was buggy with one of my commands a few months ago but can't remember which one, I think it was the videotoolbox).

    


    The GoPro video has the following stream data as input to the FFMPEG :

    


    Duration: 00:00:08.15, start: 0.000000, bitrate: 60160 kb/s
  Stream #0:0(eng): Video: hevc (Main) (hvc1 / 0x31637668), yuvj420p(pc, bt709), 3840x2160 [SAR 1:1 DAR 16:9], 59891 kb/s, 119.88 fps, 119.88 tbr, 120k tbn, 119.88 tbc (default)
    Metadata:
      creation_time   : 2023-02-28T19:06:41.000000Z
      handler_name    : GoPro H.265
      vendor_id       : [0][0][0][0]
      encoder         : GoPro H.265 encoder
      timecode        : 19:05:32:105
  Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 189 kb/s (default)
    Metadata:
      creation_time   : 2023-02-28T19:06:41.000000Z
      handler_name    : GoPro AAC  
      vendor_id       : [0][0][0][0]
      timecode        : 19:05:32:105
  Stream #0:2(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
    Metadata:
      creation_time   : 2023-02-28T19:06:41.000000Z
      handler_name    : GoPro TCD  
      timecode        : 19:05:32:105
  Stream #0:3(eng): Data: bin_data (gpmd / 0x646D7067), 76 kb/s (default)
    Metadata:
      creation_time   : 2023-02-28T19:06:41.000000Z
      handler_name    : GoPro MET  


    


    Whereas the re-constructed video has the following data :

    


    Duration: 00:00:08.13, start: 0.000000, bitrate: 763650 kb/s
  Stream #0:0: Video: hevc (Main) (hvc1 / 0x31637668), yuv420p(tv, progressive), 3840x2160 [SAR 1:1 DAR 16:9], 763696 kb/s, 120 fps, 120 tbr, 15360 tbn, 15360 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : FFMP
      encoder         : Lavc58.134.100 hevc_videotoolbo


    


    When this re-constructed video plays in the browser, it is in slow-mo and I need to set the playbackRate to 4.0 for it to play "normally".

    


    Is there something I need to add to the video for the browser to play it at "normal" speed ?

    


    EDIT

    


    I just compared the two video streams :

    


    original:
Stream #0:0(eng): Video: hevc (Main) (hvc1 / 0x31637668), yuvj420p(pc, bt709), 3840x2160 [SAR 1:1 DAR 16:9], 59891 kb/s, 119.88 fps, 119.88 tbr, 120k tbn, 119.88 tbc (default)

Reconstructed:
 Stream #0:0: Video: hevc (Main) (hvc1 / 0x31637668), yuv420p(tv, progressive), 3840x2160 [SAR 1:1 DAR 16:9], 763696 kb/s, 120 fps, 120 tbr, 15360 tbn, 15360 tbc (default)


    


    I don't quit understand all of this though. so here's what I notice :

    


    original.         reconstructed
--------------------------------
bt709             progressive
89871 kb/s.       763696 kb/s
119.88 fps.       120 fps
119.88 tbr.       120 tbr
120k tbr.         15360 tbr
11960 tbr.        15360 tbc


    


    Hmm. I suspect it has something to do with tbr and tbc whatever those are, or perhaps the progressive vs the bt709 ? the pirates are also vastly different.