Interrupt message:
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/gosu-1.4.3/lib/gosu/compat.rb:116:in `initialize': Could not parse audio file track1.m4a (RuntimeError)
: Couldn't open track1.m4a
I'm trying to open some tracks in Ruby using Gosu, but the system does not accept the file. May I ask why and how to fix the problem?
I've tried to input the file using Gosu::Song.new but the interrupt message appeared. I was expecting it load the media files.
Try converting the audio file into .mp3 or .ogg files. Ruby does not accept mp4 or m4.A
Related
Is it possible to search a directory and output a text file listing every video file that has FLAC audio?
My television doesn't support FLAC so when I run into one I have been converting them with a FFMPEG script but it would be nice to be able to find them all in advance instead of waiting until I hit the problem while trying to play the files. I'm hoping there is a way that doesn't involve just opening every file in Mediainfo and checking manually.
Maybe there is a way to just output all of the Mediainfo information for a directory and then I can just find all FLAC occurrences in a csv sheet?
You can open all files in MediaInfo then export to CSV then open the CSV in a spreadsheet processor, or for a smaller output you can customize the output with the command line version of MediaInfo (see the download section on the MediaInfo website and download the CLI version) and a template file template.txt containing:
General;%CompleteName%,
Audio;%Format%
Audio_Middle;,
File_End;\n
and this command line:
mediainfo --Output=file://template.txt --ParseSpeed=0 YourDir > List.txt
List.txt will contain a CSV file with complete file name in first column, then audio format per track (2nd column has 1st audio format, 3rd column has 2nd audio format...)
--Output=file://template.txt selects the template file.
--ParseSpeed=0 reduces the parsing speed (no need of the extra info from a longer parsing).
YourDir is to be replaced by the directory name you want to scan.
> List.txt sends the output to a file.
I've got Linux Ubuntu and ffmpeg version 4.3-2. It converts monochannel 16kHz 16kbit/s amr-wb files to wav without any problems, but when it comes to amr-wb multichannel files the output is:
filename.amr: Operation not permitted
I've already tried for test purposes to encode a stereo.wav file into an amr-wb file, but without success. The ffmpeg codec converts it into a normal monofile with just one channel. Seems that the multichannel mode is unknown for it.
Any idea?
Thanks in advance.
Well, I'm using this project to create a Telegram bot which receives URL of .mp4 files, downloads them on server and uploads them to Telegram.
Issue
Everything works fine so far, except converting certain .mp4 files.
For example if I use a sample .mp4 video from https://sample-videos.com/. Then it works fine and converts it successfully.
But if I use a video from some random website which is also simple .mp4 file, it doesn't work and throws this error:
[mov,mp4,m4a,3gp,3g2,mj2 # 0x1932420] Format mov,mp4,m4a,3gp,3g2,mj2 detected only with low score of 1, misdetection possible!
[mov,mp4,m4a,3gp,3g2,mj2 # 0x1932420] moov atom not found
data/720P_1500K_210306701.mp4: Invalid data found when processing input
This really depends on the software that handles the upload.
The moov atom is either located at the beginning, or at the end of the file.
If the software only looks at the first part of the file, and the moov atom is at the end, it will not know how to deal with that file until the file upload is completed.
What you could do, prior to uploading, is move the moov file to the start of the video, it's more likely that the software only checks for the moov atom at the start of the file.
With ffmpeg, the command is:
ffmpeg -i input -c:v copy -c:a copy -movflags faststart output.mp4
That would move it to the start of the file.
You will need to do this for every video though.
I have a file ffmpeg_list_of_files.txt with the content
file '.\Output_0\forces_vs_radii.pdf'
file '.\Output_1\forces_vs_radii.pdf'
file '.\Output_2\forces_vs_radii.pdf'
file '.\Output_3\forces_vs_radii.pdf'
file '.\Output_4\forces_vs_radii.pdf'
and so on...
and then run ffmpeg -f concat -i ffmpeg_list_of_files.txt -c copy output.mkv as is stated at
http://trac.ffmpeg.org/wiki/Concatenate
I, unfortunately, get the error
Line 1: unknown keyword ' ■f'
.\ffmpeg_list_of_files.txt: Invalid data found when processing input
in Windows PowerShell in Windows 10.
What am I doing wrong?
It's an encoding problem I also got that I solved changing the file encoding.
Steps to solve it:
Open the ffmpeg_list_of_files.txt with the notepad, notepad++ or similar
Change the encoding to UTF-8 without BOM. To do it follow one of the next steps:
with windows notepad, this is done using the "save as..." option and at the bottom changing the encoding to "UTF-8" and press "save"
with notepad++ select "encoding" in the main menu and select "encoding with UTF-8 without BOM" and save the file after that
Names could change a little bit depending on the version, but following the steps it's pretty straight forward.
Note: In my case, when redirecting ls or dir to a file in powershell, the default encoding of the file is USC-2
I am trying to use qt-faststart on MP4 videos to make the streaming fast but the qt-faststart command is never get finish, It is running from the last one and half hour and video file is of 14MB only.
qt-faststart file.mp4 newfile.mp4
The command is showing the ftyp and free as output
the output look like this and it is keep repeating these lines and increasing the number
ftyp 2324322 32
free 2324456 8
and the number is keep increasing with the output. No error is shown.
The MP4 video is converted from FLV video using the FFMPEG.
Generally it show the output like this but with my installation of qt-faststart I never get this ouput
patching stco atom...
patching stco atom..
writing ftyp atom...
writing moov atom...
copying rest of file ...
What could be the issue?
Is there anything wrong with the installation of qt-faststart?
I am on Linux 2.6.18-128.2.1.el5PAE i686
Check your paths to the files.
This works for me.
C:\Users\name\Desktop\qt-faststart.exe C:\Users\name\Desktop\videos\video.mp4 C:\Users\name\Desktop\videosnewer\video.mp4
Use the python wrapper https://github.com/danielgtaylor/qtfaststart
For more info, read “Server Crash” section here http://www.stoimen.com/blog/2010/11/12/how-to-make-mp4-progressive-with-qt-faststart/