Recherche avancée

Médias (3)

Mot : - Tags -/spip

Autres articles (22)

  • 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

  • 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

  • Selection of projects using MediaSPIP

    2 mai 2011, par

    The examples below are representative elements of MediaSPIP specific uses for specific projects.
    MediaSPIP farm @ Infini
    The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...)

Sur d’autres sites (6124)

  • Creating an ffmpeg html/php form process and need ffmpeg technical feedback

    7 juin 2016, par dave

    I have decided to create an input form for ffmpeg to go with my video uploader.

    This is for my video uploader plugin for a social site software. Users have told me that they want technical options for videos so they can choose the specific options they want including thumbnail options.

    I have been reading the ffmpeg docs most of the morning as well as watching some videos and i have come up with a rough draft of my form. The videos uploaded will more than likely be non gaming, personal and hobby videos.

    The goal here is to have a form that is easy enough for the non technical user, but technical for those that want the options. So i do plan to have a checkbox which allows the non technical user to skip the technical settings. This will result in a generic ffmpeg command with default settings. If they choose to use the technical specs then it will create a more specific ffmpeg command stream.

    here is what i have so far in the draft.

    select max size options ’50MB’,’100MB’,’200MB’,’500MB’,’650MB’,’750MB’,’1GB’,’2GB’,’3GB’

    input for thumbcapture in seconds maxlength 2 size 2

    input for video in ’mpg’,’wma’,’mov’,’flv’,’mp4’,’avi’,’qt’,’wmv’,’rm’

    option for video size ’200x100’,’320x240’,’560x315’,’640x360’,’853x480’,’1280x720’ not sure if i want to offer a custom slot or not.

    my thought here is that if they do not want the tech version of the form then the codecs will be b:v copy b:a copy (if that is the smart way to do it) or just left out and let ffmpeg decide what is best.

    ===== this is the technical part of the form =======

    select for acodec options copy, mp3, mp1, mp2, dnet, 28_8, wmav2, alac, cook

    select for vcodec option copy, ffv1, ms-cram, mpeg-4, rv40, wmv, xvid, mov, qt, avchd

    select for bitrate audio 32k, 64k, 128k

    select for bitrate video 1000k, 1200k, 1500k

    select for sampling rate 22050, 44100

    input for crf(mp4 out only) size 2 maxlength 2 minval 2 maxval 49

    input for avi quantanizer (avi out only) size 2 maxlength 2 minval 2 maxval 49

    ===== end technical form =====================

    select for video out ’avi’,’mp4’,’flv’

    that is what i have so far. How does that combination on the technical side look to you ffmpeg pros ?

    Any suggestions ? :)

  • OpenCV VideoWriter Not Writing to Output.avi

    20 mai 2020, par R.Zane

    I'm attempting to write a simple bit of code that takes a video, crops it, and writes to an output file.

    



    System Setup :

    



    OS: Windows 10
Conda Environment Python Version: 3.7
OpenCV Version: 3.4.2
ffmpeg Version: 2.7.0


    



    File Input Specs :

    



    Codec: H264 - MPEG-4 AVC (part 10)(avc1)
Type: Video
Video resolution: 640x360
Frame rate: 5.056860


    



    Code failing to produce output (it creates the file but doesn't write to it) :

    



    import numpy as np
import cv2

cap = cv2.VideoCapture('croptest1.mp4')

# Define the codec and create VideoWriter object
fourcc = cv2.VideoWriter_fourcc('F', 'M', 'P', '4')
out = cv2.VideoWriter('output.avi', fourcc, 20.0,
                      (int(cap.get(3)), int(cap.get(4))))

# Verify input shape
width = cap.get(3)
height = cap.get(4)
fps = cap.get(5)
print(width, height, fps)

while(cap.isOpened()):
    ret, frame = cap.read()
    if ret == True:
        # from top left =frame[y0:y1, x0:x1]
        cropped_frame = frame[20:360, 0:640]

        # write the clipped frames
        out.write(cropped_frame)

        # show the clipped video
        cv2.imshow('cropped_frame', cropped_frame)
        if cv2.waitKey(1) & 0xFF == ord('q'):
            break
    else:
        break

# Release everything if job is finished
cap.release()
out.release()
cv2.destroyAllWindows()


    



    Variations to fourcc and out variables tried to get codec to work :

    



    fourcc = cv2.cv.CV_FOURCC(*'DIVX')
fourcc = cv2.VideoWriter_fourcc(*'DIVX')

out = cv2.VideoWriter('ditch_effort.avi', -1, 20.0, (640, 360))


    



    Based on this link I should be able to refer to this fourcc reference list to determine the appropriate fourcc compression code to use. I have tried a bunch of variations, but cannot get the output file to be written. When I run the code, the #verify input shape variables print the corresponding 640, 360 and correct Frame Rate.

    



    Can any one tell me what my issue is...would be much appreciated.

    


  • Joining/Concatenating more than one video files in Java Spring Boot

    7 décembre 2020, par Rohan Shah

    I am trying to join/concate multiple files in Java, so far the procedure that I was following (https://github.com/bramp/ffmpeg-cli-wrapper) was going alright, but in this procedure, there were a couple of lines that I could not understand.

    


    Code I am following :

    


    FFmpeg ffmpeg = new FFmpeg("/path/to/ffmpeg");
FFprobe ffprobe = new FFprobe("/path/to/ffprobe");

FFmpegBuilder builder = new FFmpegBuilder()

  .setInput("input.mp4")     // Filename, or a FFmpegProbeResult
  .addInput("input2.mp4")    // <--------------------------------  Second file that I added
  .overrideOutputFiles(true) // Override the output if it exists

  .addOutput("output.mp4")   // Filename for the destination
    .setFormat("mp4")        // Format is inferred from filename, or can be set
    .setTargetSize(250_000)  // Aim for a 250KB file

    .disableSubtitle()       // No subtiles

    .setAudioChannels(1)         // Mono audio
    .setAudioCodec("aac")        // using the aac codec
    .setAudioSampleRate(48_000)  // at 48KHz
    .setAudioBitRate(32768)      // at 32 kbit/s

    .setVideoCodec("libx264")     // Video using x264
    .setVideoFrameRate(24, 1)     // at 24 frames per second
    .setVideoResolution(640, 480) // at 640x480 resolution

    .setStrict(FFmpegBuilder.Strict.EXPERIMENTAL) // Allow FFmpeg to use experimental specs
    .done();

FFmpegExecutor executor = new FFmpegExecutor(ffmpeg, ffprobe);

// Run a one-pass encode
executor.createJob(builder).run();

// Or run a two-pass encode (which is better quality at the cost of being slower)
executor.createTwoPassJob(builder).run();


    


    These are the lines throwing error :

    


    FFmpeg ffmpeg = new FFmpeg("/path/to/ffmpeg");
FFprobe ffprobe = new FFprobe("/path/to/ffprobe");


    


    In these lines, I am providing a path like this,

    


    FFmpeg ffmpeg = new FFmpeg("D:/");
FFprobe ffprobe = new FFprobe("D:/");


    


    which leads to an error

    


    java.io.IOException: CreateProcess error=5


    


    I believe the ffmpeg in /path/to/ffmpeg and ffprobe in /path/to/ffprobe are files, not directories, which is why it threw an execution permission error, but as I looked into the repository (link given above) I was not able to find this particular file in the given link.

    


    There were a couple of Java files named ffmpeg.java and ffprobe.java, but when I tried using them in the code then I got the same error, so I want to know which files am I supposed to have in these paths