mediacms-io / mediacms

MediaCMS is a modern, fully featured open source video and media CMS, written in Python/Django and React, featuring a REST API.
https://mediacms.io
GNU Affero General Public License v3.0
2.71k stars 500 forks source link

Audio files not playing well #213

Closed Anzumatsuri closed 2 years ago

Anzumatsuri commented 3 years ago

Describe the issue Uploading fails when trying to upload audio (.mp3 or .flac) files. Apparently encoding logs states something about "codec not currently supported in container" (see below screenshot).

To Reproduce Steps to reproduce the issue:

  1. Upload a .mp3 or .flac file
  2. It will fail to upload

Expected behavior It will upload the file successfully and is able to play the file. (See https://demo.mediacms.io/view?m=1rUTRo2lO)

Screenshots image image

Environment (please complete the following information):

Additional context Encoding logs from screenshot:

nt_min=360 scenecut=40 intra_refresh=0 rc_lookahead=20 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=5250 vbv_bufsize=5250 crf_max=0.0 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00 [mp4 @ 0x55f0cd075380] Could not find tag for codec h264 in stream #0, codec not currently supported in container Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument Error initializing output stream 0:1 -- [aac @ 0x55f0cd07bc40] Qavg: -nan Conversion failed!

mgogoulos commented 3 years ago

I'd like to test this locally, can you upload an mp3 and a flac file that file to load? After initial file upload the system performs a file identification, and in cases of music files it doesn't do anything. I assume the files in question contain other streams that confuse the file identification - this is why you see the Media Type as video. You may upload files on https://demo.mediacms.io/ and paste the links!

Anzumatsuri commented 3 years ago

Here are the links. Thanks!

https://demo.mediacms.io/view?m=d2i0vDrtG https://demo.mediacms.io/view?m=01ZxrwN9C

Anzumatsuri commented 2 years ago

Good day, it has almost been a year since I have raised this issue. Any ETA on the fix? I assumed you are planning to have every issues resolved for the 2.0 release?

No pressure, just wondering what was up since v1.7 release was only for a small enhancement unrelated to the tons of issues others have posted.

mgogoulos commented 2 years ago

Hi @Anzumatsuri , thanks for raising this issue, apparently I haven't found the time to debug, but I'm available to provide mentoring and will now add the good first issue label to it

mgogoulos commented 2 years ago

this is now fixed, audio files are better identified as such now. Should work on new installations, for existing ones

  1. update the code
  2. restart celery_long
  3. you might have to manually trigger re-encode to files added that weren't identified correctly!