Recherche avancée

Médias (0)

Mot : - Tags -/content

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

Autres articles (80)

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

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

Sur d’autres sites (4452)

  • ffmpeg produces "is_avc" = false with h264_nvenc & tee muxer

    14 août 2018, par Areeb111

    I am using ffmpeg for encoding MKV (Matroska Video files) to 2x MP4 (H264 - 720p Main@L4) & (H264 - 360p Baseline@L3.1).

    Having really strange problem when using -c:v h264_nvenc and tee muxer then the produced output file is having is_avc=false even i have checked the same input matroska file with another server running with Intel QuickSync -c:v h264_qsv with the same command then the produced output file is is_avc=true.

    The main goal that i want the is_avc=true is because the files must be played using nginx-vod-module which requires the AVC video format to be streamed.

    Steps to reproduce the problem :

    • Custom ffmpeg build with NVENC support ffmpeg version N-91182-gbdf1bbd Copyright (c) 2000-2018 the FFmpeg developers   built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-28)
    • ffprobe version 4.0.2-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2007-2018 the FFmpeg developers
    • Running ffmpeg command line with NVENC and tee muxer
      /root/ffmpeg  -y -t 00:00:50 -i "testinput.mkv" -filter_complex "[0:v]split=2[s0][s1];[s0]scale=-2:720[v0];[s1]scale=-2:360[v1]" -map "[v0]" -map "[v1]" -map 0:a -c:v h264_nvenc -b:v:0 1100k -b:v:1 600k -profile:v:0 main -profile:v:1 baseline -level:v:0 4 -level:v:1 3.1 -ac 2 -c:a aac -b:a 128k -af "aresample=async=1000:first_pts=0"  -f tee "[select=\'v:0,a\']testoutput.mp4|[select=\'v:1,a\']testoutput-360.mp4"
    • Running ffprobe for the output file to check "is_avc" :
      ./ffprobe -v quiet -print_format json -show_format -show_streams testoutput.mp4
    • My current ffprobe output results are :

      ./ffprobe -v quiet -print_format json -show_format -show_streams testoutput.mp4
      {
         "streams": [
             {
                 "index": 0,
                 "codec_name": "h264",
                 "codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
                 "profile": "Main",
                 "codec_type": "video",
                 "codec_time_base": "1001/48000",
                 "codec_tag_string": "avc1",
                 "codec_tag": "0x31637661",
                 "width": 1280,
                 "height": 720,
                 "coded_width": 1280,
                 "coded_height": 720,
                 "has_b_frames": 0,
                 "sample_aspect_ratio": "1:1",
                 "display_aspect_ratio": "16:9",
                 "pix_fmt": "yuv420p",
                 "level": 40,
                 "chroma_location": "left",
                 "refs": 1,
                 "is_avc": "false",
                 "nal_length_size": "0",
                 "r_frame_rate": "24000/1001",
                 "avg_frame_rate": "24000/1001",
                 "time_base": "1/24000",
                 "start_pts": 984,
                 "start_time": "0.041000",
                 "duration_ts": 1201200,
                 "duration": "50.050000",
                 "bit_rate": "845035",
                 "bits_per_raw_sample": "8",
                 "nb_frames": "1199",
                 "disposition": {
                     "default": 1,
                     "dub": 0,
                     "original": 0,
                     "comment": 0,
                     "lyrics": 0,
                     "karaoke": 0,
                     "forced": 0,
                     "hearing_impaired": 0,
                     "visual_impaired": 0,
                     "clean_effects": 0,
                     "attached_pic": 0,
                     "timed_thumbnails": 0
                 },
                 "tags": {
                     "language": "und",
                     "handler_name": "VideoHandler"
                 }
             },
             {
                 "index": 1,
                 "codec_name": "aac",
                 "codec_long_name": "AAC (Advanced Audio Coding)",
                 "profile": "LC",
                 "codec_type": "audio",
                 "codec_time_base": "1/48000",
                 "codec_tag_string": "mp4a",
                 "codec_tag": "0x6134706d",
                 "sample_fmt": "fltp",
                 "sample_rate": "48000",
                 "channels": 2,
                 "channel_layout": "stereo",
                 "bits_per_sample": 0,
                 "r_frame_rate": "0/0",
                 "avg_frame_rate": "0/0",
                 "time_base": "1/48000",
                 "start_pts": 0,
                 "start_time": "0.000000",
                 "duration_ts": 2401488,
                 "duration": "50.031000",
                 "bit_rate": "129153",
                 "max_bit_rate": "129153",
                 "nb_frames": "2346",
                 "disposition": {
                     "default": 1,
                     "dub": 0,
                     "original": 0,
                     "comment": 0,
                     "lyrics": 0,
                     "karaoke": 0,
                     "forced": 0,
                     "hearing_impaired": 0,
                     "visual_impaired": 0,
                     "clean_effects": 0,
                     "attached_pic": 0,
                     "timed_thumbnails": 0
                 },
                 "tags": {
                     "language": "ger",
                     "handler_name": "SoundHandler"
                 }
             }
         ],
         "format": {
             "filename": "Leonmusssterben20171080p.mp4",
             "nb_streams": 2,
             "nb_programs": 0,
             "format_name": "mov,mp4,m4a,3gp,3g2,mj2",
             "format_long_name": "QuickTime / MOV",
             "start_time": "0.000000",
             "duration": "50.031000",
             "size": "6116472",
             "bit_rate": "978029",
             "probe_score": 100,
             "tags": {
                 "major_brand": "isom",
                 "minor_version": "512",
                 "compatible_brands": "isomiso2avc1mp41",
                 "encoder": "Lavf58.17.100"
             }
         }
      }

    Please anyone can help me why is the output video file is getting "is_avc=false" ?

    Is there any option to force it ?

    Thank you

  • Syntax error : "(" unexpected — with !(*.sh) in bash script [duplicate]

    25 janvier 2023, par Jmv Jmv

    I want to run a sh file :

    



    #!/bin/bash
for f in !(*.sh); do
    ffmpeg -i "$f" -vf yadif=0:-1 -threads 0 -c:v libx264 -pix_fmt yuv420p \
        -r 29.97 -b:v 3000k -s 1280x720 -preset:v slow -profile:v Main \
        -level 3.1 -bf 2 -movflags faststart /mnt/media/out-mp4/"${f%.mxf}.mp4"
    rm $f
done


    



    However, I get the following error :

    



    2: task1.sh: Syntax error: "(" unexpected


    



    If I try directly on the command line it works perfectly.

    



    


    the path and permissions are already reviewed

    


    



    Any idea what might be happening ?

    


  • How to configure proc_open "pipes" for ffmpeg stdin/stderr on Windows ?

    10 septembre 2018, par GDP

    Firstly, I’ve spent the week googling and trying variations of dozens and dozens of answers for Unix, but it’s been a complete bust, I need an answer for Windows, so this is not a duplicate question of the Unix equivalents.

    We’re trying to create a scheduled task that will process a queue of tasks in PHP, and maintain an array of up to 10 ffmpeg instances at a time. I’ve tried exec, shell_exec and proc_open , coupled with/without start /B without any "complete" luck.
    I’m also quite certain that it has to do with setting up the descriptorspec and pipes (which I’m completely unfamiliar with), and here’s why :

    Per https://trac.ffmpeg.org/wiki/PHP,

    The part that says ">/dev/null" will redirect the standard OUTPUT
    (stdout) of the ffmpeg instance to /dev/null (effectively ignoring the
    output) and "2>/dev/null" will redirect the standard ERROR (stderr) to
    /dev/null (effectively ignoring any error log messages). These two can
    be combined into a shorter representation : ">/dev/null 2>&1". If you
    like, you can ?read more about I/O Redirection.

    An important note should be mentioned here. The ffmpeg command-line
    tool uses stderr for output of error log messages and stdout is
    reserved for possible use of pipes (to redirect the output media
    stream generated from ffmpeg to some other command line tool). That
    being said, if you run your ffmpeg in the background, you’ll most
    probably want to redirect the stderr to a log file, to be able to
    check it later.

    One more thing to take care about is the standard INPUT (stdin).
    Command-line ffmpeg tool is designed as an interactive utility that
    accepts user’s input (usually from keyboard) and reports the error log
    on the user’s current screen/terminal. When we run ffmpeg in the
    background, we want to tell ffmpeg that no input should be accepted
    (nor waited for) from the stdin. We can tell this to ffmpeg, using I/O
    redirection again "

    echo "Starting ffmpeg...\n\n";
    echo shell_exec("ffmpeg -y -i input.avi output.avi null >/dev/null 2>/var/log/ffmpeg.log &");
    echo "Done.\n";

    This example actually uses shell_exec, though we want to use proc_open so that we can use a loop to check if the process has completed or not.

    Here’s a basic sample loop of what I’ve tried. The problem in executing this is that the actual ffmpeg processing completes, but the process is hung "waiting for something". When I use debugging, and step out of the loop and terminate the process after a few minutes, the ffmpeg output is written and the script carries on. (From the command line, ffmpeg takes less than a minute to complete)

    $descriptorspec = array(
       array('pipe', 'r'),
       array('pipe', 'w'),
       array('pipe', 'w'),
    );
    $pipes = null;
    $cwd = null;
    $env = null;
    $process = proc_open('start /B ffmpeg.exe -i input.mov output.mp4 -nostdin', $descriptorspec, $pipes, $cwd, $env);
    $status = proc_get_status($process);
    while($status['running']) {
       sleep (60);
       $status = proc_get_status($process);
    }
    proc_terminate($process);

    Also, as documented at ffmpeg Main-options :

    Enable interaction on standard input. On by default unless standard
    input is used as an input. To explicitly disable interaction you need
    to specify -nostdin.

    The -nostdin option seems to indicate that it addresses my problem, but it has no apparent affect. In all solutions for Unix that I’ve found, it appears to still require some form of this this unix added : null or 2>&1.

    So, with that somewhat exhaustive prologue, can someone explain how to properly configure the proc_open function to satisfy how ffmpeg.exe interacts with I/O ? If there is a better or more appropriate approach, I’m happy to do that, but the important thing is to be able to loop thru an array of processes to check if they’re complete, so that other faster processes can complete in the meantime.

    UPDATE
    After exhaustive R&D, it seems that the I/O is not the issue in making this happen (the -nostdin option seems to work as advertised). The premise of my design was to use proc_get_status() to determine when ffmpeg was finished. The flaw in that approach is that apparently that does NOT return the actual PID of the ffmpeg process...it returns the parent PID. So, when proc_get_status() returned that the video conversion was complete, it was in fact still running, not hung. This was further complicated by testing on larger video files. The larger the video, the longer the "residual" time was that it took to actually finish — the I/O wasn’t the issue - watching the Parent PID instead of the child PID was the problem. So, without getting into much lower level system internals with Windows, this doesn’t appear to be possible with PHP directly. I’ve decided to abandon this approach, but hopefully this discovery will save someone else some time and trouble.