Recherche avancée

Médias (1)

Mot : - Tags -/net art

Autres articles (65)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • 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

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

Sur d’autres sites (9435)

  • Why does subprocess.run() have unexpected behavior in try else block ?

    27 novembre 2023, par Nikita Savenkov

    Trying to make a "to mp4" converter function using ffmpeg that is going to convert a file to mp4, delete the original file, and return True or False for specific conditions.
But I get some unexpected behavior of a subprocess.

    


    Initially I used this construction :

    


    def to_mp4_converter(file):

    input_file = file
    output_file = f"{re.sub(r'\..+$', "", file)}.mp4"

    try:
        subprocess.run(['ffmpeg', '-i', input_file, output_file])
    except subprocess.SubprocessError as e:
        print(f"Subprocess Error: {e}")
        return False
    else:
        try:
            os.remove(path=file)
        except OSError as e:
            print(f"Can't remove {file} file: {e}")
        finally:
            return True


    


    Original file is removed, but output file is half of the expected size and quality of video is low.

    


    But if I place subprocess.run() and os.remove() into separate try else blocks like that :

    


    def to_mp4_converter(file):

    input_file = file
    output_file = f"{re.sub(r'\..+$', "", file)}.mp4"

    try:
        subprocess.run(['ffmpeg', '-i', input_file, output_file])
    except subprocess.SubprocessError as e:
        print(f"Subprocess Error: {e}")
        return False
    else:
        pass

    try:
        os.remove(path=file)
    except OSError as e:
        print(f"Can't remove {file} file: {e}")
    finally:
        return True


    


    Everything works fine.

    


    Isn't subprocess.run() should be a blocking operation, so the else statement in 1st example is unreachable until conversion is done ?

    


  • FFMPEG - how to convert large file to much smaller file to view on LG smart TV

    18 juin 2019, par PAW

    I have edited a home movie thru Davinci Resolve and the output has been rendered/saved on my PC. For some strange reason it seems huge and nothing will play it (apart from within Resolve itself) and none of my conversion software will convert it from the huge file to something smaller I can watch on my LG smart TV (handbrake, video converter).

    I downloaded FFMPEG and installed it, then ran a command to examine the file. Results posted here. Does this mean that FFMPEG has found the codec and I can convert it ? and has anyone any suggestions on what to convert it to ?

    Many thanks

    ffmpeg -i C:\Users\PAW\Videos\Resolve\untitled.mov

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\PAW\Videos\Resolve\untitled.mo
    v':

     Metadata:

       major_brand     : qt
       minor_version   : 512
       compatible_brands: qt
       encoder         : Lavf57.25.100

    Duration: 01:09:43.81, start: 0.000000, bitrate: 390431 kb/s
       Stream #0:0(eng): Video: dnxhd (DNXHR 444) (AVdh / 0x68645641), yuv444p12le(
    tv, bt709/unknown/unknown), 1280x720, 388894 kb/s, 59.94 fps, 59.94 tbr, 60k tbn
    , 60k tbc (default)

       Metadata:
         handler_name    : Core Media Data Handler
         timecode        : 01:00:00:00
       Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, stereo, s1
    6, 1536 kb/s (default)
       Metadata:
         handler_name    : Core Media Data Handler
       Stream #0:2(eng): Data: none (tmcd / 0x64636D74)
       Metadata:
         handler_name    : Core Media Data Handler
         timecode        : 01:00:00:00
  • Running an Terminal command inside a Directory

    22 janvier 2014, par user3220153

    I want to run and tell ffmpeg, a video converter, to combine an audio and video file to one video file. I want to do this in terminal so I can do this repeatedly and quickly.

    This works in Terminal :

    [directoryX]/ ffmpeg -i [directoryX]/sound.wav -i [directoryX]/movie.avi video_finale.mpg
    Pause

    But I do NOT want to keep specifying the directory in Terminal because there are many folders in which I need to do this. I would like to create a .command file, copy it and the ffmpeg application (very small), and past it in every folder that needs a video conversion. I would then run the .command file and it would execute the command mentioned above in the local folder. What is the best way to approach this ???

    This line in .command file does NOT work (inside the folder with ffmpeg, audio and video) :

    ffmpeg -i sound.wav -i movie.avi video_finale.mpg
    Pause

    I get :

    wireless-10-146-122-30:~ yagostucky$ /Volumes/TURBOLINEA/inFrontOfMe/footage/jan-19-2014/dollGhost_duke_act1_scene3_take1/batch.command ; exit;
    /Volumes/TURBOLINEA/inFrontOfMe/footage/jan-19-2014/dollGhost_duke_act1_scene3_take1/batch.command: line 1: ffmpeg: command not found
    /Volumes/TURBOLINEA/inFrontOfMe/footage/jan-19-2014/dollGhost_duke_act1_scene3_take1/batch.command: line 2: pause: command not found
    logout

    [Process completed]