Recherche avancée

Médias (3)

Mot : - Tags -/pdf

Autres articles (44)

  • 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

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

Sur d’autres sites (6163)

  • 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.

    


  • Encoding AV1 to h264 error : Assertion pkt failed at D :/code/ffmpeg/src/fftools/ffmpeg_dec.c:518 [closed]

    1er mars 2024, par KyonGiang

    I used below code to convert from AV1 to x264 mp4, and I got error message : "Assertion pkt failed at D :/code/ffmpeg/src/fftools/ffmpeg_dec.c:518"

    


    ffmpeg -i input.mp4 -c:v h264_nvenc -c:a copy output.mp4 


    


      

    • I'm using Windows 10 64b, Command Prompt, ffmpeg version 2024-01-20-git-6c4388b468-full_build-www.gyan.dev
    • 


    


    I removed h264_nvenc, Run as Administrator but the result is same.

    


    ffmpeg -i input.mp4 -c:v -c:a copy output.mp4

    


  • 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.