Recherche avancée

Médias (1)

Mot : - Tags -/Rennes

Autres articles (50)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • Other interesting software

    13 avril 2011, par

    We don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
    The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
    We don’t know them, we didn’t try them, but you can take a peek.
    Videopress
    Website : http://videopress.com/
    License : GNU/GPL v2
    Source code : (...)

  • MediaSPIP Init et Diogène : types de publications de MediaSPIP

    11 novembre 2010, par

    À l’installation d’un site MediaSPIP, le plugin MediaSPIP Init réalise certaines opérations dont la principale consiste à créer quatre rubriques principales dans le site et de créer cinq templates de formulaire pour Diogène.
    Ces quatre rubriques principales (aussi appelées secteurs) sont : Medias ; Sites ; Editos ; Actualités ;
    Pour chacune de ces rubriques est créé un template de formulaire spécifique éponyme. Pour la rubrique "Medias" un second template "catégorie" est créé permettant d’ajouter (...)

Sur d’autres sites (7954)

  • How to solve error : "cvCreateFileCaptureWithPreference : backend FFMPEG doesn't support legacy API anymore"

    24 octobre 2018, par Sarvin

    I am trying to build and run an OpenCV project from Github using OpenCV 3.4.2, Cmake 3.13.0-rc1 and VS 2017. The project builds successfully as I understand from the build output but it throws the above warning after I run the program. The video I want to load is in a .AVI format and uses cvCaptureFromAVI function. Just trying to learn OpenCV, your help and kindness is appreciated.

    Source :

    #include <iostream>
    #include <opencv2></opencv2>opencv.hpp>

    #include "package_bgs/PBAS/PixelBasedAdaptiveSegmenter.h"
    #include "package_tracking/BlobTracking.h"
    #include "package_analysis/VehicleCouting.h"

    using namespace cv;

    int main(int argc, char **argv)
    {
     std::cout &lt;&lt; "Using OpenCV " &lt;&lt; CV_MAJOR_VERSION &lt;&lt; "." &lt;&lt;
     CV_MINOR_VERSION &lt;&lt; "." &lt;&lt; CV_SUBMINOR_VERSION &lt;&lt; std::endl;

     /* Open video file */
     CvCapture *capture = 0;

     capture = cvCaptureFromAVI("video.avi");
     if(!capture){
       std::cerr &lt;&lt; "Cannot open video ting tong!" &lt;&lt; std::endl;
       return 1;
     }

     /* Background Subtraction Algorithm */
     IBGS *bgs;
     bgs = new PixelBasedAdaptiveSegmenter;

     /* Blob Tracking Algorithm */



    cv::Mat img_blob;
     BlobTracking* blobTracking;
     blobTracking = new BlobTracking;

     /* Vehicle Counting Algorithm */
     VehicleCouting* vehicleCouting;
     vehicleCouting = new VehicleCouting;

     std::cout &lt;&lt; "Press 'q' to quit..." &lt;&lt; std::endl;
     int key = 0;
     IplImage *frame;
     while(key != 'q')
     {
       frame = cvQueryFrame(capture);
       if(!frame) break;

       cv::Mat img_input = cv::cvarrToMat(frame);
       cv::imshow("Input", img_input);

       // bgs->process(...) internally process and show the foreground mask image
       cv::Mat img_mask;
       bgs->process(img_input, img_mask);

       if(!img_mask.empty())
       {
         // Perform blob tracking
         blobTracking->process(img_input, img_mask, img_blob);

         // Perform vehicle counting
         vehicleCouting->setInput(img_blob);
         vehicleCouting->setTracks(blobTracking->getTracks());
         vehicleCouting->process();
       }

       key = cvWaitKey(1);
     }

     delete vehicleCouting;
     delete blobTracking;
     delete bgs;

     cvDestroyAllWindows();
     cvReleaseCapture(&amp;capture);

     return 0;
    }
    </iostream>

    Error :

    backend FFMPEG doesn't support legacy API anymore

  • Live stream is gets delayed while processing frame in opencv + python

    18 mars 2021, par Himanshu sharma

    I capture and process an IP camera RTSP stream in a OpenCV 4.4.0.46 on Ubuntu.&#xA;Unfortunately the processing takes quite a lot of time, roughly 0.2s per frame, and the stream quickly gets delayed.&#xA;Video file have to save for 5 min but by this delaying video file is saved for 3-4 min only.

    &#xA;

    Can we process faster to overcome delays ?

    &#xA;

    I have two IP camera which have two diffrent fps_rate(Camera 1 have 18000 and camera 2 have 20 fps)

    &#xA;

    I am implementing this code in difference Ubuntu PCs

    &#xA;

      &#xA;
    • Python 3.8.5 (default, Jul 28 2020, 12:59:40) [GCC 9.3.0] on linux
    • &#xA;

    • Django==3.1.2
    • &#xA;

    • Ubuntu = 18.04 and 20.04
    • &#xA;

    • opencv-contrib-python==4.4.0.46
    • &#xA;

    • opencv-python==4.4.0.46
    • &#xA;

    &#xA;

    input_stream = &#x27;rtsp://&#x27;&#x2B;username&#x2B;&#x27;:&#x27;&#x2B;password&#x2B;&#x27;@&#x27;&#x2B;ip&#x2B;&#x27;/user=&#x27;&#x2B;username&#x2B;&#x27;_password=&#x27;&#x2B;password&#x2B;&#x27;_channel=0channel_number_stream=0.sdp&#x27;&#xA;input_stream---> rtsp://admin:Admin123@192.168.1.208/user=admin_password=Admin123_channel=0channel_number_stream=0.sdp&#xA;&#xA;input_stream---> rtsp://Admin:@192.168.1.209/user=Admin_password=_channel=0channel_number_stream=0.sdp&#xA;&#xA;vs = cv2.VideoCapture(input_stream)&#xA;fps_rate = int(vs.get(cv2.CAP_PROP_FPS))&#xA;I have two IP camera which have two diffrent fps_rate(Camera 1 have 18000 and camera 2 have 20 fps)&#xA;&#xA;video_file_name = 0&#xA;start_time = time.time()&#xA;while(True):&#xA;    ret, frame = vs.read()&#xA;    time.sleep(0.2)     # &lt;= Simulate processing time (mask detection, face detection and many detection is hapning)&#xA;&#xA;&#xA;    ###  Start of  writing a video to disk          &#xA;    minute = 5  ## saving a file for 5 minute only then saving another file for 5 min&#xA;    second  = 60&#xA;    minite_to_save_video = int(minute) * int(second)&#xA;&#xA;&#xA;    # if we are supposed to be writing a video to disk, initialize&#xA;    if time.time() - start_time >= minite_to_save_video or  video_file_name == 0 :&#xA;        ## where H = heigth, W = width, C = channel &#xA;        H, W, C = frame.shape&#xA;        &#xA;        print(&#x27;time.time()-->&#x27;,time.time(),&#x27;video_file_name-->&#x27;, video_file_name,  &#x27; #####&#x27;)&#xA;        start_time = time.time()&#xA;&#xA;        video_file_name = str(time.mktime(datetime.datetime.now().timetuple())).replace(&#x27;.0&#x27;, &#x27;&#x27;)&#xA;        output_save_directory = output_stream&#x2B;str(int(video_file_name))&#x2B;&#x27;.mp4&#x27;&#xA;&#xA;&#xA;        fourcc = cv2.VideoWriter_fourcc(*&#x27;avc1&#x27;)&#xA;        &#xA;        writer = cv2.VideoWriter(output_save_directory, fourcc,20.0,(W, H), True)&#xA;&#xA;    # check to see if we should write the frame to disk&#xA;    if writer is not None:&#xA;        &#xA;        try:&#xA;            writer.write(frame)&#xA;&#xA;        except Exception as e:&#xA;            print(&#x27;Error in writing video output---> &#x27;, e)&#xA;

    &#xA;

  • How to save media files to Heroku local storage with Django ?

    25 juillet 2022, par Diyan Kalaydzhiev

    Im having a Django REST app with React for client. Im recording a file with React and sending in to Django. When i save it i modify it with ffmpeg and save it again in the same folder with a new name, the ffmpeg command looks like this :

    &#xA;

    os.system(f"ffmpeg -i {audio_path} -ac 1 -ar 16000 {target_path}")

    &#xA;

    Because i need a path for my audio both for opening and saving, i can't use cloud stores like "Bucket S3, Cloudinary etc.". And the fact that im using it only for a few seconds and then deleting it makes Heroku (the app is deployed there) the perfect place to save it non-persistent. The problem is that the file isn't getting saved in my library with media files. It saves in the postgre db but doesn't in my filesystem and when i try to access it my program returns that there isn't a file with that name. My question is How can i save media files in Heroku file system and how to access them ?

    &#xA;

    settings.py

    &#xA;

    MEDIA_ROOT = os.path.join(BASE_DIR,&#x27;EmotionTalk/AI_emotion_recognizer/recordings&#x27;)&#xA;MEDIA_URL = &#x27;/&#x27;&#xA;

    &#xA;

    urls.py

    &#xA;

    urlpatterns = [&#xA;path(&#x27;admin/&#x27;, admin.site.urls),&#xA;path(&#x27;&#x27;, include(&#x27;EmotionTalk.emotion_talk_app.urls&#x27;)),&#xA;path(&#x27;auth/&#x27;, include(&#x27;EmotionTalk.auth_app.urls&#x27;)),&#xA;path(&#x27;api-token-auth/&#x27;, views.obtain_auth_token),&#xA;] &#x2B; static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) \&#xA;&#x2B; static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)&#xA;

    &#xA;

    views.py

    &#xA;

        def post(self, request):&#xA;    file_serializer = RecordingSerializer(data=request.data)&#xA;&#xA;    if file_serializer.is_valid():&#xA;        file_serializer.save()&#xA;&#xA;        file_name = file_serializer.data.get(&#x27;recording&#x27;)&#xA;        owner_id = file_serializer.data.get(&#x27;owner_id&#x27;)&#xA;&#xA;        current_emotions_count = len(Profile.objects.get(user_id=owner_id).last_emotions)&#xA;&#xA;        print(file_name)&#xA;        recognize_emotion.delay(file_name, owner_id)&#xA;&#xA;        return Response({&#xA;            &#x27;data&#x27;: file_serializer.data,&#xA;            &#x27;current_emotions_count&#x27;: current_emotions_count&#xA;        }, status=status.HTTP_201_CREATED)&#xA;&#xA;    return Response(file_serializer.errors, status=status.HTTP_400_BAD_REQUEST)&#xA;

    &#xA;

    tasks.py

    &#xA;

    def parse_arguments(filename):&#xA;import argparse&#xA;parser = argparse.ArgumentParser()&#xA;&#xA;new_filename = filename.lstrip(&#x27;v&#x27;)&#xA;&#xA;parser.add_argument("audio_path")&#xA;parser.add_argument("target_path")&#xA;&#xA;args = parser.parse_args([f&#x27;EmotionTalk/AI_emotion_recognizer/recordings/{filename}&#x27;,&#xA;                          f&#x27;EmotionTalk/AI_emotion_recognizer/recordings/{new_filename}&#x27;])&#xA;audio_path = args.audio_path&#xA;target_path = args.target_path&#xA;&#xA;if os.path.isfile(audio_path) and audio_path.endswith(".wav"):&#xA;    if not target_path.endswith(".wav"):&#xA;        target_path &#x2B;= ".wav"&#xA;    convert_audio(audio_path, target_path)&#xA;    return target_path&#xA;else:&#xA;    raise TypeError("The audio_path file you specified isn&#x27;t appropriate for this operation")&#xA;

    &#xA;

    parse_arguments is called from recognize_emotion

    &#xA;