Recherche avancée

Médias (0)

Mot : - Tags -/auteurs

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

Autres articles (50)

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

  • 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

  • Changer son thème graphique

    22 février 2011, par

    Le thème graphique ne touche pas à la disposition à proprement dite des éléments dans la page. Il ne fait que modifier l’apparence des éléments.
    Le placement peut être modifié effectivement, mais cette modification n’est que visuelle et non pas au niveau de la représentation sémantique de la page.
    Modifier le thème graphique utilisé
    Pour modifier le thème graphique utilisé, il est nécessaire que le plugin zen-garden soit activé sur le site.
    Il suffit ensuite de se rendre dans l’espace de configuration du (...)

Sur d’autres sites (5770)

  • OpenCV : FFMPEG : tag is not supported with codec id 12 and format 'mp4 / MP4

    30 septembre 2023, par Tina J

    I was trying to run a repo located HERE. Basically, just targeting SimpleVideoSummarizer.cc which uses OpenCV for some basic video processing. I'm using Ubuntu 14.04. Following is the save part of the code :

    



    void SimpleVideoSummarizer::playAndSaveSummaryVideo(char* videoFileSave) {&#xA;    cv::VideoCapture capture(videoFile);&#xA;    cv::Mat frame;&#xA;    capture.set(CV_CAP_PROP_POS_FRAMES, 0);&#xA;    cv::VideoWriter videoWriter;&#xA;    if (videoFileSave != "") {&#xA;        videoWriter = cv::VideoWriter(videoFileSave, CV_FOURCC(&#x27;M&#x27;, &#x27;J&#x27;, &#x27;P&#x27;, &#x27;G&#x27;), static_cast<int>(capture.get(CV_CAP_PROP_FPS)), cv::Size(capture.get(CV_CAP_PROP_FRAME_WIDTH), capture.get(CV_CAP_PROP_FRAME_HEIGHT)));&#xA;    }&#xA;    for (std::set<int>::iterator it = summarySet.begin(); it != summarySet.end(); it&#x2B;&#x2B;) {&#xA;        capture.set(CV_CAP_PROP_POS_FRAMES, segmentStartTimes[*it] * frameRate);&#xA;        for (int i = segmentStartTimes[*it]; i &lt; segmentStartTimes[*it &#x2B; 1]; i&#x2B;&#x2B;) {&#xA;            for (int j = 0; j &lt; frameRate; j&#x2B;&#x2B;) {&#xA;                capture >> frame;&#xA;                cv::putText(frame, "Time: " &#x2B; IntToString(i) &#x2B; " seconds", cvPoint(30, 30),&#xA;                            cv::FONT_HERSHEY_COMPLEX_SMALL, 0.8, cvScalar(200, 200, 250), 1, CV_AA);&#xA;                if (frame.data) {&#xA;                    cv::imshow("Summary Video", frame);&#xA;                }&#xA;                if (videoFileSave != "") {&#xA;                    videoWriter.write(frame);&#xA;                }&#xA;                // Press  ESC on keyboard to exit&#xA;                char c = static_cast<char>(cv::waitKey(25));&#xA;                if (c == 27) {&#xA;                    break;&#xA;                }&#xA;            }&#xA;        }&#xA;    }&#xA;    capture.release();&#xA;}&#xA;</char></int></int>

    &#xA;&#xA;

    I pass an input.mp4 file and specify a out.mp4 as well. Unfortunately, when the example is trying to save the output video file, it throws errors on the FOURCC :

    &#xA;&#xA;

    OpenCV: FFMPEG: tag 0x44495658/&#x27;XVID&#x27; is not supported with codec id 12 and format &#x27;mp4 / MP4 (MPEG-4 Part 14)&#x27;&#xA;OpenCV: FFMPEG: fallback to use tag 0x7634706d/&#x27;mp4v&#x27;&#xA;

    &#xA;&#xA;

    or another one :

    &#xA;&#xA;

    OpenCV: FFMPEG: tag 0x3234504d/&#x27;MP42&#x27; is not supported with codec id 15 and format &#x27;mp4 / MP4 (MPEG-4 Part 14)&#x27;&#xA;[mp4 @ 0x16bc700] Could not find tag for codec msmpeg4v2 in stream #0, codec not currently supported in container&#xA;

    &#xA;&#xA;

    I tried to change the FOURCC in this part of the code which writes the video, and applied XVID, MJPG, X264, MP42, MP4V. None worked and threw similar errors.

    &#xA;&#xA;

    What is the problem ? How to fix it ?

    &#xA;

  • python ffmpeg can't save gif ,but can save mp4

    21 février 2019, par water

    I use python(jupyter) ffmpeg in mac , the main code is as follows :

    import numpy as np
    from matplotlib import pyplot as plt
    from matplotlib import animation
    plt.rcParams['animation.ffmpeg_path'] = '/Users/water/anaconda/bin/ffmpeg'
    fig = plt.figure()
    ax = plt.axes(xlim=(0, 2), ylim=(-2, 2))
    line, = ax.plot([], [], lw=2)

    def init():
       line.set_data([], [])
       return line,

    def animate(i):
       x = np.linspace(0, 2, 1000)
       y = np.sin(2 * np.pi * (x - 0.01 * i))
       line.set_data(x, y)
       return line,

    anim = animation.FuncAnimation(fig, animate, init_func=init,
                                  frames=200, interval=20, blit=True)

    mywriter = animation.FFMpegWriter()
    anim.save('mymovie.mp4',writer=mywriter)

    plt.show()

    this will be right ,no error.
    but i want to save as gif, I change this part :

    anim.save('mymovie.gif',writer=mywriter)

    I get the error as follows :

        37         except (AttributeError, TypeError, ValueError):
        38             raise ValueError("Invalid file object: "
    ---> 39                              "{!r}".format(fileobj)) from None
        40     if fd &lt; 0:
        41         raise ValueError("Invalid file descriptor: {}".format(fd))

    ValueError: Invalid file object: &lt;_io.BufferedReader name=70>

    can anyone tell why gif is error and mp4 is oK ? and how to solve this problem

  • Add logo or watermark to Converted video using ffmpeg and PHP

    27 mars 2022, par Medicare Advisors

    We are converting videos to MP4 using FFMPEG.

    &#xA;

    We did a lot of research, however we cannot figure out how to add the company logo as a logo or a water mark to the converted video

    &#xA;

    PHP code

    &#xA;

    &lt;?php &#xA;$uploads_dir = &#x27;original/&#x27;;&#xA;$file_name = basename($_FILES[&#x27;file&#x27;][&#x27;name&#x27;]);&#xA;$output_name = explode(&#x27;.&#x27;, $file_name)[0];&#xA;$uploaded_file = $uploads_dir . $file_name;&#xA;$convert_status = [&#x27;mp4&#x27; => 0, &#x27;webm&#x27; => 0];&#xA;&#xA;if(isset($_POST[&#x27;submit&#x27;])) {&#xA;  if(move_uploaded_file($_FILES[&#x27;file&#x27;][&#x27;tmp_name&#x27;], $uploaded_file)) {&#xA;    // Make sure to get the correct path to ffmpeg&#xA;    // Run $ where ffmpeg to get the path&#xA;    $ffmpeg = &#x27;/bin/ffmpeg&#x27;;&#xA;    &#xA;    // MP4&#xA;    $video_mp4 = $output_name . &#x27;.mp4&#x27;;&#xA;    exec($ffmpeg . &#x27; -i "&#x27; . $uploaded_file . &#x27;" -vcodec h264 -acodec libfdk_aac "./converted/&#x27; . $video_mp4 . &#x27;" -y 1>convert.txt 2>&amp;1&#x27;, $output, $convert_status[&#x27;mp4&#x27;]);&#xA;&#xA;    // Debug&#xA;    // echo &#x27;<pre>&#x27; . print_r($output, 1) . &#x27; </pre>&#x27;;&#xA;&#xA;   &#xA;&#xA;    // Debug&#xA;    // echo &#x27;<pre>&#x27; . print_r($output, 1) . &#x27; </pre>&#x27;;&#xA;  }&#xA;}&#xA;?>&#xA;

    &#xA;

    The logo we want to add is on : https://propeview.com/wp-content/uploads/2021/08/logo-whiteb.png

    &#xA;