Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
Silent Audio In Concatenated MP4s (Python, FFMPEG)
28 janvier, par John ColemanI am trying to solve an issue with concatenating several video files and ending up with silent audio for the whole generated video. Part of this is generating two videos, one title and one end screen, created from images, which I have added silence to. I then take these and add up to seven videos (with stereo audio, 48000hz). So, it ends up being Title + {up to seven videos} + end screen.
I've added silence to the title/end screens, set the sample rate, channels, etc. but still no go. I still lose audio on the videos that should have audio (that originally did).
Relevant code:
Title Screen:
( ffmpeg .input(thumbnail_path, loop=1, t=self.config.title_duration) .filter('fade', type='in', duration=self.config.fade_duration) .output(title_temp, vcodec='h264', acodec='aac', af='aevalsrc=0:d={}[aout]:s=48000:c=2'.format(self.config.title_duration)) .overwrite_output() .run(capture_stdout=True, capture_stderr=True) )
End Screen:
( ffmpeg .input(end_screen_path, loop=1, t=self.config.end_screen_duration) .filter('fade', type='in', duration=self.config.fade_duration) .output(end_temp, vcodec='h264', acodec='aac', af='aevalsrc=0:d={}[aout]:s=48000:c=2'.format(self.config.end_screen_duration)) .overwrite_output() .run(capture_stdout=True, capture_stderr=True) )
Concatenate:
( ffmpeg .input(concat_file, format='concat', safe=0) .output(output_path, c='copy') .overwrite_output() .run(capture_stdout=True, capture_stderr=True) )
Any help with this would be SUPER appreciated. Thank you!
-
ImportError : No module named 'pydub'
28 janvier, par ensmingerI am creating a simple script that will use
pydub
to fetch files from a directory based on their name, then stitch a few of them together and export the result.I had the script working great in a Windows environment (Win 7, python 3.4), but now I'm trying to run on OSX.
I have installed all necessary components -
ffmpeg
,libav
. I have just installedpydub
withpip
, pulling directly from github.My file starts with the input statement
from pydub import AudioSegment
, and this is what I get:Traceback (most recent call last): File "functions.py", line 2, in
from pydub import AudioSegment ImportError: No module named 'pydub' Thoughts? What am I missing? Any help is greatly appreciated!
-
FFmpeg avio_open_dir returns -40 on Windows, even when directory exists
28 janvier, par グルグルI'm use ffmpeg7.1 on windows 10. And libavformat's version is 61. I use a absolute path of a directory on
avio_open_dir
but it's failed, and return -40. I useav_err2str
gotFunction not implemented
. What problem it is?extern "C" { #include
avformat.h> } int main() { av_log_set_level(AV_LOG_DEBUG); auto dir = "D:\\music"; AVIODirContext* dirCtx; auto ret = avio_open_dir(&dirCtx, dir, nullptr); if (ret < 0) { av_log(nullptr, AV_LOG_ERROR, "Can't open %s: %s\n", dir, av_err2str(ret)); exit(EXIT_FAILURE); } } output
Can't open D:\music: Function not implemented
It's not the path incorrect problem. I used
std::filesystem::exists("D:\\music") && std::filesystem::is_directory("D:\\music")
to verify that the path is correct. -
Recommendations for Open Source Webinar Platforms Supporting 1000+ Users [closed]
28 janvier, par Firas Ben saidI am looking for an open-source webinar platform capable of hosting 1000+ concurrent users. My primary requirements are:
- Scalability to handle large audiences seamlessly.
- Support for features like video streaming, screen sharing, and chat functionality.
- Compatibility with modern technologies such as RTMP and HLS.
- Extensibility to integrate with other tools or APIs.
I’ve come across platforms like BigBlueButton but it cannot handle a great number of users in a session, so I’d like to know if there are other options available.
-
Creating an HLS audio playlist from multiple .mp3 files
28 janvier, par tamirgI have a list of .mp3 audio files, and i would simply like to create an HLS playlist from those files.
I tried to manually create a m3u8 playlist file. for example:
#EXTM3U #EXT-X-VERSION:3 #EXT-X-TARGETDURATION:10 #EXT-X-MEDIA-SEQUENCE:0 #EXTINF:10.0, audio_1.mp3 #EXTINF:10.0, audio_2.mp3 #EXTINF:10.0, audio_3.mp3 #EXTINF:10.0, audio_4.mp3 #EXTINF:10.0, audio_5.mp3
But when doing so, if i simply play that playlist with ffmpeg, the first file being played is audio 4 for some reason, and there also a millisecond of silence when it passes between chunks.
Are those mp3 files must be converted to .ts?
edit: apple music plays that just fine, can the issue be with ffmpeg misreading the h3u8 file?