Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
Is it possible to pull a RTMP stream from one server and broadcast it to another ?
12 mai 2019, par Naftuli KayI essentially have a situation where I need to pull a stream from one Wowza media server and publish it to a Red5 or Flash Media Server instance with FFMPEG. Is there a command to do this? I'm essentially looking for something like this:
while [ true ]; do ffmpeg -i rtmp://localhost:2000/vod/streamName.flv rtmp://localhost:1935/live/streamName done
Is this currently possible from FFMPEG? I remembered reading something like this, but I can't remember how exactly to do it.
-
Use FFMpeg libraries to read an audio file while it is being generated
12 mai 2019, par EyAlI got an audio engine, which generates aac files. I want to mux this audio with some video. I'm using ffmpeg libraries to do just that - meaning, after the audio file is ready, I read it and mux it. Now - for performance reasons, I don't want to wait until the audio engine completes the audio generation, I want the muxer to start reading the audio while it is being generated. Can I achieve that using the FFMpeg libraries? Which approach should I take? Couldn't find any examples doing that
-
FFmpeg doesn't play any audio through Discord.py BOT
12 mai 2019, par Lewis HHere is my code for my Discord bot's play function:
@bot.command() async def play(ctx, url:str = None): # DOESN'T WORK, DOWNLOADS BUT DOESN'T PLAY ... ytdl_options = { 'format': 'bestaudio/best', 'postprocessors': [{ 'key': 'FFmpegExtractAudio', 'preferredcodec': 'mp3', 'preferredquality': '192', }], } ytdl = youtube_dl.YoutubeDL(ytdl_options) loop = asyncio.get_event_loop() data = await loop.run_in_executor(None, lambda: ytdl.extract_info(url)) if 'entries' in data: data = data['entries'][0] # taking top item from a YT playlist source = ytdl.prepare_filename(data) vc.play(discord.FFmpegPCMAudio(source)) #play audio print(vc.is_playing()) await ctx.send("Now playing: " + data.get('title')) #now playing asyncio.sleep(3) print(vc.is_playing())
When I call the function, it runs fine and downloads the video from youtube-dl, then sends the message "Now playing: X", but doesn't play any audio.
I added the two
print(vc.is_playing())
lines and what is returned in the shell is:True False
So clearly it tries to play the song but immediately fails.
There are no exceptions thrown, so I can't understand why FFmpeg doesn't want to play the audio.
-
Add blank frame if input connect lost in ffmpeg
12 mai 2019, par vu tranI am trying to dump a rtmp stream to mp4 file every 30 minutes using command: ffmpeg -i "rtmp://abc/app/live" -vcodec copy -t 1200 "test.mp4" . It work well but in case the stream connection is lost, ffmpeg will stop. Is there a way to keep connection and add blank frames to output if connection is lost and add correct frames from stream back output if connection comeback?
-
Audio Video Editing in Python : How to do it ? [on hold]
12 mai 2019, par DoakCodeDoes anyone know how to do it? It's a bit more complex then then the usual docs I've read, so I don't know where to start and I'd appreciate someone leading me to the right docs or the right path.
The software should be doing following:
- Taking a background picture and making it blurred -> The background
- In the front should be:
- A picture
- Text
- A progressing timer (which displays the current status of the video)
- Last, but not least, audio should be added to the video or vice versa as the video is supposed to end when the audio ends to round things up.
As this all is pretty complex editing for a python programme, I don't know which library(ies) to use.. If someone has a solution / idea please reply!