Recherche avancée

Médias (1)

Mot : - Tags -/Christian Nold

Autres articles (27)

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

  • Installation en mode ferme

    4 février 2011, par

    Le mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
    C’est la méthode que nous utilisons sur cette même plateforme.
    L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
    Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

Sur d’autres sites (4293)

  • FFmpeg : When I ignore audio 1 and transcode audio 2 to aac I get vorbis. Is this a bug in FFmpeg ? [closed]

    26 septembre 2024, par CA Opa

    I have videos with 2 audio tracks. I don't want to copy or transcode audio track 1. I only want to copy video, transcode audio track 2 and copy subtitles using FFmpeg. When I -map track 2 (-map 0:a:1) and transcode to aac the result I get is not aac but vorbis. What is wrong with my program code ?

    


    Here is my code :

    


    "ffmpeg.exe" -i "U:\infile.mkv" -map 0:v:0 -c:v:0 copy -map 0:a:1 -c:a:1 aac -ac:a:1 2 -b:a:1 192000 -map 0:s:0 -c:s copy "U:\Outfile.mkv"


    


    This is what happens :

    


      Stream #0:0(eng): Video: h264 (High), yuv420p(tv, bt709/unknown/unknown, progressive), 1278x720 [SAR 1:1 DAR 71:40], 23.98 fps, 23.98 tbr, 1k tbn (default)
  Stream #0:1(rus): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s (default)
      Metadata:
        title           : Многоголосый закадровый, студия "Селена Интернешнл"
  Stream #0:2(eng): Audio: flac, 48000 Hz, stereo, s16
  Stream #0:3(eng): Subtitle: subrip (srt)
[out#0/matroska @ 000001b979895440] Codec AVOption b:a:1 (set bitrate (in bits/s)) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some decoder which was not actually used for any stream.
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:2 -> #0:1 (flac (native) -> vorbis (libvorbis))
  Stream #0:3 -> #0:2 (copy)
Press [q] to stop, [?] for help
Output #0, matroska, to 'U:\Outfile.mkv':
  Metadata:
    encoder         : Lavf61.5.101
  Chapters:
    Chapter #0:0: start 0.000000, end 180.000000
      Metadata:
        title           : On a Cold Night...
  Stream #0:0(eng): Video: h264 (High) (H264 / 0x34363248), yuv420p(tv, bt709/unknown/unknown, progressive), 1278x720 [SAR 1:1 DAR 71:40], q=2-31, 23.98 fps, 23.98 tbr, 1k tbn (default)
  Stream #0:1(eng): Audio: vorbis (oV[0][0] / 0x566F), 48000 Hz, stereo, fltp
      Metadata:
        encoder         : Lavc61.11.100 libvorbis
  Stream #0:2(eng): Subtitle: subrip
[out#0/matroska @ 000001b979895440] video:174005KiB audio:1635KiB subtitle:1KiB other streams:0KiB global headers:4KiB muxing overhead: 0.059971%


    


    If I transcode both audio tracks it succeeds.

    


    "ffmpeg.exe" -i "infile.mkv" -map 0:v:0 -c:v:0 copy -map 0:a:0 -c:a:0 aac -ac:a:0 2 -b:a:0 192000 -map 0:a:1 -c:a:1 aac -ac:a:1 2 -b:a:1 192000 -map 0:s:0 -c:s copy "Outfile.mkv"


    


    If I just transcoding track 1 it works. Why does it fail when I only map audio track 2 ?

    


  • How do I skip audio 1 and transcode audio 2 to aac with ffmpg ? [closed]

    25 septembre 2024, par CA Opa

    I have videos with 2 audio tracks. Track 1 is ac3 foreign and track 2 is flac English. I only want to transcode the English track 2. When I use ffmpg to map track 2 and transcode to aac the result is vorbis.

    


    Here is my code :

    


    "ffmpeg.exe" -i "U:\infile.mkv" -map 0:v:0 -c:v:0 copy -map 0:a:1 -c:a:1 aac -ac:a:1 2 -b:a:1 192000 -map 0:s:0 -c:s copy "U:\Outfile.mkv"


    


    This is what happens :

    


      Stream #0:0(eng): Video: h264 (High), yuv420p(tv, bt709/unknown/unknown, progressive), 1278x720 [SAR 1:1 DAR 71:40], 23.98 fps, 23.98 tbr, 1k tbn (default)
  Stream #0:1(rus): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s (default)
      Metadata:
        title           : Многоголосый закадровый, студия "Селена Интернешнл"
  Stream #0:2(eng): Audio: flac, 48000 Hz, stereo, s16
  Stream #0:3(eng): Subtitle: subrip (srt)
[out#0/matroska @ 000001b979895440] Codec AVOption b:a:1 (set bitrate (in bits/s)) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some decoder which was not actually used for any stream.
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:2 -> #0:1 (flac (native) -> vorbis (libvorbis))
  Stream #0:3 -> #0:2 (copy)
Press [q] to stop, [?] for help
Output #0, matroska, to 'U:\Outfile.mkv':
  Metadata:
    encoder         : Lavf61.5.101
  Chapters:
    Chapter #0:0: start 0.000000, end 180.000000
      Metadata:
        title           : On a Cold Night...
  Stream #0:0(eng): Video: h264 (High) (H264 / 0x34363248), yuv420p(tv, bt709/unknown/unknown, progressive), 1278x720 [SAR 1:1 DAR 71:40], q=2-31, 23.98 fps, 23.98 tbr, 1k tbn (default)
  Stream #0:1(eng): Audio: vorbis (oV[0][0] / 0x566F), 48000 Hz, stereo, fltp
      Metadata:
        encoder         : Lavc61.11.100 libvorbis
  Stream #0:2(eng): Subtitle: subrip
[out#0/matroska @ 000001b979895440] video:174005KiB audio:1635KiB subtitle:1KiB other streams:0KiB global headers:4KiB muxing overhead: 0.059971%


    


    If I transcode both audio tracks it succeeds.

    


    "ffmpeg.exe" -i "infile.mkv" -map 0:v:0 -c:v:0 copy -map 0:a:0 -c:a:0 aac -ac:a:0 2 -b:a:0 192000 -map 0:a:1 -c:a:1 aac -ac:a:1 2 -b:a:1 192000 -map 0:s:0 -c:s copy "Outfile.mkv"


    


    If I just transcoding track 1 it works. Why does it fail when I only map audio track 2 ?

    


  • FFmpeg Could not write header (incorrect codec parameters ?) : Invalid data found when processing input [closed]

    14 juillet 2024, par cookie

    The command

    


    ffmpeg -v verbose -i in.mkv -c copy -y out.mkv


    


    produces the following error :

    


    ffmpeg version 7.0.1-full_build-www.gyan.dev Copyright (c) 2000-2024 the FFmpeg developers
  built with gcc 13.2.0 (Rev5, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libxevd --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxeve --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-dxva2 --enable-d3d11va --enable-d3d12va --enable-ffnvcodec --enable-libvpl --enable-nvdec --enable-nvenc --enable-vaapi --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      59.  8.100 / 59.  8.100
  libavcodec     61.  3.100 / 61.  3.100
  libavformat    61.  1.100 / 61.  1.100
  libavdevice    61.  1.100 / 61.  1.100
  libavfilter    10.  1.100 / 10.  1.100
  libswscale      8.  1.100 /  8.  1.100
  libswresample   5.  1.100 /  5.  1.100
  libpostproc    58.  1.100 / 58.  1.100
[hevc @ 00000133b5bb5040] Invalid default display window
Input #0, matroska,webm, from 'in.mkv':
  Metadata:
    encoder         : libebml v1.3.0 + libmatroska v1.4.1
    creation_time   : 2015-03-20T14:07:27.000000Z
  Duration: 00:24:11.75, start: 0.000000, bitrate: 5185 kb/s
  Chapters:
    Chapter #0:0: start 0.000000, end 48.047000
      Metadata:
        title           : Chapter 01
    Chapter #0:1: start 48.047000, end 137.846000
      Metadata:
        title           : Chapter 02
    Chapter #0:2: start 137.846000, end 535.868000
      Metadata:
        title           : Chapter 03
    Chapter #0:3: start 535.868000, end 1330.871000
      Metadata:
        title           : Chapter 04
    Chapter #0:4: start 1330.871000, end 1420.877000
      Metadata:
        title           : Chapter 05
    Chapter #0:5: start 1420.877000, end 1451.741000
      Metadata:
        title           : Chapter 06
    Chapter #0:6: start 1451.741000, end 1451.745000
      Metadata:
        title           : Chapter 07
  Stream #0:0: Video: hevc (Main 10), 1 reference frame, yuv420p10le(tv, left), 1920x1080, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k tbn (default)
      Metadata:
        _STATISTICS_WRITING_APP: mkvmerge v7.0.0 ('Where We Going') 32bit built on Jun  9 2014 15:08:34
        _STATISTICS_WRITING_APP-eng: mkvmerge v7.0.0 ('Where We Going') 32bit built on Jun  9 2014 15:08:34
        _STATISTICS_WRITING_DATE_UTC: 2015-03-20 14:07:27
        _STATISTICS_WRITING_DATE_UTC-eng: 2015-03-20 14:07:27
        _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
        _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
        BPS             : 3754023
        BPS-eng         : 3754023
        DURATION        : 00:24:11.742000000
        DURATION-eng    : 00:24:11.742000000
        NUMBER_OF_FRAMES: 34807
        NUMBER_OF_FRAMES-eng: 34807
        NUMBER_OF_BYTES : 681234123
        NUMBER_OF_BYTES-eng: 681234123
  Stream #0:1(jpn): Audio: flac, 48000 Hz, stereo, s32 (24 bit) (default)
      Metadata:
        _STATISTICS_WRITING_APP: mkvmerge v7.0.0 ('Where We Going') 32bit built on Jun  9 2014 15:08:34
        _STATISTICS_WRITING_APP-eng: mkvmerge v7.0.0 ('Where We Going') 32bit built on Jun  9 2014 15:08:34
        _STATISTICS_WRITING_DATE_UTC: 2015-03-20 14:07:27
        _STATISTICS_WRITING_DATE_UTC-eng: 2015-03-20 14:07:27
        _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
        _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
        BPS             : 1429414
        BPS-eng         : 1429414
        DURATION        : 00:24:11.745000000
        DURATION-eng    : 00:24:11.745000000
        NUMBER_OF_FRAMES: 17013
        NUMBER_OF_FRAMES-eng: 17013
        NUMBER_OF_BYTES : 259393130
        NUMBER_OF_BYTES-eng: 259393130
[out#0/matroska @ 00000133b5bb5a40] No explicit maps, mapping streams automatically...
[vost#0:0/copy @ 00000133b5c2f580] Created video stream from input stream 0:0
[aost#0:1/copy @ 00000133b5bf1680] Created audio stream from input stream 0:1
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
[out#0/matroska @ 00000133b5bb5a40] Could not write header (incorrect codec parameters ?): Invalid data found when processing input
[AVIOContext @ 00000133b5c27940] Statistics: 291 bytes written, 0 seeks, 1 writeouts
[AVIOContext @ 00000133b5b97980] Statistics: 66432 bytes read, 2 seeks
Conversion failed!


    


    Originally, I was trying to add a subtitle to in.mkv, but I keep encountering this error. When I add the subtitle to another MKV file, it works fine, so I believe the problem lies with in.mkv.

    


    Troubleshooting

    


    Output only video stream produce the same error :

    


    ffmpeg -i in.mkv -map 0:v:0 -c copy out.mkv


    


    Output only audio stream works fine :

    


    ffmpeg -i in.mkv -map 0:a:0 -c copy out.mkv


    


    Output as mp4 got no error, but the output file is unplayable :

    


    ffmpeg -i in.mkv -c copy -strict -2 out.mp4


    


    Re-encoding works fine :

    


    ffmpeg -i in.mkv -c:v libx265 -c:a copy out.mkv


    


    How can I fix the video stream in in.mkv so that I can add a subtitle stream and remux the file without re-encoding the video ? Any insights or suggestions on handling this error would be greatly appreciated.