
Recherche avancée
Médias (91)
-
Head down (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Echoplex (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Discipline (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Letting you (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
1 000 000 (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
999 999 (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
Autres articles (59)
-
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...) -
Contribute to a better visual interface
13 avril 2011MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community. -
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...)
Sur d’autres sites (3853)
-
How to merge several audio files using Libav API ?
22 avril 2022, par xtingrayCurrently, I am implementing a new feature of my software using the Libav API. This is the requirement : to merge a list of audio files (MP3 and WAV) and create a unique
audio file (MP3) as output. Note : The challenge is not about concatenating files, but merging them. When the output sound is played, all the input audio content must sound at the same time, as when you merge several files in a video editor.


I was researching about Libav audio streams, and I am just guessing that my requirement is related to the "channels" concept, I mean, that there is possible to include several audios in the stream, using one channel per audio or something like that. I was hoping to find more information about this topic, but FFmpeg/Libav documentation is actually scarce.


Right now, I am able to merge several audio streams to a video stream successfully and I can create a playable MP4 file. My problem is that players like MPlayer/VLC only reproduce the first audio stream with the video, the other two audio streams are ignored.


I was looking at the set of examples included in the FFmpeg source code, but there is nothing specifically related to my requirement, so I would appreciate any
source code reference or algorithm explanation about how to merge several audio files into one using libav. Thanks.


Update :


The ffmpeg command to merge several audio files requires de filter flag "amix", like in this example :


ffmpeg -i 1.mp3 -i 2.mp3 -i 3.mp3 -filter_complex amix=inputs=3:duration=first result.mp3



All the syntax related to this option is described in the FFmpeg Documentation


Checking the FFmpeg source code, it seems the amix feature implementation is included in the file af_amix.c


I am not 100% sure, but it seems the general algorithm is described in the function :


static int activate(AVFilterContext *ctx) 



-
Http server live streaming in python
8 juillet 2015, par George SubiI want to send the live output of ffmpeg command to every GET request, but I’m novice in python and can’t solve it. This is my code :
import subprocess # for piping
from http.server import HTTPServer, BaseHTTPRequestHandler
class RequestHandler(BaseHTTPRequestHandler):
def _writeheaders(self):
self.send_response(200) # 200 OK http response
self.send_header('Connection', 'keep-alive')
self.send_header('Content-Type', 'video/mp4')
self.send_header('Accept-Ranges', 'bytes')
self.end_headers()
def do_GET(self):
self._writeheaders()
global p
DataChunkSize = 10000
print("starting polling loop.")
while(p.poll() is None):
print("looping... ")
stdoutdata = p.stdout.read(DataChunkSize)
self.wfile.write(stdoutdata)
print("Done Looping")
print("dumping last data, if any")
stdoutdata = p.stdout.read(DataChunkSize)
self.wfile.write(stdoutdata)
if __name__ == '__main__':
command = 'ffmpeg -re -i video.avi -an -vcodec libx264 -vb 448k -f mp4 -movflags dash -'
print("running command: %s" % (command, ))
p = subprocess.Popen(command, stdout=subprocess.PIPE, bufsize=-1, shell=True)
print("Server in port 8080...")
serveraddr = ('', 8080) # connect to port 8080
srvr = HTTPServer(serveraddr, RequestHandler)
srvr.serve_forever()This is a prove of concept with a video.avi but the real application is with a live signal video.
When connect to html5 video tag, play the video well, but when open another connection then play the video from the begining and not from the live moment. Also, when close the web, the server print an error :
BrokenPipeError: [Errno 32] Broken pipe
Yes, the pipe is broken when cut the connection is obvious. I think that maybe do it with pipes is not correct, but I don’t know how to do it.
The goal is to run only one ffmpeg command and the output send to every client connected or will do it. Anybody can help me please ?
-
Extracting metadata from incomplete video files
17 juillet 2013, par npgallCan anyone tell me where metadata is stored in common video file formats ? And if it would be located towards the start of the file, or scattered throughout.
I'm working with a remote object store containing a lot of video files and I want to extract metadata, in particular video duration and video dimensions from those files, without streaming the entire file contents to the local machine.
I'm hoping that this metadata will be stored in the first X bytes of files, and so I can just fetch a byte range starting at the beginning instead of the whole file, passing this partial file data to
ffprobe
.For testing purposes I created a 22MB MP4 file, and used the following command to supply only the first 1MB of data to ffprobe :
head -c1024K '2013-07-04 12.20.07.mp4' | ffprobe -
It prints :
avprobe version 0.8.6-4:0.8.6-0ubuntu0.12.04.1, Copyright (c) 2007-2013 the Libav developers
built on Apr 2 2013 17:02:36 with gcc 4.6.3
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1a6b7a0] stream 0, offset 0x10beab: partial file
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'pipe:':
Metadata:
major_brand : isom
minor_version : 0
compatible_brands: isom3gp4
creation_time : 1947-07-04 11:20:07
Duration: 00:00:09.84, start: 0.000000, bitrate: N/A
Stream #0.0(eng): Video: h264 (High), yuv420p, 1920x1080, 20028 kb/s, PAR 65536:65536 DAR 16:9, 29.99 fps, 30 tbr, 90k tbn, 180k tbc
Metadata:
creation_time : 1947-07-04 11:20:07
Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, s16, 189 kb/s
Metadata:
creation_time : 1947-07-04 11:20:07So I see the first 1MB was enough to extract video duration 9.84 seconds and video dimensions 1920x1080, even though ffprobe printed the warning about detecting a partial file. If I supply less than 1MB, it fails completely.
Would this approach work for other common video file formats to reliably extract metadata, or do any common formats scatter metadata throughout the file ?
I'm aware of the concept of container formats and that various codecs may be used represent the audio/video data inside those containers. I'm not familiar with the details though. So I guess the question may apply to common combinations of containers + codecs ? Thanks in advance.