Recherche avancée

Médias (0)

Mot : - Tags -/protocoles

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

Autres articles (81)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

Sur d’autres sites (9063)

  • Unable to properly save video in android ffmpeg app

    22 mars 2021, par connor449

    I am trying to record and save a video with an ffmpeg app on android 10. I'm very new to android/mobile development.

    


    Here is my manifest file :

    


    &lt;?xml version="1.0" encoding="utf-8"?>&#xA;<manifest package="com.example.camera">&#xA;    &#xA;    &#xA;    &#xA;&#xA;    &#xA;&#xA;&#xA;    &#xA;        <activity>&#xA;            &#xA;            &#xA;        </activity>        <activity>&#xA;            &#xA;                <action></action>&#xA;&#xA;                <category></category>&#xA;            &#xA;        </activity>&#xA;    &#xA;&#xA;&#xA;</manifest>&#xA;

    &#xA;

    As you can see, I am specifying permission to read/write data.

    &#xA;

    Here is my mainActivity :

    &#xA;

    package com.example.camera&#xA;&#xA;//import android.R&#xA;import android.content.DialogInterface&#xA;import android.content.pm.PackageManager&#xA;import android.os.Build&#xA;import android.os.Bundle&#xA;import android.widget.Toast&#xA;import androidx.appcompat.app.AlertDialog&#xA;import androidx.appcompat.app.AppCompatActivity&#xA;import androidx.core.app.ActivityCompat&#xA;import androidx.core.content.ContextCompat&#xA;import com.arthenica.mobileffmpeg.FFmpeg&#xA;&#xA;&#xA;const val EXTRA_MESSAGE = "com.example.myfirstapp.MESSAGE"&#xA;&#xA;class MainActivity : AppCompatActivity() {&#xA;    override fun onCreate(savedInstanceState: Bundle?) {&#xA;        super.onCreate(savedInstanceState)&#xA;        setContentView(R.layout.activity_main)&#xA;        if (checkPermission()) {&#xA;            //main logic or main code&#xA;           FFmpeg.execute("-f android_camera -i 0:0 -r 30 -crf 0 -pixel_format yuv420p -t 00:00:05 test.mp4")&#xA;&#xA;            // . write your main code to execute, It will execute if the permission is already given.&#xA;        } else {&#xA;            requestPermission()&#xA;        }&#xA;    }&#xA;&#xA;    fun sendMessage(view:android.view.View){&#xA;&#xA;&#xA;    }&#xA;&#xA;    private fun checkPermission(): Boolean {&#xA;        return if (ContextCompat.checkSelfPermission(this, android.Manifest.permission.CAMERA)&#xA;            != PackageManager.PERMISSION_GRANTED&#xA;        ) {&#xA;            // Permission is not granted&#xA;            false&#xA;        } else true&#xA;    }&#xA;&#xA;    private fun requestPermission() {&#xA;        ActivityCompat.requestPermissions(&#xA;            this, arrayOf(android.Manifest.permission.CAMERA),&#xA;            PERMISSION_REQUEST_CODE&#xA;        )&#xA;    }&#xA;&#xA;    override fun onRequestPermissionsResult(&#xA;        requestCode: Int,&#xA;        permissions: Array<string>,&#xA;        grantResults: IntArray&#xA;    ) {&#xA;        when (requestCode) {&#xA;            PERMISSION_REQUEST_CODE -> if (grantResults.size > 0 &amp;&amp; grantResults[0] == PackageManager.PERMISSION_GRANTED&#xA;            ) {&#xA;                Toast.makeText(applicationContext, "Permission Granted", Toast.LENGTH_SHORT)&#xA;                    .show()&#xA;&#xA;                // main logic&#xA;            } else {&#xA;                Toast.makeText(applicationContext, "Permission Denied", Toast.LENGTH_SHORT)&#xA;                    .show()&#xA;                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {&#xA;                    if (ContextCompat.checkSelfPermission(this, android.Manifest.permission.CAMERA)&#xA;                        != PackageManager.PERMISSION_GRANTED&#xA;                    ) {&#xA;                        showMessageOKCancel("You need to allow access permissions",&#xA;                            DialogInterface.OnClickListener { dialog, which ->&#xA;                                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {&#xA;                                    requestPermission()&#xA;                                }&#xA;                            })&#xA;                    }&#xA;                }&#xA;            }&#xA;        }&#xA;    }&#xA;&#xA;    private fun showMessageOKCancel(&#xA;        message: String,&#xA;        okListener: DialogInterface.OnClickListener&#xA;    ) {&#xA;        AlertDialog.Builder(this@MainActivity)&#xA;            .setMessage(message)&#xA;            .setPositiveButton("OK", okListener)&#xA;            .setNegativeButton("Cancel", null)&#xA;            .create()&#xA;            .show()&#xA;    }&#xA;&#xA;    companion object {&#xA;        private const val PERMISSION_REQUEST_CODE = 200&#xA;    }&#xA;}&#xA;&#xA;</string>

    &#xA;

    Here is my error message in the logs :

    &#xA;

    2021-03-22 16:31:34.509 9365-9448/com.example.camera I/AdrenoGLES: QUALCOMM build                   : 85037b7, I6e8b82193e&#xA;    Build Date                       : 12/19/19&#xA;    OpenGL ES Shader Compiler Version: EV031.27.05.03&#xA;    Local Branch                     : &#xA;    Remote Branch                    : refs/tags/AU_LINUX_ANDROID_LA.UM.8.11.R1.10.00.00.576.016&#xA;    Remote Branch                    : NONE&#xA;    Reconstruct Branch               : NOTHING&#xA;2021-03-22 16:31:34.509 9365-9448/com.example.camera I/AdrenoGLES: Build Config                     : S P 8.0.12 AArch64&#xA;2021-03-22 16:31:34.512 9365-9448/com.example.camera I/AdrenoGLES: PFP: 0x016ee187, ME: 0x00000000&#xA;2021-03-22 16:31:55.745 9365-9480/com.example.camera I/mobile-ffmpeg: ffmpeg version v4.4-dev-416&#xA;2021-03-22 16:31:55.745 9365-9480/com.example.camera I/mobile-ffmpeg:  Copyright (c) 2000-2020 the FFmpeg developers&#xA;2021-03-22 16:31:55.746 9365-9480/com.example.camera I/mobile-ffmpeg:   built with Android (6454773 based on r365631c2) clang version 9.0.8 (https://android.googlesource.com/toolchain/llvm-project 98c855489587874b2a325e7a516b99d838599c6f) (based on LLVM 9.0.8svn)&#xA;2021-03-22 16:31:55.746 9365-9480/com.example.camera I/mobile-ffmpeg:   configuration: --cross-prefix=aarch64-linux-android- --sysroot=/files/android-sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/sysroot --prefix=/home/taner/Projects/mobile-ffmpeg/prebuilt/android-arm64/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=aarch64 --cpu=armv8-a --cc=aarch64-linux-android24-clang --cxx=aarch64-linux-android24-clang&#x2B;&#x2B; --extra-libs=&#x27;-L/home/taner/Projects/mobile-ffmpeg/prebuilt/android-arm64/cpu-features/lib -lndk_compat&#x27; --target-os=android --enable-neon --enable-asm --enable-inline-asm --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --enable-shared --enable-v4l2-m2m --disable-outdev=fbdev --disable-indev=fbdev --enable-small --disable-openssl --disable-xmm-clobber-test --disable-debug --enable-lto --disable-neon-clobber-test --disable-programs --disable-postproc --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --disable-sndio --disable-schannel --disable-securetransport --disable-xlib --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --disable-videotoolbox --disable-audiotoolbox --disable-appkit --disable-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gmp --enable-gnutls --enable-libmp3lame --enable-libass --enable-iconv --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxml2 --enable-libopencore-amrnb --enable-libshine --enable-libspeex --enable-libwavpack --enable-libkvazaar --enable-libilbc --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libaom --enable-libtwolame --disable-sdl2 --enable-libvo-amrwbenc --enable-zlib --enable-mediacodec&#xA;2021-03-22 16:31:55.746 9365-9480/com.example.camera I/mobile-ffmpeg:   libavutil      56. 55.100 / 56. 55.100&#xA;2021-03-22 16:31:55.746 9365-9480/com.example.camera I/mobile-ffmpeg:   libavcodec     58. 96.100 / 58. 96.100&#xA;2021-03-22 16:31:55.746 9365-9480/com.example.camera I/mobile-ffmpeg:   libavformat    58. 48.100 / 58. 48.100&#xA;2021-03-22 16:31:55.746 9365-9480/com.example.camera I/mobile-ffmpeg:   libavdevice    58. 11.101 / 58. 11.101&#xA;2021-03-22 16:31:55.746 9365-9480/com.example.camera I/mobile-ffmpeg:   libavfilter     7. 87.100 /  7. 87.100&#xA;2021-03-22 16:31:55.746 9365-9480/com.example.camera I/mobile-ffmpeg:   libswscale      5.  8.100 /  5.  8.100&#xA;2021-03-22 16:31:55.746 9365-9480/com.example.camera I/mobile-ffmpeg:   libswresample   3.  8.100 /  3.  8.100&#xA;2021-03-22 16:31:55.750 9365-9365/com.example.camera E/ACameraMetadata: filterDurations: malformed duration key 1638402! count 0, type 3&#xA;2021-03-22 16:31:55.750 9365-9365/com.example.camera E/ACameraMetadata: filterDurations: malformed duration key 1638403! count 0, type 3&#xA;2021-03-22 16:31:55.750 9365-9365/com.example.camera E/ACameraMetadata: filterDurations: malformed duration key 1835009! count 0, type 3&#xA;2021-03-22 16:31:55.750 9365-9365/com.example.camera E/ACameraMetadata: filterDurations: malformed duration key 1835010! count 0, type 3&#xA;2021-03-22 16:31:55.750 9365-9365/com.example.camera E/ACameraMetadata: filterDurations: malformed duration key 1638407! count 0, type 3&#xA;2021-03-22 16:31:55.750 9365-9365/com.example.camera E/ACameraMetadata: filterDurations: malformed duration key 1638408! count 0, type 0&#xA;2021-03-22 16:31:55.751 9365-9365/com.example.camera E/ACameraMetadata: filterDurations: malformed duration key 1638402! count 0, type 3&#xA;2021-03-22 16:31:55.751 9365-9365/com.example.camera E/ACameraMetadata: filterDurations: malformed duration key 1638403! count 0, type 3&#xA;2021-03-22 16:31:55.751 9365-9365/com.example.camera E/ACameraMetadata: filterDurations: malformed duration key 1835009! count 0, type 3&#xA;2021-03-22 16:31:55.751 9365-9365/com.example.camera E/ACameraMetadata: filterDurations: malformed duration key 1835010! count 0, type 3&#xA;2021-03-22 16:31:55.751 9365-9365/com.example.camera E/ACameraMetadata: filterDurations: malformed duration key 1638407! count 0, type 3&#xA;2021-03-22 16:31:55.751 9365-9365/com.example.camera E/ACameraMetadata: filterDurations: malformed duration key 1638408! count 0, type 0&#xA;2021-03-22 16:31:55.797 9365-9480/com.example.camera W/mobile-ffmpeg: [android_camera @ 0x726794b600] Requested video_size 0x0 not available, falling back to 4608x3456&#xA;2021-03-22 16:31:55.804 9365-9480/com.example.camera I/mobile-ffmpeg: [android_camera @ 0x726794b600] Android camera capture session is active.&#xA;2021-03-22 16:31:56.097 9365-9480/com.example.camera I/mobile-ffmpeg: Input #0, android_camera, from &#x27;0:0&#x27;:&#xA;2021-03-22 16:31:56.098 9365-9480/com.example.camera I/mobile-ffmpeg:   Duration: &#xA;2021-03-22 16:31:56.098 9365-9480/com.example.camera I/mobile-ffmpeg: N/A&#xA;2021-03-22 16:31:56.098 9365-9480/com.example.camera I/mobile-ffmpeg: , start: &#xA;2021-03-22 16:31:56.098 9365-9480/com.example.camera I/mobile-ffmpeg: 28486.157692&#xA;2021-03-22 16:31:56.098 9365-9480/com.example.camera I/mobile-ffmpeg: , bitrate: &#xA;2021-03-22 16:31:56.098 9365-9480/com.example.camera I/mobile-ffmpeg: N/A&#xA;2021-03-22 16:31:56.098 9365-9480/com.example.camera I/mobile-ffmpeg:     Stream #0:0&#xA;2021-03-22 16:31:56.098 9365-9480/com.example.camera I/mobile-ffmpeg: : Video: rawvideo (NV21 / 0x3132564E), nv21, 4608x3456&#xA;2021-03-22 16:31:56.098 9365-9480/com.example.camera I/mobile-ffmpeg: , &#xA;2021-03-22 16:31:56.098 9365-9480/com.example.camera I/mobile-ffmpeg: 30 fps, &#xA;2021-03-22 16:31:56.098 9365-9480/com.example.camera I/mobile-ffmpeg: 30 tbr, &#xA;2021-03-22 16:31:56.098 9365-9480/com.example.camera I/mobile-ffmpeg: 1000000000.00 tbn, &#xA;2021-03-22 16:31:56.098 9365-9480/com.example.camera I/mobile-ffmpeg: 1000000000.00 tbc&#xA;2021-03-22 16:31:56.098 9365-9480/com.example.camera I/mobile-ffmpeg:     Side data:&#xA;2021-03-22 16:31:56.098 9365-9480/com.example.camera I/mobile-ffmpeg:       &#xA;2021-03-22 16:31:56.098 9365-9480/com.example.camera I/mobile-ffmpeg: displaymatrix: rotation of -90.00 degrees&#xA;2021-03-22 16:31:56.098 9365-9480/com.example.camera W/mobile-ffmpeg: Codec AVOption crf (Select the quality for constant quality mode) specified for output file #0 (test.mp4) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.&#xA;2021-03-22 16:31:56.098 9365-9480/com.example.camera E/mobile-ffmpeg: test.mp4: Read-only file system&#xA;2021-03-22 16:31:56.259 9365-9392/com.example.camera D/ACameraDevice: Device error received, code 5, frame number 1, request ID 0, subseq ID 0&#xA;2021-03-22 16:31:56.260 9365-9666/com.example.camera D/ACameraDevice: Device error received, code 5, frame number 2, request ID 0, subseq ID 0&#xA;2021-03-22 16:31:56.260 9365-9666/com.example.camera D/ACameraDevice: Device error received, code 5, frame number 3, request ID 0, subseq ID 0&#xA;2021-03-22 16:31:56.260 9365-9666/com.example.camera D/ACameraDevice: Device error received, code 3, frame number 4, request ID 0, subseq ID 0&#xA;2021-03-22 16:31:56.260 9365-9666/com.example.camera D/ACameraDevice: Device error received, code 3, frame number 5, request ID 0, subseq ID 0&#xA;2021-03-22 16:31:56.261 9365-9666/com.example.camera D/ACameraDevice: Device error received, code 3, frame number 6, request ID 0, subseq ID 0&#xA;2021-03-22 16:31:56.607 9365-9365/com.example.camera W/ACameraCaptureSession: Device is closed but session 0 is not notified&#xA;2021-03-22 16:31:56.608 9365-9480/com.example.camera I/mobile-ffmpeg: [android_camera @ 0x726794b600] Android camera capture session was closed.&#xA;2021-03-22 16:31:56.637 9365-9365/com.example.camera I/Choreographer: Skipped 58 frames!  The application may be doing too much work on its main thread.&#xA;2021-03-22 16:31:56.678 9365-9448/com.example.camera I/OpenGLRenderer: Davey! duration=1018ms; Flags=1, IntendedVsync=17591318171185, Vsync=17592284837813, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=17592296938401, AnimationStart=17592297214183, PerformTraversalsStart=17592304079965, DrawStart=17592327848144, SyncQueued=17592334185436, SyncStart=17592334982572, IssueDrawCommandsStart=17592335124343, SwapBuffers=17592336519968, FrameCompleted=17592337443926, DequeueBufferDuration=165000, QueueBufferDuration=255000, &#xA;

    &#xA;

    The error I'm particularity confused about is :

    &#xA;

    2021-03-22 16:31:56.098 9365-9480/com.example.camera E/mobile-ffmpeg: test.mp4: Read-only file system&#xA;

    &#xA;

    I thought I specified the appropriate permissions in the manifest file ? Please advise.

    &#xA;

  • stream_loop generate a big size video [FFMPEG]

    26 mars 2021, par Mouaad Abdelghafour AITALI

    I'm trying to loop a short video for e.g. 190 time to match the audio length, I use the following code :

    &#xA;

    -y -stream_loop  190  -i input.mp4 -c copy output.mp4&#xA;

    &#xA;

    The command above works, but it generates video with huge size for video with 3min the size is 885 MB

    &#xA;

    2021-03-25 23:52:30.445 5687-6253/maa.abc.music_maker D/XXX: LOOPING VIDEO SIZE ===> 885.845MB&#xA;

    &#xA;

    Or there's any way I can loop the video to match the audio length without using -stream_loop

    &#xA;

  • Where to store the .mpd file on django to play on a dash player ?

    3 janvier 2019, par enigmaVada

    I am trying to build a video player on django. I am using MPEG-DASH for adaptive streaming of the video file. I have chosen a sample video in the beginning. Then, using ffmpeg commands, I have encoded the video into 240p, 360p, 480p and 720p videos. Also have encoded audio separately.

    Then, using mp4box, I have generated the .mpd file. I have read that mpd files cannot be run from the local file system and need to be hosted on a server. I have a dash player setup as follows :

     
       
       
       <code class="echappe-js">&lt;script src=&quot;https://cdn.dashjs.org/latest/dash.all.min.js&quot;&gt;&lt;/script&gt;

    The url in the src field is a random manifest file that i used to test the player out. It works fine.

    Then, on my django project, I have created a media folder which stores the media files uploaded via a form(root included in settings.py).
    My question is where do i store the video, audio and .mpd file so that i can play them using the html code which resides in the templates folder. I have tried using the media url of .mpd file in the source but I am unable to play the video.

    Here is the generated mpd file for reference :

    &lt;?xml version="1.0"?>

    <mpd xmlns="urn:mpeg:dash:schema:mpd:2011" minbuffertime="PT1.500S" type="static" mediapresentationduration="PT0H1M9.869S" maxsegmentduration="PT0H0M9.985S" profiles="urn:mpeg:dash:profile:isoff-on-demand:2011,http://dashif.org/guidelines/dash264">
    <programinformation moreinformationurl="http://gpac.io">
     
    </programinformation>

    <period duration="PT0H1M9.869S">
     <adaptationset segmentalignment="true" lang="und" subsegmentalignment="true" subsegmentstartswithsap="1">
      <representation mimetype="audio/mp4" codecs="mp4a.40.2" audiosamplingrate="44100" startwithsap="1" bandwidth="130920">
       <audiochannelconfiguration schemeiduri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"></audiochannelconfiguration>
       <baseurl>sample_audio_dashinit.mp4</baseurl>
       <segmentbase indexrangeexact="true" indexrange="902-1017">
         <initialization range="0-901"></initialization>
       </segmentbase>
      </representation>
     </adaptationset>
     <adaptationset segmentalignment="true" group="1" maxwidth="426" maxheight="240" maxframerate="30" par="426:240" lang="und" subsegmentalignment="true" subsegmentstartswithsap="1">
      <representation mimetype="video/mp4" codecs="avc1.640015" width="426" height="240" framerate="30" sar="1:1" startwithsap="1" bandwidth="590708">
       <baseurl>sample_video_240_dashinit.mp4</baseurl>
       <segmentbase indexrangeexact="true" indexrange="914-1053">
         <initialization range="0-913"></initialization>
       </segmentbase>
      </representation>
     </adaptationset>
     <adaptationset segmentalignment="true" group="1" maxwidth="640" maxheight="480" maxframerate="30" par="4:3" lang="und" subsegmentalignment="true" subsegmentstartswithsap="1">
      <representation mimetype="video/mp4" codecs="avc1.64001E" width="480" height="360" framerate="30" sar="1:1" startwithsap="1" bandwidth="883873">
       <baseurl>sample_video_360_dashinit.mp4</baseurl>
       <segmentbase indexrangeexact="true" indexrange="914-1053">
         <initialization range="0-913"></initialization>
       </segmentbase>
      </representation>
      <representation mimetype="video/mp4" codecs="avc1.64001E" width="640" height="480" framerate="30" sar="1:1" startwithsap="1" bandwidth="1188712">
       <baseurl>sample_video_480_dashinit.mp4</baseurl>
       <segmentbase indexrangeexact="true" indexrange="913-1052">
         <initialization range="0-912"></initialization>
       </segmentbase>
      </representation>
     </adaptationset>
     <adaptationset segmentalignment="true" group="1" maxwidth="1280" maxheight="720" maxframerate="30" par="16:9" lang="und" subsegmentalignment="true" subsegmentstartswithsap="1">
      <representation mimetype="video/mp4" codecs="avc1.64001F" width="1280" height="720" framerate="30" sar="1:1" startwithsap="1" bandwidth="2365717">
       <baseurl>sample_video_720_dashinit.mp4</baseurl>
       <segmentbase indexrangeexact="true" indexrange="914-1053">
         <initialization range="0-913"></initialization>
       </segmentbase>
      </representation>
     </adaptationset>
    </period>
    </mpd>