Recherche avancée

Médias (1)

Mot : - Tags -/artwork

Autres articles (59)

  • MediaSPIP Core : La Configuration

    9 novembre 2010, par

    MediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
    Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, 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 (...)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

Sur d’autres sites (7048)

  • React-Native FFmpeg-kit VideoCompress command not working

    6 septembre 2024, par Brian

    I'm Using FFmpeg-kit's React-Native Kit

    


    And I want to encode H264 to HEVC.
But the Videotoolbox in ios not working

    


    I use "ffmpeg-kit-react-native" : "^6.0.2"
And here is my Code

    


            // hevc_videotoolbox
        await FFmpegKit.execute(`-i ${videoUri} -c:v hevc_videotoolbox  -c:a aac -tag:v hvc1 -movflags +faststart -y ${outputUri}`);
      } else {
        await FFmpegKit.execute(`-i ${videoUri} -c:v hevc_omx -c:a aac -tag:v hvc1 -movflags +faststart -y ${outputUri}`);
      }


    


    But I got the error follwed like this

    


     LOG    libavutil      58.  2.100 / 58.  2.100
 LOG    libavcodec     60.  3.100 / 60.  3.100
 LOG    libavformat    60.  3.100 / 60.  3.100
 LOG    libavdevice    60.  1.100 / 60.  1.100
 LOG    libavfilter     9.  3.100 /  9.  3.100
 LOG    libswscale      7.  1.100 /  7.  1.100
 LOG    libswresample   4. 10.100 /  4. 10.100
 LOG  Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 
 LOG    Metadata:
 LOG      major_brand     :
 LOG  mp42
 LOG  
 LOG      minor_version   :
 LOG  1
 LOG  
 LOG      compatible_brands:
 LOG  isommp41mp42
 LOG  
 LOG      creation_time   :
 LOG  2024-08-29T02:42:24.000000Z
 LOG  
 LOG    Duration:
 LOG  00:00:23.10
 LOG  , start:
 LOG  0.000000
 LOG  , bitrate:
 LOG  1223 kb/s
 LOG  
 LOG    Stream #0:0
 LOG  [0x1]
 LOG  (und)
 LOG  : Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 640x360 [SAR 1:1 DAR 16:9], 1220 kb/s
 LOG  ,
 LOG  30 fps,
 LOG  30 tbr,
 LOG  600 tbn
 LOG   (default)
 LOG  
 LOG      Metadata:
 LOG        creation_time   :
 LOG  2024-08-29T02:42:24.000000Z
 LOG  
 LOG        handler_name    :
 LOG  Core Media Video
 LOG  
 LOG        vendor_id       :
 LOG  [0][0][0][0]
 LOG  
 LOG  Stream mapping:
 LOG    Stream #0:0 -> #0:0
 LOG   (h264 (native) -> hevc (hevc_videotoolbox))
 LOG  
 LOG  Press [q] to stop, [?] for help
 LOG  [hevc_videotoolbox @ 0x11af89120] Error encoding frame: -12905
 LOG  [hevc_videotoolbox @ 0x11af89120] popping: -542398533
 LOG  [vost#0:0/hevc_videotoolbox @ 0x11af88e50] Error initializing output stream: Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
 LOG  Conversion failed!


    


    How can I fix this error ?

    


    I read the
stack overflow

    


      

    1. Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
    2. 


    


    2.https://stackoverflow.com/questions/77734601/react-native-ffmpeg-producing-unplayable-hevc-videos-that-still-have-audio

    


    But that links doesn't work for me
I want to compress video's compressing with react-native on ios and android for reducing server cost

    


  • Pyinstaller Hidden import 'ffmpeg-python' not found

    13 août 2024, par petunia rose

    Trying to convert Python scripts to exe with PyInstaller.

    


    In my code, I use ffmpeg-python :

    


    import ffmpeg
....
def ffmpeg_save_clip(self,output_video: str, clip_start: str, clip_end: str): 
  (ffmpeg 
   .input(self.file.get_videopath(), ) 
   .output(output_video, vcodec='copy', ss=clip_start, to=clip_end, acodec='copy') 
   .global_args('-y') 
   .run())


    


    So Ii call PyInstaller from terminal with related flag :

    


    pyinstaller --windowed --hidden-import "ffmpeg-python" --noconsole --icon=app.ico --name "app" main.py 


    


    I checked also :

    


    pip install ffmpeg-python 
Requirement already satisfied: ffmpeg-python in c:\python38\lib\site-packages (0.2.0) 
Requirement already satisfied: future in c:\python38\lib\site-packages (from ffmpeg-python) (0.18.3)


    


    But I get from PyInstaller :

    


    Hidden import 'ffmpeg-python' not found


    


    App works in visual-studio, but when I run pyinstaller exe and try to save clip, it freeze without response.

    


    Note : I also :

    


      

    1. try to add ffmpeg.exe into root folder of pyinstaller app.

      


    2. 


    3. try to use .spec file with :

      


      binaries=[('C:\\ffmpeg\\bin\\ffmpeg.exe', 'ffmpeg/),('C:\\ffmpeg\\bin\\ffplay.exe','ffplay/'), ('C:\\ffmpeg\\bin\\ffprobe.exe', 'ffprobe/')],

      


    4. 


    


    Nothing changes

    


    UPDATE
Tank you @happy_code_egg, you explained me such a things.
I tried what you said and I don't have error any more.

    


    But I can't make work ffmpeg anywhere on Pyinstaller exe.
I added a try/except block to isolate problem
(when I launch app on Visualstudio it works, but not when use exe).

    


    block is (very symilar to past def) :

    


    def ffmpeg_save_clip(self,output_video: str, clip_start: str, clip_end: str):
    input = 'C:\Users\x\Desktop\input.mp4'
    output = 'C:\Users\x\Desktop\output.mp4'
    try:
        (ffmpeg
        .input(input)
        .output(output, vcodec='copy', ss=clip_start, to=clip_end, acodec='copy')
        .global_args('-y')
        .run(capture_stdout=True))
    except Exception as e:
        self.logger.error('Video window -> ffmpeg_save_clip -> error ' + str(e))
        self.logger.error('Video window -> ffmpeg_save_clip -> input file: ' + input)
        self.logger.error('Video window -> ffmpeg_save_clip -> output file ' + output)
        raise ValueError(str(e))


    


    Note : (input and output fixed are only as simple path examples)

    


    When I open log I have :

    


    2024-08-09 11:28:50,293 - ERROR - Video window -> ffmpeg_save_clip -> error [WinError 2] File not found error
2024-08-09 11:28:50,293 - ERROR - Video window -> ffmpeg_save_clip -> input file: C:\Users\x\Desktop\input.mp4
2024-08-09 11:28:50,293 - ERROR - Video window -> ffmpeg_save_clip -> output file C:\Users\x\Desktop\ouput.mp4


    


    (I tried with '/' and also '\' to create path)
File paths are correct and, on Visualstudio, they can be processed by ffmpeg (no error), but the exe seems to not find (input or output)

    


    I tried solution described here :
Python ffmpeg won't accept path
(without effects)

    


    I found also these discussions :

    


    github ffmpeg-python issue1

    


    github ffmpeg-python issue2

    


    in both discussions seems to be a problem with ffmpeg + ffmpeg-python libs cohexistence.

    


    I tried (as said) to uninstal both and reinstall ffmpeg-python,
but nothing change.

    


    Note :
I've also three other warning during Pyinstaller :
(I write them only to complete context, but i think they have no repercussions on this problem.)

    


    57283 ERROR: Hidden import 'fiona._shim' not found
57298 WARNING: Hidden import "fiona._shim" not found!
57392 WARNING: Hidden import "importlib_resources.trees" not found!


    


    tried with :

    


    --hidden-import fiona._shim --hidden-import fiona.schema


    


    tried also with :

    


    --add-data="fiona/*;fiona”


    


    but warnings still remains.

    


  • FFmpeg : Specify pixel format for STD_IN input

    27 février 2024, par ShadowMagic896

    This is the current command :

    


    ffmpeg -i pipe:0 -pix_fmt yuv420p -f mp4 -vf "transpose=1" -f matroska pipe:1

    


    Essentially, it takes an MP4 file, rotates it 90 degrees, and converts it back to mtk and outputs it to STD_OUT.

    


    This is the error :

    


    WARNING:root:[mov,mp4,m4a,3gp,3g2,mj2 @ 000001ff9979dd00] stream 0, offset 0x50: partial file
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001ff9979dd00] Could not find codec parameters for stream 0 (Video: h264 (avc1 / 0x31637661), none, 170x144, 32 kb/s): unspecified pixel format
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'pipe:0':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp41isom
    creation_time   : 2024-02-26T20:53:03.000000Z
  Duration: 00:00:03.88, start: 0.000000, bitrate: N/A
  Stream #0:0[0x1](und): Video: h264 (avc1 / 0x31637661), none, 170x144, 32 kb/s, 30 fps, 30 tbr, 30k tbn (default)
      Metadata:
        creation_time   : 2024-02-26T20:53:03.000000Z
        handler_name    : VideoHandler
        vendor_id       : [0][0][0][0]
        encoder         : AVC Coding
  Stream #0:1[0x2](und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 192 kb/s (default)
      Metadata:
        creation_time   : 2024-02-26T20:53:03.000000Z
        handler_name    : SoundHandler
        vendor_id       : [0][0][0][0]
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (aac (native) -> vorbis (libvorbis))
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001ff9979dd00] stream 0, offset 0x50: partial file
[in#0/mov,mp4,m4a,3gp,3g2,mj2 @ 000001ff9978b080] Error during demuxing: Invalid data found when processing input
Cannot determine format of input 0:0 after EOF
[vf#0:0 @ 000001ff997d6040] Task finished with error code: -1094995529 (Invalid data found when processing input)
[vf#0:0 @ 000001ff997d6040] Terminating thread with return code -1094995529 (Invalid data found when processing input)
[aost#0:1/libvorbis @ 000001ff99cd1780] No filtered frames for output stream, trying to initialize anyway.
[vost#0:0/libx264 @ 000001ff997d4fc0] Could not open encoder before EOF
[vost#0:0/libx264 @ 000001ff997d4fc0] Task finished with error code: -22 (Invalid argument)
[vost#0:0/libx264 @ 000001ff997d4fc0] Terminating thread with return code -22 (Invalid argument)
[out#0/matroska @ 000001ff997a6180] Nothing was written into output file, because at least one of its streams received no packets.
frame=    0 fps=0.0 q=0.0 Lsize=       0KiB time=N/A bitrate=N/A speed=N/A    
Conversion failed!


    


    I am running this via Python, this is the script :

    


        async def send_proc_pipe(self) -> bytes:

        command = f"ffmpeg -hide_banner -loglevel error -i pipe:0 -pix_fmt yuv420p -f mp4 -vf \"transpose=1\" -f matroska pipe:1"

        proc = await asyncio.create_subprocess_shell(
            cmd=command,
            stdin=asyncio.subprocess.PIPE,
            stdout=asyncio.subprocess.PIPE,
            stderr=asyncio.subprocess.PIPE
        )
        
        std_in = self.blob

        c_out, c_err = await proc.communicate(std_in)
        if c_err:
            logging.warning(c_err.decode("utf-8"))

        return c_out


    


    I'm not really use what else to try here. I've re-ordered the parameters and tried different pixel formats with no success.