Recherche avancée

Médias (0)

Mot : - Tags -/clipboard

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

Autres articles (52)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

Sur d’autres sites (8072)

  • Some Java Process objects finish and close, but some finish and stall

    28 mars 2020, par brendanw36

    My program uses ProcessBuilder to make various calls to ffmpeg. My problem is that with certain commands I can create a Process, have it run, and when it is done it will terminate/exit/close itself and the program will end whereas other commands will run and create a finished output (in my case it will finish encoding a file with no corruption or anything at the end of the video), but won’t close at which point I need to force terminate the program. I have tested the ffmpeg commands that I am running in Windows Command Prompt and they all run fine without need for user input or anything. I will show some examples of commands that do and don’t work, but ultimately what I need is a way to tell why certain Processes do and don’t work. You probably don’t even need to read the rest of this post if you know the inner workings of the Process class better than I do.

    How I create my processes :

    ProcessBuilder pb = new ProcessBuilder(commandGoesHere);
    Process p = pb.start();
    p.waitFor();

    Works :
    ffmpeg -i test.y4m -f segment -segment_times timecodeList .temp/sgmnt_%d.y4m

    This command takes a y4m(raw video format/large file size/1.7 GB for 53s of 720p video) and cuts it in to chunks.

    Doesn’t work (sometimes) :
    ffmpeg -i chunkname.y4m outputName.mkv

    This command takes the chunked video and encodes it as h.264/AVC video. When I create a process with this command it only works if the chunk is small in which case the Process will start, do its work, and close.

    Doesn’t work ever :
    ffmpeg -i test.mkv -c:v copy -f segment -segment_times timecodeList .temp/sgmnt_%d.mkv

    This command takes and h.264/AVC input video and cut it in to chunks, but this one doesn’t terminate/exit/close when it’s done. I’m forced to terminate the program which I do after seeing the Process’s CPU utilization drop to 0% in Task Manager. When I force terminate the program and check the output folder, all the chunks are there and not corrupted so I know it finished running successfully.

  • How to Terminate a Process Normally Created using ProcessBuilder

    22 avril, par Bilal Ahmed Yaseen

    I am creating Processes using ProcessBuilder in my Java Application. The created process executes some FFMPEG commands which actually copy the RTSP streams in specified destination media file.

    


    ProcessBuilder builder = new ProcessBuilder("ffmpeg", "-i", RTSP_URL, "-f", fileFormat, destFilePath);
Process processToExecute = builder.start();


    


    I want to close the process before it completes its execution. So, If I run this FFMPEG command directly in windows CMD and then press 'CTRL+C' after 5 seconds then process get terminates with status '2'. And I can play the media file created so far.

    


    So, If I do the same operation in my Java Application using :

    


     process.destroy(); //I call this method after 5 sec


    


    I get the status code '1' which means abnormal termination. I get the status by the following way :

    


     processToExecute.destroy();
 processToExecute.exitValue(); //This return me status '1'


    


    And I can't play the media file and I think this is due to the abnormal termination of the process.

    


    So how I can terminate the process created using ProcessBuilder in the same way we do in CMD with (CTRL+C) so that I may play the created media file ?

    


    I want to terminate process (created using ProcessBuilder) in Java Application with status code of '2' that I get when I terminate process using CMD.

    


    EDIT#01 : --- Sharing Findings

    


    So, when I try to delete that file once app terminates, I get the following error :

    


    The Action Can't be Performed Because File is Opened in FFMPEG.exe


    


    Which means that process is not terminating the command it is executing. That command still has occupied this file that's why I am not getting able to play it. Process gets terminate when I call :

    


     processToExecute.destroy();


    


    But, the task it is performing (that is execution of a command) is still active. Strange !!!!

    


    EDIT#02 : Sharing Ultimate Reason

    


    Actually If I directly press 'CTRL+C' or 'q' in cmd when process is running then it terminates the process successfully and this process is no more visible in the currently executing processes lists.

    


    And Programatically when I call method :

    


    cmd> processToExecute.destroy();


    


    It terminates the process but when I see the list of currently executing processes I can still see them over there.

    


    And same scenario exists If I try to terminate this process using 'taskkill' or 'kill' command in another CMD by specifying their's name or pid that still process terminates abnormally.

    


    P.S. I use the following command to see the running processes :

    


    tasklist


    


    So from this it proves that destroy() method from Application and 'taskkill or kill' command from another CMD is not terminating the process normally that pressing 'CTRL+C' and 'q' does.

    


  • How to Terminate a Process Normally Created using ProcessBuilder

    30 janvier 2015, par Bilal Ahmed Yaseen

    I am creating Processes using ProcessBuilder in my Java Application. The created process executes some FFMPEG commands which actually copy the RTSP streams in specified destination media file.

    ProcessBuilder builder = new ProcessBuilder("ffmpeg", "-i", RTSP_URL, "-f", fileFormat, destFilePath);
    Process processToExecute = builder.start();

    I want to close the process before it completes its execution. So, If I run this FFMPEG command directly in windows CMD and then press ’CTRL+C’ after 5 seconds then process get terminates with status ’2’. And I can play the media file created so far.

    So, If I do the same operation in my Java Application using :

    process.destroy(); //I call this method after 5 sec

    I get the status code ’1’ which means abnormal termination. I get the status by the following way :

    processToExecute.destroy();
    processToExecute.exitValue(); //This return me status '1'

    And I can’t play the media file and I think this is due to the abnormal termination of the process.

    So how I can terminate the process created using ProcessBuilder in the same way we do in CMD with (CTRL+C) so that I may play the created media file ?

    I want to terminate process (created using ProcessBuilder) in Java Application with status code of ’2’ that I get when I terminate process using CMD.

    EDIT#01 : --- Sharing Findings

    So, when I try to delete that file once app terminates, I get the following error :

    The Action Can't be Performed Because File is Opened in FFMPEG.exe

    Which means that process is not terminating the command it is executing. That command still has occupied this file that’s why I am not getting able to play it. Process gets terminate when I call :

    processToExecute.destroy();

    But, the task it is performing (that is execution of a command) is still active. Strange !!!!

    EDIT#02 : Sharing Ultimate Reason

    Actually If I directly press ’CTRL+C’ or ’q’ in cmd when process is running then it terminates the process successfully and this process is no more visible in the currently executing processes lists.

    And Programatically when I call method :

    cmd> processToExecute.destroy();

    It terminates the process but when I see the list of currently executing processes I can still see them over there.

    And same scenario exists If I try to terminate this process using ’taskkill’ or ’kill’ command in another CMD by specifying their’s name or pid that still process terminates abnormally.

    P.S. I use the following command to see the running processes :

    tasklist

    So from this it proves that destroy() method from Application and ’taskkill or kill’ command from another CMD is not terminating the process normally that pressing ’CTRL+C’ and ’q’ does.