Recherche avancée

Médias (91)

Autres articles (77)

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

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

Sur d’autres sites (9216)

  • FFmpeg output video file much smaller than uncompressed input audio file, using option to preserve original audio quality

    17 mars 2021, par Jan

    I attempt to create a video slideshow from a number of image files and an audio file in 2 steps :

    


      

    1. Create a temporary video file from a sequence of image files
    2. 


    3. Add an audio file to the temporary video file with a delay of 5 seconds
    4. 


    


    The audio file is an uncompressed stereo wav file, encoded with a sample rate of 44100 Hz and a bit depth of 32 bits, with a size of 40.1 MB. To preserve the lossless quality of the input audio file I use the option -c:a aac -b:a 192k as per Slideshow Wiki. However, the final output video file has a size of only 4.49 MB.

    


    How can the output video file be about 10 times smaller than the input audio file and still preserve the original lossless quality ?

    


    My code :

    


    ffmpeg -f concat -i slide-sequence.txt -c:v libx264 -r 30 -filter_complex format=yuv420p temp.mp4
ffmpeg -i temp.mp4 -i audio.wav -af "adelay=5000|5000" -c:v copy -c:a aac -b:a 192k out.mp4


    


  • How to use FFMPEG with Nvidia Acceleration (Nvenc) to hardcode / burn in subtitles

    11 février 2024, par Ibraheem Nofal

    So I'm trying to use Nvenc to accelerate video encoding. The aim is to have 1 input video file and 1 input subtitle, and to get multiple outputs at different resolutions with subtitles hardcoded or burned into the video. I've tried multiple approaches but can't figure out how to do it.

    


    Here's the command that I'm currently using :

    


    ffmpeg -hwaccel cuvid -i 3030025890-TEST.mp4 -i output_ar.srt  -filter_complex "[0:v]scale_npp=1920:1080, hwdownload,format=nv12[base], [base]subtitles=output_ar.srt[marked]" -map "[marked]" -c:v h264_nvenc -map 0:v:0 -map 0:a:0 -g 50 -b:v 5M -maxrate 5.5M -minrate 4M -bufsize 5M -preset fast 1080_output.mp4


    


    and here's the output :

    


    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '3030025890-TEST.mp4':
  Metadata:
    major_brand     : M4V 
    minor_version   : 1
    compatible_brands: isomavc1mp42
    creation_time   : 2021-01-05T13:45:58.000000Z
  Duration: 00:45:04.28, start: 0.000000, bitrate: 5574 kb/s
    Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 5000 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc (default)
    Metadata:
      creation_time   : 2021-01-05T13:45:58.000000Z
      handler_name    : ETI ISO Video Media Handler
      encoder         : Elemental H.264
    Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 93 kb/s (default)
    Metadata:
      creation_time   : 2021-01-05T13:45:58.000000Z
      handler_name    : ETI ISO Audio Media Handler
    Stream #0:2(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 93 kb/s (default)
    Metadata:
      creation_time   : 2021-01-05T13:45:58.000000Z
      handler_name    : ETI ISO Audio Media Handler
    Stream #0:3(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 93 kb/s (default)
    Metadata:
      creation_time   : 2021-01-05T13:45:58.000000Z
      handler_name    : ETI ISO Audio Media Handler
    Stream #0:4(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 93 kb/s (default)
    Metadata:
      creation_time   : 2021-01-05T13:45:58.000000Z
      handler_name    : ETI ISO Audio Media Handler
    Stream #0:5(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 93 kb/s (default)
    Metadata:
      creation_time   : 2021-01-05T13:45:58.000000Z
      handler_name    : ETI ISO Audio Media Handler
    Stream #0:6(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 93 kb/s (default)
    Metadata:
      creation_time   : 2021-01-05T13:45:58.000000Z
      handler_name    : ETI ISO Audio Media Handler
Input #1, srt, from 'output_ar.srt':
  Duration: N/A, bitrate: N/A
    Stream #1:0: Subtitle: subrip
[Parsed_subtitles_3 @ 0x5601070b1dc0] Shaper: FriBidi 0.19.7 (SIMPLE)
Fontconfig error: Cannot load default config file
[Parsed_subtitles_3 @ 0x5601070b1dc0] No usable fontconfig configuration file found, using fallback.
Fontconfig error: Cannot load default config file
[Parsed_subtitles_3 @ 0x5601070b1dc0] Using font provider fontconfig
Stream mapping:
  Stream #0:0 (h264) -> scale_npp (graph 0)
  subtitles (graph 0) -> Stream #0:0 (h264_nvenc)
  Stream #0:0 -> #0:1 (h264 (native) -> h264 (h264_nvenc))
  Stream #0:1 -> #0:2 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[h264 @ 0x56010792f980] Error creating a NVDEC decoder: 1
[h264 @ 0x56010792f980] Failed setup for format cuda: hwaccel initialisation returned error.
[Parsed_subtitles_3 @ 0x560107364cc0] Shaper: FriBidi 0.19.7 (SIMPLE)
Fontconfig error: Cannot load default config file
[Parsed_subtitles_3 @ 0x560107364cc0] No usable fontconfig configuration file found, using fallback.
Fontconfig error: Cannot load default config file
[Parsed_subtitles_3 @ 0x560107364cc0] Using font provider fontconfig
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
[aac @ 0x56010734d400] Qavg: 65536.000
[aac @ 0x56010734d400] 2 frames left in the queue on closing
Conversion failed!


    


    Edit : Made some progress. I now no longer get an error, but upon viewing the output, there's no subtitles burned in.
Command :

    


    ffmpeg -hwaccel cuvid -c:v h264_cuvid -i 3030025890-TEST.mp4  -c:v h264_nvenc -map 0:v:0 -map 0:a:0 -g 50 -b:v 5M -maxrate 5.5M -minrate 4M -bufsize 5M -vf "scale_npp=1920:1080, hwdownload, format=nv12, subtitles=output_ar.srt, hwupload" -preset fast 1080_output.mp4


    


  • How to use FFMPEG with Nvidia Acceleration (Nvenc) to hardcode subtitles

    21 février 2021, par Ibraheem Nofal

    So I'm trying to use Nvenc to accelerate video encoding. The aim is to have 1 input video file and 1 input subtitle, and to get multiple outputs at different resolutions with subtitles hardcoded or burned into the video. I've tried multiple approaches but can't figure out how to do it.

    


    Here's the command that I'm currently using :

    


    ffmpeg -hwaccel cuvid -i 3030025890-TEST.mp4 -i output_ar.srt  -filter_complex "[0:v]scale_npp=1920:1080, hwdownload,format=nv12[base], [base]subtitles=output_ar.srt[marked]" -map "[marked]" -c:v h264_nvenc -map 0:v:0 -map 0:a:0 -g 50 -b:v 5M -maxrate 5.5M -minrate 4M -bufsize 5M -preset fast 1080_output.mp4


    


    and here's the output :

    


    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '3030025890-TEST.mp4':
  Metadata:
    major_brand     : M4V 
    minor_version   : 1
    compatible_brands: isomavc1mp42
    creation_time   : 2021-01-05T13:45:58.000000Z
  Duration: 00:45:04.28, start: 0.000000, bitrate: 5574 kb/s
    Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 5000 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc (default)
    Metadata:
      creation_time   : 2021-01-05T13:45:58.000000Z
      handler_name    : ETI ISO Video Media Handler
      encoder         : Elemental H.264
    Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 93 kb/s (default)
    Metadata:
      creation_time   : 2021-01-05T13:45:58.000000Z
      handler_name    : ETI ISO Audio Media Handler
    Stream #0:2(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 93 kb/s (default)
    Metadata:
      creation_time   : 2021-01-05T13:45:58.000000Z
      handler_name    : ETI ISO Audio Media Handler
    Stream #0:3(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 93 kb/s (default)
    Metadata:
      creation_time   : 2021-01-05T13:45:58.000000Z
      handler_name    : ETI ISO Audio Media Handler
    Stream #0:4(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 93 kb/s (default)
    Metadata:
      creation_time   : 2021-01-05T13:45:58.000000Z
      handler_name    : ETI ISO Audio Media Handler
    Stream #0:5(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 93 kb/s (default)
    Metadata:
      creation_time   : 2021-01-05T13:45:58.000000Z
      handler_name    : ETI ISO Audio Media Handler
    Stream #0:6(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 93 kb/s (default)
    Metadata:
      creation_time   : 2021-01-05T13:45:58.000000Z
      handler_name    : ETI ISO Audio Media Handler
Input #1, srt, from 'output_ar.srt':
  Duration: N/A, bitrate: N/A
    Stream #1:0: Subtitle: subrip
[Parsed_subtitles_3 @ 0x5601070b1dc0] Shaper: FriBidi 0.19.7 (SIMPLE)
Fontconfig error: Cannot load default config file
[Parsed_subtitles_3 @ 0x5601070b1dc0] No usable fontconfig configuration file found, using fallback.
Fontconfig error: Cannot load default config file
[Parsed_subtitles_3 @ 0x5601070b1dc0] Using font provider fontconfig
Stream mapping:
  Stream #0:0 (h264) -> scale_npp (graph 0)
  subtitles (graph 0) -> Stream #0:0 (h264_nvenc)
  Stream #0:0 -> #0:1 (h264 (native) -> h264 (h264_nvenc))
  Stream #0:1 -> #0:2 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[h264 @ 0x56010792f980] Error creating a NVDEC decoder: 1
[h264 @ 0x56010792f980] Failed setup for format cuda: hwaccel initialisation returned error.
[Parsed_subtitles_3 @ 0x560107364cc0] Shaper: FriBidi 0.19.7 (SIMPLE)
Fontconfig error: Cannot load default config file
[Parsed_subtitles_3 @ 0x560107364cc0] No usable fontconfig configuration file found, using fallback.
Fontconfig error: Cannot load default config file
[Parsed_subtitles_3 @ 0x560107364cc0] Using font provider fontconfig
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
[aac @ 0x56010734d400] Qavg: 65536.000
[aac @ 0x56010734d400] 2 frames left in the queue on closing
Conversion failed!


    


    Edit : Made some progress. I now no longer get an error, but upon viewing the output, there's no subtitles burned in.
Command :

    


    ffmpeg -hwaccel cuvid -c:v h264_cuvid -i 3030025890-TEST.mp4  -c:v h264_nvenc -map 0:v:0 -map 0:a:0 -g 50 -b:v 5M -maxrate 5.5M -minrate 4M -bufsize 5M -vf "scale_npp=1920:1080, hwdownload, format=nv12, subtitles=output_ar.srt, hwupload" -preset fast 1080_output.mp4