
Recherche avancée
Médias (1)
-
Sintel MP4 Surround 5.1 Full
13 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
Autres articles (69)
-
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
-
Dépôt de média et thèmes par FTP
31 mai 2013, parL’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)
Sur d’autres sites (6111)
-
ffmpeg - how to handle video and audio URL's streams separately ?
13 mai 2022, par Rubem PacelliI am trying to create a
zsh
function that usesyoutube-dl
andffmpeg
to download a portion of a YouTube video. I did achieve this goal with the following function :

# $1 - youtube URL
# $2 - start position in hh:mm:ss.msms format (ms=miliseconds)
# $3 - final position in hh:mm:ss.msms format (ms=miliseconds)
# $4 - output file name (optional)
function youtubedl_snippet()(
 local url_stream=$(youtube-dl -f best --get-url $1)
 local output_name=$(youtube-dl --get-title $1)

 ffmpeg -ss $2 -to $3 -i $url_stream -c:v copy -c:a copy ${4:-"$output_name.mp4"}
)



The command
youtube-dl -f best --get-url $1
return a single URL with the best possible quality. In order to understand better howffmpeg
works, I tried to create another function with the same goal but with a different approach :

# $1 - youtube URL
# $2 - start position in hh:mm:ss.msms format (ms=miliseconds)
# $3 - final position in hh:mm:ss.msms format (ms=miliseconds)
# $4 - output file name (optional)
# $5 - output video codec type (optional, for instance: libx264)
# $6 - output audio codec type (optional, for instance: aac)
function youtubedl_snippet2()(
 local url_streams=$(youtube-dl --get-url $1)
 local output_name=$(youtube-dl --get-title $1)

 local url_array=(${(f)url_streams}) # expand urls by lines url_array[1] -> video stream url_array[2] -> audio stream

 ffmpeg -ss $2 -to $3 -i ${url_array[1]} -ss $2 -to $3 -i ${url_array[2]} -map 0:v -map 1:a -c:v ${5:-copy} -c:a ${6:-copy} ${4:-"$output_name.mp4"}
)



What I suppose that is going on here :


- 

url_streams
is a line-separated URL.url_array[1]
is the video URL andurl_array[2]
is the audio URL.- I am setting both audio and video to the same intervals.
- I mapped the first stream to video, and the second to audio
- If
$5
and$6
does not give different codecs,ffmpeg
just copy from the original source.










Well, it seems that everything is ok. But when I try


start=$SECONDS; youtubedl_snippet2 'https://www.youtube.com/watch?v=g-_hVXzkn0o' 00:00:05.00 00:00:15.00; echo "it takes $(( SECONDS - start )) seconds"



It will take 368 seconds. Moreover, I cannot open it in my android (only audio works)




On the other hand,


start=$SECONDS; youtubedl_snippet 'https://www.youtube.com/watch?v=g-_hVXzkn0o' 00:00:05.00 00:00:15.00; echo "it takes $(( SECONDS - start )) seconds"



takes only 40 seconds, and the video can be played on Android.


Here is the
youtubedl_snippet
log file. And here is theyoutubedl_snippet2
log file.

-
ffmpeg hangs when muxing longer videos
11 août 2020, par 492357816I am using ffmpeg with Janus WebRTC server for muxing video conference recordings. For video conferences under approximaately 5 minutes duration, existing code works well. If the source files are longer than that the process appears to hang without returning either an error or a completed file.
Any advice/suggestions would be most welcome.


var recordingsPath = exports.recordingsPath;
 var videoRecordingPath = `${recordingsPath}/${filename}-video.mjr`;
 var audioRecordingPath = `${recordingsPath}/${filename}-audio.mjr`;
 var videoOutputPath = `${recordingsPath}/${filename}-output1.mp4`;
 var audioOutputPath = `${recordingsPath}/${filename}-output1.wav`;
 var finalOutputPath = `${recordingsPath}/${filename}-final.mp4`;
 var rawConverterPath = "/opt/janus/bin/janus-pp-rec";
 var audioRecordingByteSize = exports.getFileSizeInBytes(audioRecordingPath);
 var audioIsValid = audioRecordingByteSize > 8;

 if (audioIsValid) {
 //turn audio and video mjr files into .wav and mp4 respectively
 exports.runBashSync([ rawConverterPath, videoRecordingPath, videoOutputPath]);
 exports.runBashSync([ rawConverterPath, audioRecordingPath, audioOutputPath]);
 return exports.mergeMp4AndWav(
 audioOutputPath, videoOutputPath, finalOutputPath
 ).then(function(result) {
 // remove source data for audio & video
 exports.runBashSync([ "rm", audioOutputPath]);
 exports.runBashSync([ "rm", videoOutputPath]);
 exports.runBashSync([ "rm", audioRecordingPath]);
 exports.runBashSync([ "rm", videoRecordingPath]);
 });
 } else {
 // handle cases where audio is not available
 feedback("no audio");
 return new Promise(function(resolve) {
 exports.runBashSync([ rawConverterPath, videoRecordingPath, finalOutputPath], true);
 if (Number.isInteger(audioRecordingByteSize)) {
 exports.runBashSync([ "rm", audioRecordingPath]);
 }
 exports.runBashSync([ "rm", videoRecordingPath]);
 resolve(true);
 });
 }
};

exports.joinMp4s = function(mp4Filenames, outputPath) {
 feedback("joining mp4s");
 if (mp4Filenames.length === 1) {
 feedback("single-stream case");
 exports.runBashSync(["mv", mp4Filenames[0], outputPath]);
 return new Promise(function(resolve) { resolve(true); });
 }
 feedback("multi-stream case");
 var joinCmd = ["ffmpeg"];
 mp4Filenames.forEach(function(filename) {
 joinCmd.push(`-i ${filename}`);
 });
 joinCmd.push("-strict -2");
 var totalHeight = 960;
 var totalWidth = 1280;

 joinCmd.push(`-filter_complex "color=size=${totalWidth}x${totalHeight}:c=Black [base];`);

 // var numStrms = mp4Filenames.length;
 var streamsPattern = exports.setStreamsPattern(mp4Filenames);
 var strmHeight = streamsPattern.height;
 var strmWidth = streamsPattern.width;
 var strmDmns = `${strmWidth}x${strmHeight}`;
 feedback("streamDimensions: " + strmDmns);

 var i;
 for (i = 0; i < mp4Filenames.length; i++) {
 joinCmd.push(`[${i}:v] setpts=PTS-STARTPTS, scale=${strmDmns} [temp${i}];`);
 }
 for (i = 0; i < mp4Filenames.length; i++) {
 var xCoord;
 var yCoord;
 if (i === 0) {
 xCoord = streamsPattern.coords[i].xCoord;
 yCoord = streamsPattern.coords[i].yCoord;
 joinCmd.push(`[base][temp${i}] overlay=shortest=1:x=${xCoord}:y=${yCoord} [tmp${i + 1}];`);
 // joinCmd.push(`[base][temp${i}] overlay=shortest=1 [tmp${i + 1}];`);
 } else {
 var cmd = `[tmp${i}][temp${i}] overlay=shortest=1`;
 xCoord = streamsPattern.coords[i].xCoord;
 yCoord = streamsPattern.coords[i].yCoord;

 if (xCoord) { cmd += ":x=" + xCoord; }
 if (yCoord) { cmd += ":y=" + yCoord; }

 if (i + 1 !== mp4Filenames.length) { cmd += ` [tmp${i + 1}];`; }
 joinCmd.push(cmd);
 }
 }

 joinCmd.push(`" ${outputPath}`);
 feedback("join command: " + joinCmd);
 return exports.runBashAsync(joinCmd).then(function(result) {

 mp4Filenames.forEach(function(filename) {
 feedback("removing: " + filename);
 exports.runBashSync(`rm ${filename}`);
 });
 });
};




-
FFMPEG hangs when trying to receive rtp/udp stream
22 décembre 2016, par NathanKI am trying to receive a udp stream encoded as h264. The exact command I am using is :
ffmpeg -v 9 -loglevel 99 -re -i "udp://239.192.1.2:1234" outfile.h264
The output I receive is :
ffmpeg version 3.2.2-1 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 6.2.1 (Debian 6.2.1-5) 20161124
configuration: --prefix=/usr --extra-version=1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-libopencv --enable-frei0r --enable-libx264 --enable-chromaprint --enable-shared
libavutil 55. 34.100 / 55. 34.100
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.100 / 57. 56.100
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument '9'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '99'.
Reading option '-re' ... matched as option 're' (read input at native frame rate) with argument '1'.
Reading option '-i' ... matched as input url with argument 'udp://@239.192.1.2:1234'.
Reading option 'outffff.h264' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument 9.
Successfully parsed a group of options.
Parsing a group of options: input url udp://@239.192.1.2:1234.
Applying option re (read input at native frame rate) with argument 1.
Successfully parsed a group of options.
Opening an input file: udp://@239.192.1.2:1234.
[udp @ 0x7f6638a36280] No default whitelist set
[udp @ 0x7f6638a36280] end receive buffer size reported is 131072
[AVIOContext @ 0x7f6638a56840] Statistics: 0 bytes read, 0 seeksThe problem with this is, obviously, that the ffmpeg process isn’t detecting any incoming packets on that address which causes the process to hang.
I am, however, able to receive the stream using vlc, so I know that the packets are arriving. Here is a link to a similar problem.I thought, perhaps, it was a problem with reverse path filtering (as is mentioned in the link), but rp_filter is not set in /etc/sysctl.conf. I’m not quite sure what to do from here, any help is appreciated.
Edit : I removed the @, however this changes nothing.
The vlc command that works is :
vlc --miface eth1 rtp://@239.192.1.2:1234