-
Notifications
You must be signed in to change notification settings - Fork 146
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
Not exporting MP4 (on Ubuntu 18.04) #85
Comments
Hello @djboni Welcome to MIDI Visualizer Issues. I see you have problems exporting .mp4 files right? Seeing your Command line command, I might have found out a bug As you can see you have not specified the path to the folder. That might be the problem. Please try specifying the path and you might get it. Also the extension is .mid and not .mp4 Right Command ./MIDIVisualizer --midi C/Users/Mystic/Documents/MidiFiles/file.mp4 --size 1920 1080 --config config.ini --export video.mp4 --format MPEG4 Note that I am A COMMUNITY MEMBER and am helping you since I like this program. I am Not the developer of this program nor do I take any credit for fixing these issues. I try to help everyone, but if there is something wrong with the program itself and I don't know how to fix it, I may not be able to help you. If you need any more help, with anything reply and I will respond within 48 hours. |
Hello @MysticPiano
Yes, I have problems exporting MP4 files.
I guess that is not a problem, since the file was in my CWD (current working directory) and it was being read by the visualizer, since it showed a nice visualization on screen. However it did not output the MP4 file. Pleas take a look at this script:
And its output:
I guess it is a problem with the --export option. I may have misunderstood it, or exporting is not working on my system, which is Ubuntu Linux 18.04. I hope we can figure it out. Thank you very much. |
Hello @djboni! But you are right that your initial command line (which specifies an export filename) is correct, and your bash script also seems to use the arguments correctly. Maybe your script doesn't have the autorisation to write in the current directory (but that seems far fetched)? I hope this helps! |
Hello @kosua20!
I just tried it too. The program says 'Exporting to directory: ./video.mp4' so I thought it should be a directory. Yes, the script has write permission.
I compiled it. I did not use pre-compiled version.
It is installed. I processed some videos with ffmpeg some weeks ago. Please elaborate on these details. There must be something I am missing. Best regards. |
Regarding the compilation: when configuring the project with Cmake, ffmpeg libraries are detected automatically and video export support is then enabled. If ffmpeg is not found, video export will be disabled in the compiled binary but there is no warning if you then try to export a video from the command line, I'll fix this in a future release. In cmake-gui you can check if FFMPEG_LIBRARIES is pointing to the ffmpeg libraries (libavcodec, libavformat,...) and FFMPEG_INCLUDE_DIRS to the proper ffmpeg include directories. You can also override these and re-configure and generate the project. |
Thanks for your response, it put me in the right direction. I tried opening cmake-gui, but did not find FFMPEG_LIBRARIES or FFMPEG_INCLUDE_DIRS anywhere. I guess I could do something like cmake .. -DFFMPEG_LIBRARIES=PATH for both of these? Well, I was missing libalsa. I should have seen in cmake output. Now it is installed and I think this is the expected output from cmake, where it says:
It compiles and it runs without exporting. But when I try to export this happens:
The same error happens if I choose MPEG2. Best regards. |
Alright, now that we are sure that ffmpeg is used, we can check if the encoders for mpeg2 and mpeg4 are supported by your installation of ffmpeg. ffmpeg is very modular so some formats may or may not be enabled depending on the configuration set by your package repository. Could you post the output of
This will ask ffmpeg to list the supported encoders and filter the list for all mpeg-related encoders. I'm going to try and replicate the issue but I don't have an Ubuntu 18 system at hand so I'll have to setup a VM. I'll let you know if I find anything new. |
This is the output:
I was able to replicate the same error in a VM with Ubuntu 18.04 (compiles, runs, but gives that error when exporting).
You may add this code into the project, if you like. I also created a script that creates mp3, mp4 and joins them. FYI: For now, I have finished what I needed with this project running in that VM with Ubuntu 20.04. I will provide any information you ask regarding fixing this issue. I would like to thank you for this nice project! It was very helpful for me and surely will be for many others. Kindest regards! |
Thank you so much for this detailed report! This was very helpful as I have now realized that on Ubuntu 18, the version of ffmpeg distirbuted is v3.4.X, while I'm using ffmpeg v4.X for the builds available on the release page. There has been a change in the way available codecs and formats are detected in ffmpeg 4.0 (now it's automatic), that's why on Ubuntu 18 no video format was supported by MIDIVisualizer. I've pushed a fix for this along with improvements to the robustness of direct export options and a clearer error message if a format is not supported. |
libavformat requires an initialization call on older versions such as the one used on Ubuntu 18 (#85).
The latest v6.2 release should fix this properly. |
I just tested and it is working here. And that was a fast fix. Best regards! |
Awesome! I'm closing this now, and I've setup everything so that future releases will have a Ubuntu 18 binary available directly. |
Hi,
I have some problems with MP4 exporting.
I tried the example below. The program runs, I can see the animation on the screen.
./MIDIVisualizer --midi file.mid --size 1920 1080 --config config.ini --export video.mp4 --format MPEG4
However there is no video.mp4 file created. I tried export to current directory "--export ." but did not work.
I am running on:
Ubuntu 18.04
8 GB RAM
GPU AMD Radeon
MIDIVisualizer v6.1
Thanks and best regards.
Djones
The text was updated successfully, but these errors were encountered: