Recherche avancée

Médias (0)

Mot : - Tags -/logo

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

Autres articles (102)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

Sur d’autres sites (10055)

  • FFMPEG : Impossible to convert between the formats supported by the filter - Error reinitializing filters

    6 janvier 2021, par user1904038

    Trying to encode a mp4 file into HLS[.m3u8] using NVIDIA Cuda Using this command :

    


    What i'm trying to do is to convert a 1080p video file into 4 renditions resolutions : 1080p 720p 480p 360p Bellow is the 720p example.

    


    ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i input.mp4 -vf scale=w=1280:h=720:force_original_aspect_ratio=decrease -c:a aac -ar 48000 -b:a 128k -c:v h264_nvenc -profile:v main -crf 20 -g 48 -keyint_min 48 -sc_threshold 0 -b:v 2500k -maxrate 2675k -bufsize 3750k -hls_time 4 -hls_playlist_type vod -hls_segment_filename output/720p_%03d.ts output/720p.m3u8


    


    But this is the error i get when i run the command

    


    Impossible to convert between the formats supported by the filter 'graph 0 input from stream 0:0' and the filter 'auto_scaler_0'
Error reinitializing filters!
Failed to inject frame into filter network: Function not implemented
Error while processing the decoded data for stream #0:0


    


    I think my issue is somewhere in the -vf scale=w=1280:h=720:force_original_aspect_ratio=decrease command but not sure with what i can replace it since i need the scale function.

    


    Also this is the output of ffmpeg -version

    


    ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration: --enable-cuda-nvcc --enable-cuvid --enable-nvenc --enable-libnpp --enable-cuda-llvm --pkgconfigdir=/content/workspace/lib/pkgconfig --prefix=/content/workspace --pkg-config-flags=--static --extra-cflags='-I/content/workspace/include -I/usr/local/cuda/include' --extra-ldflags='-L/content/workspace/lib -L/usr/local/cuda/lib64' --extra-libs='-lpthread -lm' --enable-static --disable-debug --disable-shared --disable-ffplay --disable-doc --enable-openssl --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libvpx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libx265 --enable-runtime-cpudetect --enable-libfdk-aac --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-libvidstab --enable-libaom --enable-libsrt
libavutil      56. 51.100 / 56. 51.100
libavcodec     58. 91.100 / 58. 91.100
libavformat    58. 45.100 / 58. 45.100
libavdevice    58. 10.100 / 58. 10.100
libavfilter     7. 85.100 /  7. 85.100
libswscale      5.  7.100 /  5.  7.100
libswresample   3.  7.100 /  3.  7.100
libpostproc    55.  7.100 / 55.  7.100


    


  • ffmpeg-python multiple outputs at different resolutions

    3 janvier 2021, par Darius Mandres

    I am using ffmpeg-python to convert .mp4 files to HLS streamable formats. Currently I can get it to work at full resolution using this piece of code

    


    video = ffmpeg.input(file_path)
output = ffmpeg.output(
  video,
  filename=f"{base_path}{uuid}.m3u8",
  format="hls",
  start_number=0,
  hls_time=10,
  hls_list_size=0
)

output.run()


    


    If the original video is 1920x1080 the resulting .ts files will be of the same resolution. What do I have to do to get multiple resolutions ? Say 360p 480p, 720p ?

    


    And how does ffmpeg handle a resolution when the original is smaller ? Say I try to convert a 480p video to a resolution of 720p ?

    


  • How to create mp4 to multi bitrate hls(.m3u8) Stream With fluent-ffmpeg

    6 janvier 2023, par Vinay Vadachhak
    ffmpeg -hide_banner -y -i beach.mkv \
  -vf scale=w=640:h=360:force_original_aspect_ratio=decrease -c:a aac -ar 48000 -c:v h264 -profile:v main -crf 20 -sc_threshold 0 -g 48 -keyint_min 48 -hls_time 4 -hls_playlist_type vod  -b:v 800k -maxrate 856k -bufsize 1200k -b:a 96k -hls_segment_filename beach/360p_%03d.ts beach/360p.m3u8 \
  -vf scale=w=842:h=480:force_original_aspect_ratio=decrease -c:a aac -ar 48000 -c:v h264 -profile:v main -crf 20 -sc_threshold 0 -g 48 -keyint_min 48 -hls_time 4 -hls_playlist_type vod -b:v 1400k -maxrate 1498k -bufsize 2100k -b:a 128k -hls_segment_filename beach/480p_%03d.ts beach/480p.m3u8 \
  -vf scale=w=1280:h=720:force_original_aspect_ratio=decrease -c:a aac -ar 48000 -c:v h264 -profile:v main -crf 20 -sc_threshold 0 -g 48 -keyint_min 48 -hls_time 4 -hls_playlist_type vod -b:v 2800k -maxrate 2996k -bufsize 4200k -b:a 128k -hls_segment_filename beach/720p_%03d.ts beach/720p.m3u8 \
  -vf scale=w=1920:h=1080:force_original_aspect_ratio=decrease -c:a aac -ar 48000 -c:v h264 -profile:v main -crf 20 -sc_threshold 0 -g 48 -keyint_min 48 -hls_time 4 -hls_playlist_type vod -b:v 5000k -maxrate 5350k -bufsize 7500k -b:a 192k -hls_segment_filename beach/1080p_%03d.ts beach/1080p.m3u8


    


    Convert this command to fluent-ffmpeg node js :

    


    My Code :

    


    let ffmpeg = require(&#x27;fluent-ffmpeg&#x27;);&#xA;new ffmpeg()&#xA;        .addInput(&#x27;./public/class.mp4&#x27;)&#xA;        .outputOptions([&#xA;            &#x27;-map 0:v&#x27;,&#xA;            &#x27;-map 0:v&#x27;,&#xA;            &#x27;-map 0:a&#x27;,&#xA;            &#x27;-map 0:a&#x27;,&#xA;            &#x27;-s:v:0 426x240&#x27;,&#xA;            &#x27;-c:v:0 libx264&#x27;,&#xA;            &#x27;-b:v:0 400k&#x27;,&#xA;            &#x27;-c:a:0 aac&#x27;,&#xA;            &#x27;-b:a:0 64k&#x27;,&#xA;            &#x27;-s:v:1 640x360&#x27;,&#xA;            &#x27;-c:v:1 libx264&#x27;,&#xA;            &#x27;-b:v:1 700k&#x27;,&#xA;            &#x27;-c:a:1 aac&#x27;,&#xA;            &#x27;-b:a:1 96k&#x27;,&#xA;            //&#x27;-var_stream_map&#x27;, &#x27;"v:0,a:0 v:1,a:1"&#x27;,&#xA;            &#x27;-master_pl_name playlist.m3u8&#x27;,&#xA;            &#x27;-f hls&#x27;,&#xA;            &#x27;-max_muxing_queue_size 1024&#x27;,&#xA;            &#x27;-hls_time 4&#x27;,&#xA;            &#x27;-hls_playlist_type vod&#x27;,&#xA;            &#x27;-hls_list_size 0&#x27;,&#xA;            &#x27;-hls_segment_filename ./public/output/v%v/segment%03d.ts&#x27;&#xA;        ])&#xA;        .output(&#x27;./public/output/v%v/master.m3u8&#x27;)&#xA;        .on(&#x27;start&#x27;, function (commandLine) {&#xA;            console.log(&#x27;Spawned Ffmpeg with command: &#x27; &#x2B; commandLine);&#xA;            res.write(&#x27;<p>&#x27; &#x2B; commandLine &#x2B; &#x27;</p>&#x27;);&#xA;        })&#xA;        .on(&#x27;error&#x27;, function (err, stdout, stderr) {&#xA;            console.error(&#x27;An error occurred: &#x27; &#x2B; err.message, err, stderr);&#xA;            res.write(&#x27;<p>&#x27; &#x2B; err.message &#x2B; &#x27;</p>&#x27;);&#xA;        })&#xA;        .on(&#x27;progress&#x27;, function (progress) {&#xA;            console.log(&#x27;Processing: &#x27; &#x2B; progress.percent &#x2B; &#x27;% done&#x27;);&#xA;            console.log(progress);&#xA;            /*percent = progress.percent;&#xA;            res.write(&#x27;<h1>&#x27; &#x2B; percent &#x2B; &#x27;</h1>&#x27;);*/&#xA;        })&#xA;        .on(&#x27;end&#x27;, function (err, stdout, stderr) {&#xA;            console.log(&#x27;Finished processing!&#x27; /*, err, stdout, stderr*/);&#xA;            res.write(&#x27;Finished processing!&#x27;);&#xA;        })&#xA;        .run();&#xA;

    &#xA;

    This code generate only one bitrate .m3u8 stream.

    &#xA;

    I have tried many ways to generate multi bitrate hls stream through node js but always generate single bitrate.&#xA;i have tried bash command and that was work fine, now i want to convert this command to nodejs script.

    &#xA;

    Is any one have idea about this ?

    &#xA;