Recherche avancée

Médias (2)

Mot : - Tags -/rotation

Autres articles (69)

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

Sur d’autres sites (11393)

  • #/bin/sh in one line

    27 juillet 2012, par GoodGuyGreg

    I'm working on some Haskell project using FFmpeg. I need to batch create from a media folder with MP4 files and create screenshots from all of them. I got the code and am using it on a terminal in Unix. It works, but how do I make it in one line to be executed in system "xxxx" in Haskell ?

    If not using several system"xx"...

    #/bin/sh
    for i in $(ls *.mp4)
    do
       ffmpeg -i $i -vframes 7 -y -ss 10 -s 150x150 -an -sameq -f image2 -r 1/5  $i%1d.jpg
    done

    I tried :

    import System.Cmd
    function = do{system "#/bin/sh";
    system "for i in $(ls *.mp4)";
    system "do";
    system "ffmpeg -i $i -vframes 7 -y -ss 10 -s 150x150 -an -sameq -f image2 -r 1/5  $i%1d.jpg";
    system "done";}

    but it gives a error :

    -vframes: No such file or directory
    /bin/sh: Syntax error: "done" unexpected
  • How to convert .fbx to frame images

    24 mai 2024, par Ittefaq Technologies

    I wanna to need help that i wanna to convert .fbx to video through script and i found a soluotion to do it through FFmpeg but it not supports .fbx so i need help in to get frame images so i can make video through ffmpeg or if i am goin in wrong direction you can help me

    


    I tried to convert a .fbx file to .obj using three.js and then create a video from the .obj file, but it didn't work.

    


        <code class="echappe-js">&lt;script&gt;&amp;#xA;        // Function to load FBX using FBXLoader&amp;#xA;        function loadFBX(blob, loader, callback) {&amp;#xA;            var url = URL.createObjectURL(blob);&amp;#xA;            loader.load(url, function(object) {&amp;#xA;                callback(object);&amp;#xA;            });&amp;#xA;        }&amp;#xA;&amp;#xA;        // Function to export THREE.Object3D to OBJ format using OBJExporter&amp;#xA;        function exportToOBJ(object, callback) {&amp;#xA;            var exporter = new THREE.OBJExporter();&amp;#xA;            var result = exporter.parse(object);&amp;#xA;            callback(result);&amp;#xA;        }&amp;#xA;&amp;#xA;        // Function to send OBJ file to PHP script&amp;#xA;        function sendToPHP(objBlob, fileName) {&amp;#xA;            var formData = new FormData();&amp;#xA;            formData.append(&amp;#x27;objFile&amp;#x27;, objBlob, fileName);&amp;#xA;&amp;#xA;            var xhr = new XMLHttpRequest();&amp;#xA;            xhr.open(&amp;#x27;POST&amp;#x27;, &amp;#x27;convert.php&amp;#x27;, true);&amp;#xA;            xhr.onload = function() {&amp;#xA;                if (xhr.status === 200) {&amp;#xA;                    console.log(&amp;#x27;Conversion successful:&amp;#x27;, xhr.responseText);&amp;#xA;                } else {&amp;#xA;                    console.error(&amp;#x27;Conversion failed:&amp;#x27;, xhr.responseText);&amp;#xA;                }&amp;#xA;            };&amp;#xA;            xhr.send(formData);&amp;#xA;        }&amp;#xA;&amp;#xA;        // Function to convert FBX to OBJ&amp;#xA;        function convertToOBJ() {&amp;#xA;            var fileInput = document.getElementById(&amp;#x27;fileInput&amp;#x27;);&amp;#xA;            var file = fileInput.files[0];&amp;#xA;&amp;#xA;            if (file) {&amp;#xA;                var reader = new FileReader();&amp;#xA;                reader.onload = function(event) {&amp;#xA;                    var arrayBuffer = event.target.result;&amp;#xA;                    var blob = new Blob([arrayBuffer]);&amp;#xA;                    var loader = new THREE.FBXLoader();&amp;#xA;                    loadFBX(blob, loader, function(object) {&amp;#xA;                        exportToOBJ(object, function(objText) {&amp;#xA;                            var objBlob = new Blob([objText], { type: &amp;#x27;text/plain&amp;#x27; });&amp;#xA;                            sendToPHP(objBlob, file.name.split(&amp;#x27;.&amp;#x27;)[0] &amp;#x2B; &amp;#x27;.obj&amp;#x27;);&amp;#xA;                        });&amp;#xA;                    });&amp;#xA;                };&amp;#xA;                reader.readAsArrayBuffer(file);&amp;#xA;            } else {&amp;#xA;                alert(&amp;#x27;Please select an FBX file to convert.&amp;#x27;);&amp;#xA;            }&amp;#xA;        }&amp;#xA;    &lt;/script&gt;&#xA;

    &#xA;

    &lt;?php&#xA;&#xA;&#xA;// Check if form submitted and file uploaded&#xA;if ($_SERVER["REQUEST_METHOD"] == "POST" &amp;&amp; isset($_FILES["objFile"])) {&#xA;    $objFile = $_FILES["objFile"];&#xA;    $objFilePath = $objFile["tmp_name"];&#xA;    $outputVideo = &#x27;output.mp4&#x27;;&#xA;&#xA;    // Execute FFmpeg command to convert OBJ to video&#xA;    exec("ffmpeg -i \"$objFilePath\" $outputVideo", $output, $returnCode);&#xA;&#xA;    if ($returnCode === 0) {&#xA;        echo &#x27;Conversion successful&#x27;;&#xA;    } else {&#xA;        echo &#x27;Conversion failed&#x27;;&#xA;    }&#xA;} else {&#xA;    echo &#x27;No OBJ file uploaded&#x27;;&#xA;}&#xA;?>&#xA;&#xA;

    &#xA;

  • Basic "pass-through" use of FFmpegReader/FFmpegWriter in scikit-video

    6 février 2021, par JonathanZ supports MonicaC

    I am starting to use scikit-video and am having trouble writing files. I have reduced the problem to the simplest possible example

    &#xA;

    vid_file = "6710185719062326259_stamp_25pct.mp4"&#xA;output_file = "out_temp3.mp4"&#xA;reader = skvideo.io.FFmpegReader(vid_file)&#xA;writer = skvideo.io.FFmpegWriter(output_file)&#xA;for frame in reader.nextFrame():&#xA;        writer.writeFrame(frame)&#xA;writer.close()&#xA;

    &#xA;

    I'm playing the files in VLC, and the vid_file is valid but the output file, though playable, is mostly big green blocks (though I can discern some details from the original video in it).

    &#xA;

    My goal, or course, is to do "interesting" manipulations of the frame before I write it out, but I need to get the "no modifications" version working correctly first. I'm also going to be using this on large files, so the vread/vwrite functions that process an entire file at once are not appropriate.

    &#xA;

    I'm guessing I need to set the appropriate values in the outputdict parameter for the FFmpegWriter, but there are so many that I don't know where to start. I have tried

    &#xA;

    writer = skvideo.io.FFmpegWriter(output_file, outputdict={&#x27;-crf&#x27;: &#x27;0&#x27;, &#x27;-pix_fmt&#x27;: &#x27;rgb24&#x27;})&#xA;

    &#xA;

    (-crf 0 to suppress any compression, -pixfmt rgb24 as that's what FFmpegReader says it delivers by default, but these don't work either.

    &#xA;

    Any ideas on how to make this work ?

    &#xA;

    Here's the skvideo.io.ffprobe video information for the input file.

    &#xA;

    {&#xA;    "@index": "0",&#xA;    "@codec_name": "h264",&#xA;    "@codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",&#xA;    "@profile": "High",&#xA;    "@codec_type": "video",&#xA;    "@codec_time_base": "1/30",&#xA;    "@codec_tag_string": "avc1",&#xA;    "@codec_tag": "0x31637661",&#xA;    "@width": "480",&#xA;    "@height": "270",&#xA;    "@coded_width": "480",&#xA;    "@coded_height": "272",&#xA;    "@has_b_frames": "2",&#xA;    "@pix_fmt": "yuv420p",&#xA;    "@level": "21",&#xA;    "@chroma_location": "left",&#xA;    "@refs": "1",&#xA;    "@is_avc": "true",&#xA;    "@nal_length_size": "4",&#xA;    "@r_frame_rate": "15/1",&#xA;    "@avg_frame_rate": "15/1",&#xA;    "@time_base": "1/15360",&#xA;    "@start_pts": "0",&#xA;    "@start_time": "0.000000",&#xA;    "@duration_ts": "122880",&#xA;    "@duration": "8.000000",&#xA;    "@bit_rate": "183806",&#xA;    "@bits_per_raw_sample": "8",&#xA;    "@nb_frames": "120",&#xA;    "disposition": {&#xA;        "@default": "1",&#xA;        "@dub": "0",&#xA;        "@original": "0",&#xA;        "@comment": "0",&#xA;        "@lyrics": "0",&#xA;        "@karaoke": "0",&#xA;        "@forced": "0",&#xA;        "@hearing_impaired": "0",&#xA;        "@visual_impaired": "0",&#xA;        "@clean_effects": "0",&#xA;        "@attached_pic": "0",&#xA;        "@timed_thumbnails": "0"&#xA;    },&#xA;    "tag": [&#xA;        {&#xA;            "@key": "language",&#xA;            "@value": "und"&#xA;        },&#xA;        {&#xA;            "@key": "handler_name",&#xA;            "@value": "VideoHandler"&#xA;        }&#xA;    ]&#xA;}&#xA;

    &#xA;

    I will mention that when I ffprobe the output file the only differences I see are 1) the timing data is different, which isn't surprising, and 2) the output file has

    &#xA;

        "@has_b_frames": "0",&#xA;    "@pix_fmt": "yuv444p",&#xA;

    &#xA;

    I'm pretty confident the reader is working okay, because if I write out the data with

    &#xA;

    skimage.io.imsave(&#x27;x.png&#x27;, frame,  check_contrast=False)&#xA;

    &#xA;

    it looks good.

    &#xA;