Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

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

Autres articles (25)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

  • (Dés)Activation de fonctionnalités (plugins)

    18 février 2011, par

    Pour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
    SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
    Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
    MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...)

Sur d’autres sites (6641)

  • Output file using FFmpeg in Xamarin Android

    28 juillet 2022, par Ahmed Mujtaba

    I'm building an android app using Xamarin. The requirement of the app is to capture video from the camera and encode the video to send it across to a server.

    



    Initially, I was using an encoder library on the server-side to encode recorded video but it was proving to be extremely unreliable and inefficient especially for large-sized video files. I have posted my issues on another thread here

    



    I then decided to encode the video on the client-side and then send it to the server. I've found encoding to be a bit complicated and there isn't much information available on how this can be done. So, I searched for the only way I knew how to encode a video that is by using FFmpeg codec. I've found some solutions. There's a project on GitHub that demonstrates how FFmpeg is used inside a Xamarin android project. However, running the solution doesn't give any output. The project has a binary FFmpeg file which is installed to the phone directory using the code below :

    



    _ffmpegBin = InstallBinary(XamarinAndroidFFmpeg.Resource.Raw.ffmpeg, "ffmpeg", false);


    



    Below is the example code for encoding video into a different set of outputs :

    



    _workingDirectory = Android.OS.Environment.ExternalStorageDirectory.AbsolutePath;&#xA;var sourceMp4 = "cat1.mp4";&#xA;var destinationPathAndFilename = System.IO.Path.Combine (_workingDirectory, "cat1_out.mp4");&#xA;var destinationPathAndFilename2 = System.IO.Path.Combine (_workingDirectory, "cat1_out2.mp4");&#xA;var destinationPathAndFilename4 = System.IO.Path.Combine (_workingDirectory, "cat1_out4.wav");&#xA;if (File.Exists (destinationPathAndFilename))&#xA;    File.Delete (destinationPathAndFilename);&#xA;CreateSampleFile(Resource.Raw.cat1, _workingDirectory, sourceMp4);&#xA;&#xA;&#xA;var ffmpeg = new FFMpeg (this, _workingDirectory);&#xA;&#xA;var sourceClip = new Clip (System.IO.Path.Combine(_workingDirectory, sourceMp4));&#xA;&#xA;var result = ffmpeg.GetInfo (sourceClip);&#xA;&#xA;var br = System.Environment.NewLine;&#xA;&#xA;// There are callbacks based on Standard Output and Standard Error when ffmpeg binary is running as a process:&#xA;&#xA;var onComplete = new MyCommand ((_) => {&#xA;    RunOnUiThread(() =>_logView.Append("DONE!" &#x2B; br &#x2B; br));&#xA;});&#xA;&#xA;var onMessage = new MyCommand ((message) => {&#xA;    RunOnUiThread(() =>_logView.Append(message &#x2B; br &#x2B; br));&#xA;});&#xA;&#xA;var callbacks = new FFMpegCallbacks (onComplete, onMessage);&#xA;&#xA;// 1. The idea of this first test is to show that video editing is possible via FFmpeg:&#xA;// It results in a 150x150 movie that eventually zooms on a cat ear. This is desaturated, and there&#x27;s a fade-in.&#xA;&#xA;var filters = new List<videofilter> ();&#xA;filters.Add (new FadeVideoFilter ("in", 0, 100));&#xA;filters.Add(new CropVideoFilter("150","150","0","0"));&#xA;filters.Add(new ColorVideoFilter(1.0m, 1.0m, 0.0m, 0.5m, 1.0m, 1.0m, 1.0m, 1.0m));&#xA;var outputClip = new Clip (destinationPathAndFilename) { videoFilter = VideoFilter.Build (filters)  };&#xA;outputClip.H264_CRF = "18"; // It&#x27;s the quality coefficient for H264 - Default is 28. I think 18 is pretty good.&#xA;ffmpeg.ProcessVideo(sourceClip, outputClip, true, new FFMpegCallbacks(onComplete, onMessage));&#xA;&#xA;//2. This is a similar version in command line only:&#xA;string[] cmds = new string[] {&#xA;    "-y",&#xA;    "-i",&#xA;    sourceClip.path,&#xA;    "-strict",&#xA;    "-2",&#xA;    "-vf",&#xA;    "mp=eq2=1:1.68:0.3:1.25:1:0.96:1",&#xA;    destinationPathAndFilename2,&#xA;    "-acodec",&#xA;    "copy",&#xA;};&#xA;ffmpeg.Execute (cmds, callbacks);&#xA;&#xA;// 3. This lists codecs:&#xA;string[] cmds3 = new string[] {&#xA;    "-codecs",&#xA;};&#xA;ffmpeg.Execute (cmds, callbacks);&#xA;&#xA;// 4. This convers to WAV&#xA;// Note that the cat movie just has some silent house noise.&#xA;ffmpeg.ConvertToWaveAudio(sourceClip, destinationPathAndFilename4, 44100, 2, callbacks, true);&#xA;</videofilter>

    &#xA;&#xA;

    I have tried different commands but no output file is generated. I have tried to use another project found here but this one has the same issue. I don't get any errors but no output file is generated. I'm really hoping someone can help me find a way I can manage to use FFmpeg in my project or some way to compress video to transport it to the server.

    &#xA;&#xA;

    I will really appreciate if someone can point me in the right direction.

    &#xA;

  • creating video from sequence of images javacv

    7 janvier 2016, par vach

    For creating video from sequence of images in android I used javacv 0.6 library, but I meet problem :
    It normally works on htc Sensation(Android 4.0.1, Processor type armv7) and htc Desire(Android 2.3.3, Processor type arm7) phones, but it doesn’t work on htc Wildfire
    (Android 2.3.5,Processor type armv6) phone particularly it fails in this part of code

    FFmpegFrameRecorder recorder = new FFmpegFrameRecorder(videoFilePath,      
    TalkingPhotoConstants.VIDEO_FRAME_WIDTH,TalkingPhotoConstants.VIDEO_FRAME_HEIGHT);

    in the attached code.

    public class MovieCreator extends AsyncTask {

    private opencv_core.IplImage[] iplimage;
    private String audioFilePath;


    private ProgressDialog progressDialog;
    private Context context;
    private List<talkframe> frames;

    public MovieCreator(Context context, opencv_core.IplImage[] images, String audioFilePath,          
    List<talkframe> frames) {
       this.context = context;
       this.iplimage = images;
       this.audioFilePath = audioFilePath;
       this.frames = frames;

    }

    private String createMovie() {

       String videoName = TalkingPhotoConstants.TMP_VIDEO_NAME;
       String path = TalkingPhotoConstants.RESOURCES_TMP_FOLDER;
       String videoFilePath = path + videoName;
       String finalVideoName = TalkingPhotoConstants.FINAL_VIDEO_NAME +
       System.currentTimeMillis() + ".mp4";
       String finalVideoPath = TalkingPhotoConstants.RESOURCES_FOLDER + finalVideoName;

       try {

           FFmpegFrameRecorder recorder = new FFmpegFrameRecorder(videoFilePath,
           TalkingPhotoConstants.VIDEO_FRAME_WIDTH,TalkingPhotoConstants.VIDEO_FRAME_HEIGHT);


           //int frameCount = iplimage.length;
           int frameCount = frames.size();
           recorder.setAudioCodec(AV_CODEC_ID_AMR_NB);
           recorder.setVideoCodec(AV_CODEC_ID_MPEG4);

           recorder.setVideoBitrate(120000);
           recorder.setFrameRate(TalkingPhotoConstants.VIDEO_FRAME_RATE);

           recorder.setPixelFormat(AV_PIX_FMT_YUV420P);
           recorder.setFormat("mp4");

           recorder.start();


           for (int i = 0; i &lt; frameCount; i++) {
               TalkFrame currentFrame = frames.get(i);
               long duration = currentFrame.getDuration();
               opencv_core.IplImage iplImage = cvLoadImage(currentFrame.getImageName());

               for (int j = 0; j &lt; TalkingPhotoConstants.VIDEO_FRAME_RATE * duration; j++) {
                   recorder.record(iplImage);

               }

           }

           recorder.stop();

           mergeAudioAndVideo(videoFilePath, audioFilePath, finalVideoPath);

       } catch (Exception e) {
           Log.e("problem", "problem", e);
           finalVideoName = "";
       }
       return finalVideoName;
    }

    private boolean mergeAudioAndVideo(String videoPath, String audioPath, String outPut)  
    throws Exception {
       boolean isCreated = true;
       File file = new File(videoPath);
       if (!file.exists()) {
           return false;
       }


       FrameGrabber videoGrabber = new FFmpegFrameGrabber(videoPath);
       FrameGrabber audioGrabber = new FFmpegFrameGrabber(audioPath);

       videoGrabber.start();
       audioGrabber.start();
       FrameRecorder recorder = new FFmpegFrameRecorder(outPut,
               videoGrabber.getImageWidth(), videoGrabber.getImageHeight(),
               audioGrabber.getAudioChannels());


       recorder.setFrameRate(videoGrabber.getFrameRate());
       recorder.start();
       Frame videoFrame = null, audioFrame = null;
       while ((audioFrame = audioGrabber.grabFrame()) != null) {
           videoFrame = videoGrabber.grabFrame();
           if (videoFrame != null) {
               recorder.record(videoFrame);
           }
           recorder.record(audioFrame);

       }
       recorder.stop();
       videoGrabber.stop();
       audioGrabber.stop();
       return isCreated;
    }

    @Override
    protected Boolean doInBackground(String... params) {
       String fileName = createMovie();
       boolean result = fileName.isEmpty();
       if (!result) {
           VideoDAO videoDAO = new VideoDAO(context);
           videoDAO.open();
           videoDAO.createVideo(fileName);
           videoDAO.close();
       }
       //Utils.cleanTmpDir();
       return result;
    }

    @Override
    protected void onPreExecute() {
       progressDialog = new ProgressDialog(context);
       progressDialog.setTitle("Processing...");
       progressDialog.setMessage("Please wait.");
       progressDialog.setCancelable(false);
       progressDialog.setIndeterminate(true);
       progressDialog.show();
    }

    @Override
    protected void onPostExecute(Boolean result) {
       if (progressDialog != null) {
           progressDialog.dismiss();

       }
    }
    </talkframe></talkframe>

    }

    There is no exception.

    1.how can i fix it ?

    2.I have a version that problem is connected with device’s processor type.

    If I’m right how can I solve it ?

    Thanks in advance.

  • How to remove tx3g stream from m4a file [closed]

    12 novembre 2023, par KWottrich

    I have an audiobook that I'm trying to play on my phone. My audio app of choice is struggling with the file, and I think it's because there's an additional stream in the file that it can't handle. VLC for Android plays the file without issue, but I'd rather use my audio app of choice.

    &#xA;

    When I open the m4a file in VLC for Windows, I see two streams :

    &#xA;

    VLC Codec Info

    &#xA;

    I want to get rid of the tx3g stream, and just keep the audio stream. So I turned to ffmpeg to try to copy over only the audio stream. However, no matter what I try, the tx3g stream seems to come along for the ride. I referred to this post to figure out how to remove the tx3g stream, but so far I've been unsuccessful. Can anyone help me figure out how to remove just the tx3g track ? Ideally, I'd like to keep the metadata and album art as well.

    &#xA;

    I tried to run ffmpeg -i input.m4a -map 0:a:0 -sn -dn -c copy output.m4a, but the tx3g stream is still there. Here is the command output :

    &#xA;

    ffmpeg version 2021-12-06-git-ef00d40e32-essentials_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers&#xA;  built with gcc 11.2.0 (Rev2, Built by MSYS2 project)&#xA;  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband&#xA;  libavutil      57. 10.101 / 57. 10.101&#xA;  libavcodec     59. 14.100 / 59. 14.100&#xA;  libavformat    59.  9.102 / 59.  9.102&#xA;  libavdevice    59.  0.101 / 59.  0.101&#xA;  libavfilter     8. 19.100 /  8. 19.100&#xA;  libswscale      6.  1.101 /  6.  1.101&#xA;  libswresample   4.  0.100 /  4.  0.100&#xA;  libpostproc    56.  0.100 / 56.  0.100&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 000002773b2db200] stream 0, timescale not set&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;.\input.m4a&#x27;:&#xA;  Metadata:&#xA;    major_brand     : M4A&#xA;    minor_version   : 512&#xA;    compatible_brands: isomiso2&#xA;    artist          : [removed]&#xA;    title           : [removed]&#xA;    album           : [removed]&#xA;    date            : 2020&#xA;    genre           : Audiobook&#xA;    track           : 1/22&#xA;    disc            : 1/1&#xA;    comment         : [removed]&#xA;    copyright       : [removed]&#xA;    encoder         : Lavf58.29.100&#xA;  Duration: 00:01:45.14, start: 0.000000, bitrate: 132 kb/s&#xA;  Chapters:&#xA;    Chapter #0:0: start 0.000000, end 105.000000&#xA;      Metadata:&#xA;        title           : [removed]&#xA;  Stream #0:0[0x1](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)&#xA;    Metadata:&#xA;      handler_name    : SoundHandler&#xA;      vendor_id       : [0][0][0][0]&#xA;  Stream #0:1[0x2](und): Data: bin_data (text / 0x74786574), 0 kb/s&#xA;    Metadata:&#xA;      creation_time   : 2021-11-29T16:23:41.000000Z&#xA;  Stream #0:2[0x0]: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 500x500 [SAR 1:1 DAR 1:1], 90k tbr, 90k tbn (attached pic)&#xA;Output #0, ipod, to &#x27;output.m4a&#x27;:&#xA;  Metadata:&#xA;    major_brand     : M4A&#xA;    minor_version   : 512&#xA;    compatible_brands: isomiso2&#xA;    artist          : [removed]&#xA;    title           : [removed]&#xA;    album           : [removed]&#xA;    date            : 2020&#xA;    genre           : Audiobook&#xA;    track           : 1/22&#xA;    disc            : 1/1&#xA;    comment         : [removed]&#xA;    copyright       : [removed]&#xA;    encoder         : Lavf59.9.102&#xA;  Chapters:&#xA;    Chapter #0:0: start 0.000000, end 105.000000&#xA;      Metadata:&#xA;        title           : [removed]&#xA;  Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)&#xA;    Metadata:&#xA;      handler_name    : SoundHandler&#xA;      vendor_id       : [0][0][0][0]&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (copy)&#xA;Press [q] to stop, [?] for help&#xA;size=    1632kB time=00:01:45.11 bitrate= 127.2kbits/s speed=1.48e&#x2B;04x&#xA;video:0kB audio:1612kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.233040%&#xA;

    &#xA;