ittiam-systems / libmpegh

MPEG-H 3D Audio Low Complexity Profile Decoder. Encoder: https://github.com/ittiam-systems/libmpeghe Contact: mob-audio@ittiam.com
http://www.ittiam.com/
BSD 3-Clause Clear License
88 stars 18 forks source link

Need help #77

Closed Rexadev closed 8 months ago

Rexadev commented 9 months ago

I used @MarkerB 's script

@echo off
echo Processing all mp4 files - Several codec warnings are normal
mkdir Original360RA
for %%I in (*.mp4) do (
    ia_mpeghd_testbench -ifile:"%%I" -ofile:"%%~nI-temp.wav" -cicp:12
    rem convert Tidal 360RA L R C LFE Lb Rb Lss Rss Tfl Tfr Tbl Tbr to 7.1 C L R Ls Rs Lb Rb LFE

    ffmpeg -t 0 -i "%%I" -c copy -map 0 -map_metadata 0 -f ffmetadata "%%~nI-temp-meta.txt"
    rem write mp4's metadata to a temp file

    ffmpeg -i "%%I" -an -vcodec copy "%%~nI-temp-cover.jpg"
    rem write mp4's image to a temp image file

    ffmpeg -f ffmetadata -i "%%~nI-temp-meta.txt" -i "%%~nI-temp.wav" -c:a libfdk_aac -b:a 640k -filter_complex "pan=7.1|FL=c0|FR=c1|FC=c2|LFE=c3|SL=c4|SR=c5|BL=c6|BR=c7[a]" -map "[a]" "%%~nI.m4a"
    tageditor-cli set cover0="%%~nI-temp-cover.jpg" -f "%%~nI.m4a"
    rem map channels around, put as AAC in m4a container, copy metadata and album art from original mp4

    echo Moving original mp4 file to archive folder
    move "%%I" Original360RA
    rem archive off original mp4

    del "%%~nI-temp.wav"
    del "%%~nI-temp-meta.txt"
    del "%%~nI-temp-cover.jpg"
    del "%%~nI.m4a.bak"
    rem delete temporary files: WAV, meta text, cover art, and tageditor-cli's backup file
)
pause

Trying to use it on Deemix file

Most files get stuck forever

Recording-2024-02-28-234420

and one shows this

Processing all mp4 files - Several codec warnings are normal
A subdirectory or file Original360RA already exists.
-ifile:Don't Let Me Down (feat. Daya).mp4 -ofile:Don't Let Me Down (feat. Daya)-temp.wav
                       ITTIAM SYSTEMS PVT LTD, BANGALORE
                             http:\\www.ittiam.com
                     IA_MPEG_H_3D_AUD_DEC_MSVC $Rev: 1.4 $

Decoder Initialization complete
Frames Processed : [ 9771]
ffmpeg version 6.1.1-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --pkg-config=pkgconf --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-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --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-ffnvcodec --enable-nvdec --enable-nvenc --enable-dxva2 --enable-d3d11va --enable-libvpl --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      58. 29.100 / 58. 29.100
  libavcodec     60. 31.102 / 60. 31.102
  libavformat    60. 16.100 / 60. 16.100
  libavdevice    60.  3.100 / 60.  3.100
  libavfilter     9. 12.100 /  9. 12.100
  libswscale      7.  5.100 /  7.  5.100
  libswresample   4. 12.100 /  4. 12.100
  libpostproc    57.  3.100 / 57.  3.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 00000214c3bfa180] Could not find codec parameters for stream 0 (Audio: none (mha1 / 0x3161686D), 48000 Hz, 0 channels, 666 kb/s): unknown codec
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Don't Let Me Down (feat. Daya).mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42isom
    creation_time   : 2019-12-23T11:01:15.000000Z
    title           : Don't Let Me Down (feat. Daya) (360 Reality Audio Sony)
    BPM             : 0
  Duration: 00:03:28.37, start: 0.000000, bitrate: 670 kb/s
  Stream #0:0[0x1](und): Audio: none (mha1 / 0x3161686D), 48000 Hz, 0 channels, 666 kb/s (default)
    Metadata:
      creation_time   : 2019-12-23T11:01:15.000000Z
      handler_name    : soun
      vendor_id       : [0][0][0][0]
Output #0, ffmetadata, to 'Don't Let Me Down (feat. Daya)-temp-meta.txt':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42isom
    creation_time   : 2019-12-23T11:01:15.000000Z
    title           : Don't Let Me Down (feat. Daya) (360 Reality Audio Sony)
    BPM             : 0
    encoder         : Lavf60.16.100
  Stream #0:0(und): Audio: none (mha1 / 0x3161686D), 48000 Hz, 0 channels, 666 kb/s (default)
    Metadata:
      creation_time   : 2019-12-23T11:01:15.000000Z
      handler_name    : soun
      vendor_id       : [0][0][0][0]
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[out#0/ffmetadata @ 00000214c3cad000] video:0kB audio:5kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
size=       0kB time=-00:00:00.02 bitrate=N/A speed=N/A
ffmpeg version 6.1.1-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --pkg-config=pkgconf --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-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --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-ffnvcodec --enable-nvdec --enable-nvenc --enable-dxva2 --enable-d3d11va --enable-libvpl --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      58. 29.100 / 58. 29.100
  libavcodec     60. 31.102 / 60. 31.102
  libavformat    60. 16.100 / 60. 16.100
  libavdevice    60.  3.100 / 60.  3.100
  libavfilter     9. 12.100 /  9. 12.100
  libswscale      7.  5.100 /  7.  5.100
  libswresample   4. 12.100 /  4. 12.100
  libpostproc    57.  3.100 / 57.  3.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 000002331b80d280] Could not find codec parameters for stream 0 (Audio: none (mha1 / 0x3161686D), 48000 Hz, 0 channels, 666 kb/s): unknown codec
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Don't Let Me Down (feat. Daya).mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42isom
    creation_time   : 2019-12-23T11:01:15.000000Z
    title           : Don't Let Me Down (feat. Daya) (360 Reality Audio Sony)
    BPM             : 0
  Duration: 00:03:28.37, start: 0.000000, bitrate: 670 kb/s
  Stream #0:0[0x1](und): Audio: none (mha1 / 0x3161686D), 48000 Hz, 0 channels, 666 kb/s (default)
    Metadata:
      creation_time   : 2019-12-23T11:01:15.000000Z
      handler_name    : soun
      vendor_id       : [0][0][0][0]
Output #0, image2, to 'Don't Let Me Down (feat. Daya)-temp-cover.jpg':
[out#0/image2 @ 000002331b8adc40] Output file does not contain any stream
Error opening output file Don't Let Me Down (feat. Daya)-temp-cover.jpg.
Error opening output files: Invalid argument
ffmpeg version 6.1.1-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --pkg-config=pkgconf --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-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --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-ffnvcodec --enable-nvdec --enable-nvenc --enable-dxva2 --enable-d3d11va --enable-libvpl --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      58. 29.100 / 58. 29.100
  libavcodec     60. 31.102 / 60. 31.102
  libavformat    60. 16.100 / 60. 16.100
  libavdevice    60.  3.100 / 60.  3.100
  libavfilter     9. 12.100 /  9. 12.100
  libswscale      7.  5.100 /  7.  5.100
  libswresample   4. 12.100 /  4. 12.100
  libpostproc    57.  3.100 / 57.  3.100
Codec 0x21000 is not in the full list.
Input #0, ffmetadata, from 'Don't Let Me Down (feat. Daya)-temp-meta.txt':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42isom
    creation_time   : 2019-12-23T11:01:15.000000Z
    title           : Don't Let Me Down (feat. Daya) (360 Reality Audio Sony)
    BPM             : 0
    encoder         : Lavf60.16.100
  Duration: N/A, start: 0.000000, bitrate: N/A
Codec 0x21000 is not in the full list.
  Stream #0:0(und): Data: unknown_codec
    Metadata:
      creation_time   : 2019-12-23T11:01:15.000000Z
      handler_name    : soun
      vendor_id       : [0][0][0][0]
[aist#1:0/pcm_s16le @ 0000024ff6b71b40] Guessed Channel Layout: 7.1
Input #1, wav, from 'Don't Let Me Down (feat. Daya)-temp.wav':
  Duration: 00:03:28.44, bitrate: 6144 kb/s
  Stream #1:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, 8 channels, s16, 6144 kb/s
[aost#0:0 @ 0000024ff6b79c80] Unknown encoder 'libfdk_aac'
[aost#0:0 @ 0000024ff6b79c80] Error selecting an encoder
Error opening output file Don't Let Me Down (feat. Daya).m4a.
Error opening output files: Encoder not found
'tageditor-cli' is not recognized as an internal or external command,
operable program or batch file.
Moving original mp4 file to archive folder
        1 file(s) moved.
Could Not Find D:\...\Down Mix 360\Don't Let Me Down (feat. Daya)-temp-cover.jpg
Could Not Find D:\...\Down Mix 360\Don't Let Me Down (feat. Daya).m4a.bak
Press any key to continue . . .
MarkerB commented 9 months ago

I used @MarkerB 's script

You need to greatly simplify the issue you're posting. Don't make the developers wade through my completely irrelevant script, including the tag editor error you still haven't fixed.

Your issue is simply with ia_mpeghd_testbench hanging on certain files. What you need to post is an attached mp4 file that causes the hanging, the version of ia_mpeghd_testbench you're using, the command line parameters you used with ia_mpeghd_testbench, and your Windows version.

SakethSathuvalli commented 9 months ago

Hi @Rexadev,

The decoding failure could be for a variety of reasons.

Based on the most common ones I suggest you to try the code on the branch https://github.com/ittiam-systems/libmpegh/tree/lc-level-4

Thanks!

Rexadev commented 9 months ago

Based on the most common ones I suggest you to try the code on the branch https://github.com/ittiam-systems/libmpegh/tree/lc-level-4

were to find compiled version ?

MarkerB commented 9 months ago

were to find compiled version ?

I don't think anything but the current stable version has a binary release. You probably have to compile it yourself via https://visualstudio.microsoft.com/vs/community/

Rexadev commented 9 months ago

I don't think anything but the current stable version has a binary release. You probably have to compile it yourself via https://visualstudio.microsoft.com/vs/community/

Need help never compiled