Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Media File Open issue with 2024.09 - enh (dkulp) Faster audio processing/loading using far less memory (?) #4515

Closed
brett-foy opened this issue Apr 21, 2024 · 6 comments

Comments

@brett-foy
Copy link

brett-foy commented Apr 21, 2024

I have a sequence that opens just fine on 2024.08 but does not open on 2024.09; it is having problems with .09 stating that the media file for the audio is corrupt.

I wonder if this is related to:

  • enh (dkulp) Faster audio processing/loading using far less memory
    [LOE_Basics_EverybodyWantsToRuleTheWorld_Lorde-02-26-2024.zip]
    xLightsProblem.zip

The media file name as purchased is rather larger, and also contains " " (quotation marks) which may be unusualy and in the xlights_l4.cpp file is replace by a square ascii symbol with a ? inside of it.

On 2024.09, loading a file gets this error:
2024-04-21 13:08:37,083 23276 log_base [DEBUG] Audio Manager Constructor start
2024-04-21 13:08:37,083 23276 log_base [DEBUG] Audio Manager Constructor: Loading media file.
2024-04-21 13:08:37,083 23276 log_base [ERROR] avformat_open_input Error opening the file C:\Users\brett\OneDrive\xlights\Media\2024 Halloween\08 - Everybody Wants To Rule The World (From The Hunger Games_ Catching Fire Soundtrack).mp3 => -22.
2024-04-21 13:08:37,083 23276 log_base [DEBUG] Audio Manager Constructor: Media file loaded.
2024-04-21 13:08:37,083 23276 log_base [ERROR] Audio file not loaded: .
.....
2024-04-21 13:08:37,235 23276 log_base [WARN] DisplayWarning: Media File Missing or Corrupted C:\Users\brett\OneDrive\xlights\Media\2024 Halloween\08 - Everybody Wants To Rule The World (From The Hunger Games_ Catching Fire Soundtrack).mp3.

On 2024.08, file loads great:
2024-04-21 13:09:32,533 8244 log_base [DEBUG] Audio Manager Constructor start
2024-04-21 13:09:32,533 8244 log_base [DEBUG] Audio Manager Constructor: Loading media file.
2024-04-21 13:09:32,536 8244 log_base [DEBUG] Getting track metrics.
2024-04-21 13:09:32,536 8244 log_base [INFO] av_frame_alloc okay
2024-04-21 13:09:32,629 8244 log_base [INFO] Track Size: 6862511, Time Base Den: 44100 => Length 155612ms
2024-04-21 13:09:32,637 8244 log_base [DEBUG] Preparing to load song data.
2024-04-21 13:09:32,637 8244 log_base [DEBUG] Opening audio device. (null)
2024-04-21 13:09:32,637 28148 log_base [DEBUG] DoLoadAudioData: Doing load of song data.
2024-04-21 13:09:32,642 8244 log_base [DEBUG] Result ''
2024-04-21 13:09:32,642 8244 log_base [DEBUG] Audio device opened -> Device: 2.
2024-04-21 13:09:32,642 8244 log_base [DEBUG] Current audio driver directsound
2024-04-21 13:09:32,642 8244 log_base [DEBUG] Output devices 6. Input devices 2.
2024-04-21 13:09:32,642 8244 log_base [DEBUG] Audio device '' opened 2. Device specification:
2024-04-21 13:09:32,642 8244 log_base [DEBUG] Audio device status (2) Paused
2024-04-21 13:09:32,642 8244 log_base [DEBUG] Size Asked 4096 Received 4096
2024-04-21 13:09:32,642 8244 log_base [DEBUG] Channels Asked 2 Received 2
2024-04-21 13:09:32,642 8244 log_base [DEBUG] Format Asked 0x8010 Received 0x8010
2024-04-21 13:09:32,642 8244 log_base [DEBUG] Bitsize Asked 16 Received 16
2024-04-21 13:09:32,642 8244 log_base [DEBUG] Float Asked False Received False
2024-04-21 13:09:32,642 8244 log_base [DEBUG] Big Endian Asked False Received False
2024-04-21 13:09:32,642 8244 log_base [DEBUG] Signed Asked True Received True
2024-04-21 13:09:32,642 8244 log_base [DEBUG] Frequency Asked 44100 Received 44100
2024-04-21 13:09:32,642 8244 log_base [DEBUG] Padding Asked 0 Received 0
2024-04-21 13:09:32,642 8244 log_base [DEBUG] Samples Asked 1024 Received 1024
2024-04-21 13:09:32,642 8244 log_base [DEBUG] Silence Asked 0 Received 0
2024-04-21 13:09:32,642 8244 log_base [DEBUG] SDL Audio Pause on device 2.
2024-04-21 13:09:32,642 8244 log_base [DEBUG] SDL initialized output: ''
2024-04-21 13:09:32,642 8244 log_base [DEBUG] SDL Audio Added: id: 0, device 2, rate: 44100, len: 27450044, lengthMS: 155612, trackSize: 6862511.
2024-04-21 13:09:32,642 8244 log_base [DEBUG] Audio Manager Constructor: Media file loaded.
2024-04-21 13:09:32,642 8244 log_base [DEBUG] Audio Manager Constructor: Preparing frame data.
2024-04-21 13:09:32,642 8244 log_base [DEBUG] Audio Manager Constructor: Preparing frame data done ... but maybe on a background thread.
2024-04-21 13:09:32,642 8244 log_base [INFO] Audio file loaded.
2024-04-21 13:09:32,642 8244 log_base [INFO] Filename: C:\Users\brett\OneDrive\xlights\Media\2024 Halloween\08 - Everybody Wants To Rule The World (From The Hunger Games_ Catching Fire Soundtrack).mp3

It would appear that something changed in parsing the file name or potentiall limiting the # of characters in the file name? (what is the significance of the "=> -22" at the end of the line below?

2024-04-21 12:53:59,063 82756 log_base [ERROR] avformat_open_input Error opening the file C:\Users\brett\OneDrive\xlights\Media\2024 Halloween\08 - Everybody Wants To Rule The World (From The Hunger Games_ Catching Fire Soundtrack).mp3 => -22.

I've attached the log export and the package file from 2024.08 with the mp3 in question.

Appreciate any help

@derwin12
Copy link
Collaborator

Could be the quotes -- can check on this.

@MrPierreB
Copy link
Contributor

Double check the file name, I had a sequence where the audio file had a ' in it, after i renamed the audio and selected that as the audio it worked.

@brett-foy
Copy link
Author

Thanks Pierre - yes, I figure it's more likely to be the " than the length, and yes, easy to shorten / edit / change the name. People who buy sequences from amazon or other places may download sequences with a " in the title, like this one, and not know that the " is a prohibited ASCII character in the name string. Of course, yes, it's an easy fix to change the file name, but since this is a regression from 2024.8 into 2024.9, I suspect it could cause others / novice users to open sequences that they may have made at any time in the past (that worked) and they will get the "corrupted audio file issue". If it's an easy fix to deal with the " like it may have been dealt with in the past, then cool. Just thinking ahead that could affect more people and short of a better error message other than media file is corrupted, then this could come up in weird places and affect more novice users.

@MrPierreB
Copy link
Contributor

Agreed. There was a section where it showed Error: but it actually didn't have any message in there, if it said can't use as there are ' in the name, then people can fix it (or we just make it work) :P

@derwin12
Copy link
Collaborator

@computergeek1507 Scott, Is there any magic parameters to ffmpeg 6 that would have removed the unicode handling? Seems to have broken with the update in .09. I don't see anything in the docs. We could code around it - I will look into that.

@derwin12
Copy link
Collaborator

derwin12 commented Apr 28, 2024

I coded the convert to UTF8 but it doesnt appear xlights every really supported the non-ascii characters. The fppconnect will not let you pull in the non ascii media file.
I think this should/could be closed as not supported.
mediaName = wxString::FromAscii(stagEvent->getText()).ToStdString();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants