
Recherche avancée
Médias (39)
-
Stereo master soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
ED-ME-5 1-DVD
11 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
1,000,000
27 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Demon Seed
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Four of Us are Dying
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Corona Radiata
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (66)
-
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
Contribute to documentation
13 avril 2011Documentation is vital to the development of improved technical capabilities.
MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
To contribute, register to the project users’ mailing (...) -
Automated installation script of MediaSPIP
25 avril 2011, parTo overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
The documentation of the use of this installation script is available here.
The code of this (...)
Sur d’autres sites (6253)
-
ffmpeg - mpegts Multicast [closed]
7 juin 2024, par Miguel DuarteI'm generating a multicast stream with this command :


ffmpeg -hwaccel_device 1 -format_code Hi50 -re -f decklink -i 'DeckLink Duo (1)' -pix_fmt yuv420p -c:v h264_nvenc -profile:v high -b:v 3500k -rc 2 -cbr true -maxrate 3500k -bufsize 7000k -c:a mp2 -b:a 192k -f mpegts "udp://239.1.1.2:5000?ttl=2&pkt_size=1316"



My problem is that if I open this stream on a device with a 100Mb/s connection, it's heavily pixelated. The same stream on a 1Gb/s device displays fine.


I have other multicast streams from our ISP and they display fine regardless of connection speed.


Has someone come across this issue ? This seems ffmpeg related.


I tried several settings, bitrates, etc. Also playing on VLC, OBS. Same result.


Version :


ffmpeg version N-111519-gefa6cec759



Thanks in advance.


-
Streaming raw h264 video from Raspberry PI to server for capture and viewing [closed]
24 juin 2024, par tbullersThis is really an optimization question - I have been able to stream h264 from a raspberry pi 5 to a linux system and capture the streams and save them to .mp4 files.


But I intend to run the video capture and sending on a battery powered Pi Zero 2 W and want to use the least amount of power to maximize battery life and still providing good video quality.


I've explored many different configuration settings but am getting lost in all the options.


This is what I run on the pi :


rpicam-vid -t 30s --framerate 30 --hdr --inline --listen -o tcp://0.0.0.0:5000



I retrieve this video from the more powerful Ubuntu server with :


ffmpeg -r 30 -i tcp://ralph:5000 -vcodec copy video_out103.mp4



It generally works but I receive lots of errors on the server side like this :


[mp4 @ 0x5f9aab5d0800] pts has no valuee= 975.4kbits/s speed=1.19x
Last message repeated 15 times
[mp4 @ 0x5f9aab5d0800] pts has no valuee=1035.3kbits/s speed=1.19x
Last message repeated 15 times
[mp4 @ 0x5f9aab5d0800] pts has no valuee=1014.8kbits/s speed=1.18x
Last message repeated 9 times
[mp4 @ 0x5f9aab5d0800] pts has no valuee=1001.1kbits/s speed=1.17x
Last message repeated 7 times
[mp4 @ 0x5f9aab5d0800] pts has no value
Last message repeated 1 times
[out#0/mp4 @ 0x5f9aab5ad5c0] video:3546kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead : 0.120360%
size= 3550kB time=00:00:27.50 bitrate=1057.5kbits/s speed=1.18x


Any suggestions on how to correct these errors ?


Also any suggestions on how to make the video capture side more efficient ? Should I use a different codec ? (yuv instead of h264 ?) Would using UDP decrease overhead ? Can I improve video quality with the mode or hdr options ? What does denoise do ?


With all the options available with these tools I think it's unlikely that I have a well thought out approach to capture and streaming. I'm hoping that people who are more familiar with this space might be able to provide some suggestions.


Thank you !


-tom


-
FFMPEG eating up ram in railway deployment [flask app]
23 juin 2024, par Eshan DasI created a flask app , meme generator, hosting it in railway using gunicorn, i am suspecting ffmpeg is eating the most ram.....
so what i am doing is , generating a tts, and a text adding into one of the parts of the video , and then finally combining all together


from flask import Flask, request, jsonify, send_file, url_for
from moviepy.editor import VideoFileClip, ImageClip, CompositeVideoClip, AudioFileClip, concatenate_videoclips
from pydub import AudioSegment
from PIL import Image, ImageDraw, ImageFont
from gtts import gTTS
from flask_cors import CORS
import os

app = Flask(__name__)
CORS(app)
app.config['UPLOAD_FOLDER'] = 'uploads'

def generate_video(name, profile_image_path, song_path, start_time):
 first_video = VideoFileClip("first.mp4")
 second_video = VideoFileClip("second.mp4")
 third_video = VideoFileClip("third.mp4")

 #font_path = os.path.join("fonts", "arial.ttf") # Updated font path
 font_size = 70
 font = ImageFont.load_default()
 text = name
 image_size = (second_video.w, second_video.h)
 text_image = Image.new('RGBA', image_size, (0, 0, 0, 0))
 draw = ImageDraw.Draw(text_image)
 text_width, text_height = draw.textsize(text, font=font)
 text_position = ((image_size[0] - text_width) // 2, (image_size[1] - text_height) // 2)
 draw.text(text_position, text, font=font, fill="black")

 text_image_path = os.path.join(app.config['UPLOAD_FOLDER'], f"text_{name}.png")
 text_image.save(text_image_path)

 txt_clip = ImageClip(text_image_path, duration=second_video.duration)

 tts = gTTS(text=name, lang='en')
 audio_path = os.path.join(app.config['UPLOAD_FOLDER'], f"audio_{name}.wav")
 tts.save(audio_path)

 sound = AudioSegment.from_file(audio_path)
 chipmunk_sound = sound._spawn(sound.raw_data, overrides={
 "frame_rate": int(sound.frame_rate * 1.5)
 }).set_frame_rate(sound.frame_rate)

 chipmunk_audio_path = os.path.join(app.config['UPLOAD_FOLDER'], f"chipmunk_audio_{name}.wav")
 chipmunk_sound.export(chipmunk_audio_path, format="wav")

 audio_clip_second = AudioFileClip(chipmunk_audio_path)

 second_video = CompositeVideoClip([second_video, txt_clip.set_position((45, 170))])
 second_video = second_video.set_audio(audio_clip_second)

 song = AudioSegment.from_file(song_path)
 start_ms = start_time * 1000
 cropped_song = song[start_ms:start_ms + 20000]

 chipmunk_song = cropped_song._spawn(cropped_song.raw_data, overrides={
 "frame_rate": int(cropped_song.frame_rate * 1.5)
 }).set_frame_rate(cropped_song.frame_rate)

 chipmunk_song_path = os.path.join(app.config['UPLOAD_FOLDER'], f"chipmunk_song_{name}.wav")
 chipmunk_song.export(chipmunk_song_path, format="wav")

 audio_clip_third = AudioFileClip(chipmunk_song_path)
 third_video = third_video.set_audio(audio_clip_third)

 profile_image = ImageClip(profile_image_path).set_duration(first_video.duration).resize(height=first_video.h / 8).set_position((950, 500))
 first_video = CompositeVideoClip([first_video, profile_image])
 
 profile_image = ImageClip(profile_image_path).set_duration(second_video.duration).resize(height=second_video.h / 8).set_position((950, 500))
 second_video = CompositeVideoClip([second_video, profile_image])
 
 profile_image = ImageClip(profile_image_path).set_duration(third_video.duration).resize(height=third_video.h / 8).set_position((950, 500))
 third_video = CompositeVideoClip([third_video, profile_image])

 final_video = concatenate_videoclips([first_video, second_video, third_video])
 final_video = final_video.subclip(0, 10)

 output_path = os.path.join(app.config['UPLOAD_FOLDER'], f"output_{name}.mp4")
 final_video.write_videofile(output_path, codec="libx264", audio_codec='aac')

 final_video.close()
 first_video.close()
 second_video.close()
 third_video.close()
 audio_clip_second.close()
 audio_clip_third.close()

 os.remove(audio_path)
 os.remove(text_image_path)
 os.remove(chipmunk_song_path)
 os.remove(chipmunk_audio_path)
 
 return output_path

@app.route('/generate', methods=['POST'])
async def generate():
 if not os.path.exists(app.config['UPLOAD_FOLDER']):
 os.makedirs(app.config['UPLOAD_FOLDER'])

 name = request.form['name']
 start_time = float(request.form['start_time'])

 profile_image = request.files['profile_image']
 profile_image_path = os.path.join(app.config['UPLOAD_FOLDER'], profile_image.filename)
 profile_image.save(profile_image_path)

 song = request.files['song']
 song_path = os.path.join(app.config['UPLOAD_FOLDER'], song.filename)
 song.save(song_path)

 video_path = generate_video(name, profile_image_path, song_path, start_time)
 return jsonify({"video_url": url_for('uploaded_file', filename=os.path.basename(video_path))})

@app.route('/uploads/<filename>')
def uploaded_file(filename):
 path = os.path.join(app.config['UPLOAD_FOLDER'], filename)
 return send_file(path, as_attachment=True)

if __name__ == "__main__":
 if not os.path.exists(app.config['UPLOAD_FOLDER']):
 os.makedirs(app.config['UPLOAD_FOLDER'])
 app.run(host='0.0.0.0', port=5000)
</filename>


I am trying to solve this issue, any way to optimize my code , or any other alternative of ffmpeg which i can use , to reduce the ram consumption