Recherche avancée

Médias (91)

Autres articles (22)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

  • 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 (5086)

  • Popen ffmpeg process hang if run in shell and leaves a defunct process if run in background

    12 janvier 2023, par dr__noob

    I have a script that runs the FFmpeg command. When I run the command in the background using the & operator it runs fine but leaves a zombie process. And when I remove the operator the process hangs and goes into the pipe_wait state.

    


    The code used to execute the FFmpeg command

    


    def run_cmd(cmd:str,
            check:bool=False,       
            capture:bool=False,
            timeout:float=None,
            ) -> tuple[int,bytearray,bytearray]:
    import  subprocess

    stdout_data,stderr_data = (bytearray(),bytearray()) if capture else (None,None)
    try:
        sp = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, )
        while any(data:=(sp.stdout.readline(),sp.stderr.readline())):
            out,err = data
            if out: stdout_data += out
            if err: stderr_data += err
        sp.communicate(timeout=timeout)
        return sp.returncode,stdout_data,stderr_data
    except subprocess.CalledProcessError as e:
        print("Called process error")
        raise e
    except subprocess.TimeoutExpired as e:
        sp.kill()
        print(f"{sp.pid} killed")
        if check:
            raise e
    except PermissionError as e:
        print("Permission error")
        if check:
            raise e


    


    The command which is causing the issue is

    


    nice -n 10 ffmpeg -loglevel verbose -hide_banner -y -threads 0 -i "/dev/shm/480TEST-1999963.dfw.480_1673030704/SBS_Plus_Test_Feed.480TEST-1999963.480.eng.p.intermediate.mp4" -map 0:v:0? -q:v 1 -f rawvideo -pix_fmt "yuv420p" -an ./SBS_Plus_Test_Feed.480TEST-1999963.480.eng.p_fifo_video.yuv -map 0:a:0? -q:a 1 -ac 2 -af "aresample=async=1:first_pts=0" -vn ./SBS_Plus_Test_Feed.480TEST-1999963.480.eng.p_fifo_audio.wav > "./SBS_Plus_Test_Feed.480TEST-1999963.480.eng.p.ffmpeg.demux.log" 2>&1 &


    


    However, other FFmpeg commands are running fine without the last &. But this command will block if I remove the &. If I keep it as it is, the process will later become a zombie(defunct). Can it be because it is actually a nice -n 10 causing the issue ?

    


    Example of a command running fine

    


    ffmpeg -loglevel verbose -hide_banner -y -threads 0 -i "./SBS_Plus_Test_Feed.480TEST-1999963.480.eng.p.ts" -r "59.94" -s:v "1280"x"720" -pix_fmt "yuv420p" -vcodec libx264 -x264-params qp="30" -af "aresample=async=1:first_pts=0" -crf 0 -q:a 1 -vf yadif=1 ./SBS_Plus_Test_Feed.480TEST-1999963.480.eng.p.intermediate.mp4 > "./p.intermediate.mp4.intermediate.ffmpeg.log" 2>&1


    


    Till now I have tried other options like -nostdin and null suggested in ffmpeg hangs when run in background

    


    Is there any other way run this without creating a zombie ?

    


  • mencoder -> x264 : FPS problem : Video is 2x faster at the output

    28 mars 2011, par Julien Palard

    I got an input video, ffmpeg says about it : 29.96FPS 59.75 tbr 1k tbn 59.83 tbc
    My process to encode is :

    $ mencoder input_video -vf dsize=480:320:0,scale=0:0,expand=480:320,dsize=1.5,format=i420 -of rawvideo -ofps 25 -ovc raw -nosound -o output.yuv
    $ x264 input_video --profile baseline --fps 25 [blahblah] -o output
    $ MP4Box -add output.yuv -fps 25 output.mp4

    Im'simplificating a lot here to let you parse less as I'm encoding the audio apart and merging the result using mp4box.

    ffmpeg -i output says that the vid is : 25 FPS 25 tbr 25 tbn 50 tbc

    And while playing the video, the audio is normal, the video is 2x faster than input, so the video ends at the half of the audio track (compared to the input, the audio is good, it's just the video running 2x faster)

    Any idea about my problem ?

  • libavfilter/vf_vpp_qsv : fix uninitialized variable problem

    15 septembre 2021, par Wenbin Chen
    libavfilter/vf_vpp_qsv : fix uninitialized variable problem
    

    This two variables may be used below with uninitialized value.
    Now fix them.

    Signed-off-by : Wenbin Chen <wenbin.chen@intel.com>
    Reviewed-by : Xiang, Haihao <haihao.xiang@intel.com>
    Reviewed-by : Soft Works <softworkz@hotmail.com>
    Signed-off-by : James Almer <jamrial@gmail.com>

    • [DH] libavfilter/vf_vpp_qsv.c