Recherche avancée

Médias (0)

Mot : - Tags -/organisation

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

Autres articles (41)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (6561)

  • Laravel ffmpeg failed to execute command

    4 septembre 2022, par John smith

    I'm using protonemedia/laravel-ffmpeg package everything works fine on localhost but on the live server, there is an error message shown.

    


    ProtoneMedia\ LaravelFFMpeg\ Exporters\ EncodingException

ffmpeg failed to execute command '/usr/bin/ffmpeg' '-y' '-threads' '12' '-i' '/www/wwwroot/hamza/storage/app/upload/videos/uofH50IWXt3Doqacxkd2tATboUT5gLfVGaAWyvsS.mp4' '-map' '0' '-vcodec' 'libx264' '-b:v' '1000k' '-sc_threshold' '0' '-g' '48' '-hls_playlist_type' 'vod' '-hls_time' '10' '-hls_segment_filename' '/www/wwwroot/hamza/storage/app/streamable_videos/21_0_1000_%05d.ts' '-master_pl_name' 'temporary_segment_playlist_0.m3u8' '-acodec' 'aac' '-b:a' '128k' '/www/wwwroot/hamza/storage/app/streamable_videos/21_0_1000.m3u8': Error Output: ffmpeg version 3.4.11 Copyright (c) 2000-2022 the FFmpeg developers built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-44) configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --extra-ldflags='-Wl,-z,relro ' --extra-cflags=' ' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --disable-crystalhd --enable-fontconfig --enable-gcrypt --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libcdio --enable-libdrm --enable-indev=jack --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-nvenc --enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg --enable-libopus --disable-encoder=libopus --enable-libpulse --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzvbi --enable-avfilter --enable-avresample --enable-libmodplug --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-libmfx --enable-runtime-cpudetect libavutil 55. 78.100 / 55. 78.100 libavcodec 57.107.100 / 57.107.100 libavformat 57. 83.100 / 57. 83.100 libavdevice 57. 10.100 / 57. 10.100 libavfilter 6.107.100 / 6.107.100 libavresample 3. 7. 0 / 3. 7. 0 libswscale 4. 8.100 / 4. 8.100 libswresample 2. 9.100 / 2. 9.100 libpostproc 54. 7.100 / 54. 7.100 Unrecognized option 'master_pl_name'. Error splitting the argument list: Option not found


    


    I'm using a job to do conversation

    


    ConvertVideoForStreaming.php Job :

    


    <?php

namespace App\Jobs;
set_time_limit(60000);

use FFMpeg;
use Carbon\Carbon;
use App\Models\Video;
use FFMpeg\Format\Video\X264;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Storage;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;

class ConvertVideoForStreaming implements ShouldQueue
{
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

    public $video;

    public function __construct(Video $video)
    {
        $this->video = $video;
    }

    public function handle()
    {
        // create some video formats...
        $lowBitrateFormat  = (new X264)->setKiloBitrate(500);
        $highBitrateFormat = (new X264)->setKiloBitrate(3000);

        // open the uploaded video from the right disk...
        FFMpeg::fromDisk($this->video->disk)
            ->open($this->video->path)

            // call the 'exportForHLS' method and specify the disk to which we want to export...
            ->exportForHLS()
            ->withRotatingEncryptionKey(function ($filename, $contents) {
                Storage::disk('streamable_keys')->put($filename, $contents);
            })
            // we'll add different formats so the stream will play smoothly
            // with all kinds of internet connections...
            ->addFormat($lowBitrateFormat)
            ->addFormat($highBitrateFormat)

            // call the 'save' method with a filename...
            ->toDisk('streamable_videos')
            ->save($this->video->id . '.m3u8');

        // update the database so we know the convertion is done!
        $this->video->update([
            'converted_for_streaming_at' => Carbon::now(),
        ]);
    }
}


    


    I'm storing the key at custom disk "streamable_keys", and converted videos should be stored in "streamable_videos".

    


    the streamable keys are generated and saved to a directory without any issues, but streamable videos are not saved to the directory.

    


    after some tracks I found that the problem happens in this line of code :

    


            ->save($this->video->id . '.m3u8');


    


    all the lines before that line work perfectly.

    


    any ideas on how to fix that ?

    


    Full error screenshot

    


    ConvertVideoForStreaming.php

    


  • How to transcode 4K HDR using libx265 or libsvtav1 with ffmpeg ?

    28 octobre 2022, par Asav Mali

    Im currently trying to transcode a mp4 file containing a HEVC 10 Bit HDR stream with proper grading information to HLS (fragmented mp4 aka fmp4) in two different codecs, HEVC and AV1. The problem is that the x265 encoder pops the following message while transcoding starts :

    


    Output #0, hls, to '/tmp/output/testclip/v-hevc-2160p-hvc1.2.4.L150.B0/master.m3u8':
  Metadata:
    encoder         : Lavf59.27.100
  Stream #0:0: Video: hevc (hvc1 / 0x31637668), yuv420p10le(tv, bt2020nc/bt2020/smpte2084, progressive), 3840x1600 [SAR 1:1 DAR 12:5], q=2-31, 7864 kb/s, 23.98 fps, 24k tbn (default)
    Metadata:
      encoder         : Lavc59.37.100 libx265
    Side data:
      cpb: bitrate max/min/avg: 8257000/0/0 buffer size: 31457000 vbv_delay: N/A
      Mastering Display Metadata, has_primaries:1 has_luminance:1 r(0.6800,0.3200) g(0.2650,0.6900) b(0.1500 0.0600) wp(0.3127, 0.3290) min_luminance=0.005000, max_luminance=4000.000000
      Content Light Level Metadata, MaxCLL=368, MaxFALL=226
x265 [warning]: unable to parse mastering display color volume infoed=   0x    
x265 [warning]: unable to parse mastering display color volume infoeed=0.758x     
x265 [warning]: unable to parse mastering display color volume infoeed=1.06x 


    


    Why is the message "unable to parse mastering display color volume info" coming up if I explicitly define the grading info using the following command ? :

    


    /usr/bin/ffmpeg -i "/tmp/testclip.m4v" -map 0:0 -c:v libx265 -b:v 7864320 -maxrate:v 8257536 -bufsize 31457280 -vf zscale=width=3840:height=1600 -x265-params colorprim=bt2020:transfer=smpte-2084:colormatrix=bt2020nc:master-display="G(13250.0,34500.0)B(7500.0,3000.0)R(34000.0,16000.0)WP(15635.0,16450.0)L(40000000.0,50.0):max-cll="368.0,226.0"" -pix_fmt yuv420p10le -profile:v main10 -bf 0 -crf 16 -preset fast -keyint_min 48 -g 48 -sc_threshold 0 -use_timeline 1 -use_template 1 -seg_duration 6 -tune fastdecode -vtag hvc1 -map_metadata -1 -map_chapters -1 -f hls -hls_time 6 -streaming 1 -hls_list_size 0  -hls_segment_filename "/tmp/output/testclip/v-hevc-2160p-hvc1.2.4.L150.B0/f-%04d.m4s"  -hls_fmp4_init_filename "init-v-hevc-2160p-hvc1.2.4.L150.B0.m4s"  -hls_segment_type fmp4 -movflags frag_every_frame+delay_moov+skip_trailer+faststart -hls_flags independent_segments "/tmp/output/testclip/v-hevc-2160p-hvc1.2.4.L150.B0/master.m3u8"


    


    No matter if I define the "master-display" or not, the image stays the same according to the colors, If I don't define "master-display" I dont get the annoying message form the x265 encoder for some reason. Can somebody give an answer how the x265 encoder works with ffmpeg and HDR ?

    


    Besides the HEVC stream, I also create a AV1 stream using libsvtav1. Here I'm using a quite similar command, but the image looks differently compared against the HEVC version, much colder, why that ? I define the grading information explicitly for the libsvtav1 encoder the same way as I do it for x265 using mastering-display...? :

    


    /usr/bin/ffmpeg -i "/tmp/testclip.m4v" -map 0:0 -c:v libsvtav1 -b:v 6291456 -maxrate:v 6606028 -bufsize 25165824 -vf zscale=width=3840:height=1600 -svtav1-params input-depth=10:fast-decode=1:color-primaries=9:transfer-characteristics=16:matrix-coefficients=9:mastering-display="G(0.265,0.69)B(0.15,0.06)R(0.68,0.32)WP(0.3127,0.329)L(4000.0,0.005):content-light="368.0,226.0"":enable-hdr=1 -pix_fmt yuv420p10le -max_muxing_queue_size 1024 -profile:v main -preset 7 -crf 20 -keyint_min 48 -g 48 -use_timeline 1 -use_template 1 -seg_duration 6 -strict experimental -map_metadata -1 -map_chapters -1 -f hls -hls_time 6 -streaming 1 -hls_list_size 0  -hls_segment_filename "/tmp/output/testclip/v-av01-2160p-av01.0.12H.10/f-%04d.m4s"  -hls_fmp4_init_filename "init-v-av01-2160p-av01.0.12H.10.m4s"  -hls_segment_type fmp4 -movflags frag_every_frame+delay_moov+skip_trailer+faststart -hls_flags independent_segments "/tmp/output/testclip/v-av01-2160p-av01.0.12H.10/master.m3u8"


    


    I would expect that grading information will get placed properly with both encoders.

    


    Thanks in advance.

    


  • FFMPEG RTMP stream that is recorded by Nginx loses quality

    31 octobre 2022, par Devin Dixon

    I have an Nginx RTMP Replay server with the following config :

    


    user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
    worker_connections 768;
    # multi_accept on;
}

http {

    ##
    # Basic Settings
    ##

    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;
    keepalive_timeout 65;
    types_hash_max_size 2048;
    # server_tokens off;

    # server_names_hash_bucket_size 64;
    # server_name_in_redirect off;

    include /etc/nginx/mime.types;
    default_type application/octet-stream;

    ##
    # SSL Settings
    ##

    ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
    ssl_prefer_server_ciphers on;

    ##
    # Logging Settings
    ##

    access_log /var/log/nginx/access.log;
    error_log /var/log/nginx/error.log;

    ##
    # Gzip Settings
    ##

    gzip on;

    # gzip_vary on;
    # gzip_proxied any;
    # gzip_comp_level 6;
    # gzip_buffers 16 8k;
    # gzip_http_version 1.1;
    # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

    ##
    # Virtual Host Configs
    ##

    include /etc/nginx/conf.d/*.conf;
    include /etc/nginx/sites-enabled/*;
}


#mail {
#   # See sample authentication script at:
#   # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
# 
#   # auth_http localhost/auth.php;
#   # pop3_capabilities "TOP" "USER";
#   # imap_capabilities "IMAP4rev1" "UIDPLUS";
# 
#   server {
#       listen     localhost:110;
#       protocol   pop3;
#       proxy      on;
#   }
# 
#   server {
#       listen     localhost:143;
#       protocol   imap;
#       proxy      on;
#   }
#}

rtmp {
    server {
        listen 1935;
        chunk_size 4096;

        application live {
            live on;
            #Set this to "record off" if you don't want to save a copy of your broadcasts
            record all;
            # The directory in which the recordings will be stored.
            record_path /var/www/html/recordings;
            record_unique on;
            record_suffix -%d-%b-%y-%T.flv;
            on_record_done http://127.0.0.1:3000/recorded;

            # Turn on HLS
            exec /usr/bin/ffmpeg -i rtmp://127.0.0.1:1935/live/$name -map 0:v -c:v copy -map 0:a -c:a copy -map 0:a -f flv rtmp://127.0.0.1/show/$name;
        }

        application show {
            live on;
            # Turn on HLS
            hls on;
            hls_path /mnt/hls/;
            hls_fragment 3;
            hls_playlist_length 60;
            # disable consuming the stream from nginx as rtmp
            deny play all;
        }
    }
}


    


    The stream that that is pushed the stream into nginx looks great ! But the nginx recording looks very granny and pixelated. What could be causing the loss in quality as nginx records the stream ?