AOMediaCodec / iamf-tools

Tools to work with IAMF
https://aomediacodec.github.io/iamf-tools/
Other
18 stars 8 forks source link

Example command to convert 5.1 wav directly with ffmpeg throws error #15

Open rafasloth opened 2 weeks ago

rafasloth commented 2 weeks ago

Current command with 5.1 inside quotes gives me this error in ffmpeg:


[AVFormatContext @ 000001d30b4600c0] Unable to choose an output format for '5.1\:parameter_id=101:parameter_rate=48000:default_mix_gain=0.0|layout=sound_system=stereo:integrated_loudness=0.0'; use a standard extension for the filename or specify the format manually.
[out#0 @ 000001d30ae90000] Error initializing the muxer for 5.1\:parameter_id=101:parameter_rate=48000:default_mix_gain=0.0|layout=sound_system=stereo:integrated_loudness=0.0: Invalid argument
Error opening output file 5.1\:parameter_id=101:parameter_rate=48000:default_mix_gain=0.0|layout=sound_system=stereo:integrated_loudness=0.0.
Error opening output files: Invalid argument

If I remove the quotes it converts correctly to iamf:


ffmpeg version 7.1-full_build-www.gyan.dev Copyright (c) 2000-2024 the FFmpeg developers
  built with gcc 14.2.0 (Rev1, 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-libopenjpeg --enable-libquirc --enable-libuavs3d --enable-libxevd --enable-libzvbi --enable-libqrencode --enable-librav1e --enable-libsvtav1 --enable-libvvenc --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxeve --enable-libxvid --enable-libaom --enable-libjxl --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-liblc3 --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. 39.100 / 59. 39.100
  libavcodec     61. 19.100 / 61. 19.100
  libavformat    61.  7.100 / 61.  7.100
  libavdevice    61.  3.100 / 61.  3.100
  libavfilter    10.  4.100 / 10.  4.100
  libswscale      8.  3.100 /  8.  3.100
  libswresample   5.  3.100 /  5.  3.100
  libpostproc    58.  3.100 / 58.  3.100
[aist#0:0/pcm_s16le @ 0000026cd844fd80] Guessed Channel Layout: 5.1
Input #0, wav, from 'Z:\GameDev\MasterReaSurroundTest5.1.wav':
  Metadata:
    encoded_by      : REAPER
    date            : 2024-11-10
    creation_time   : 23-20-15
    time_reference  : 0
  Duration: 00:00:13.00, bitrate: 4234 kb/s
  Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 5.1, s16, 4233 kb/s
File 'C:\Users\rafas\Downloads\ReaSurroundTest5.1.iamf' already exists. Overwrite? [y/N] y
Stream mapping:
  Stream #0:0 (pcm_s16le) -> channelmap:default
  Stream #0:0 (pcm_s16le) -> channelmap:default
  Stream #0:0 (pcm_s16le) -> channelmap:default
  Stream #0:0 (pcm_s16le) -> channelmap:default
  channelmap:default -> Stream #0:0 (libopus)
  channelmap:default -> Stream #0:1 (libopus)
  channelmap:default -> Stream #0:2 (libopus)
  channelmap:default -> Stream #0:3 (libopus)
Press [q] to stop, [?] for help
Output #0, iamf, to 'C:\Users\rafas\Downloads\ReaSurroundTest5.1.iamf':
  Metadata:
    encoded_by      : REAPER
    date            : 2024-11-10
    time_reference  : 0
    encoder         : Lavf61.7.100
  Stream group #0:0: IAMF Audio Element:
    Layer 0: 5.1
  Stream group #0:1: IAMF Mix Presentation:
    Annotations:
      en-us           : default_mix_presentation
    Submix 0:
      IAMF Audio Element #0:0
        Annotations:
          en-us           : 5.1
      Layout #0: stereo
[out#0/iamf @ 0000026cd89f8b00] video:0KiB audio:319KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 2.186542%
size=     326KiB time=00:00:13.00 bitrate= 205.2kbits/s speed= 124x

Pull Request here to fix it

https://github.com/AOMediaCodec/iamf-tools/pull/14