
Recherche avancée
Médias (1)
-
SWFUpload Process
6 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
Autres articles (76)
-
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 (...) -
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)
Sur d’autres sites (10785)
-
Not all portions of video play well after concatenation
24 septembre 2018, par srgbndNode.JS 8.11.4, fluent-ffmpeg 2.1.2
I need to concatenate random portions of the same length of different videos in one video file. The concatenation proceeds without errors. But when I play the final concatenated file I see some portions playing well with sound, others have video "frozen" but sounds playing.
What’s the problem ? I want all portions playing well in the final concatenated file.
Concatenation config :
trex@cave:/media/trex/safe1/Development/app$ head concat_config.txt
file /media/trex/safe1/Development/app/videos/test/417912400.mp4
inpoint 145
outpoint 155
file /media/trex/safe1/Development/app/videos/test/440386842.mp4
inpoint 59
outpoint 69
file /media/trex/safe1/Development/app/videos/test/417912400.mp4
inpoint 144
outpoint 154
...In total, I have 16 portions of 2 videos. Duration of a portion is 10 sec. In the future the number of video files and portions will be much bigger.
trex@cave:/media/trex/safe1/Development/app$ ls -lh videos/test/
total 344M
-rw-r--r-- 1 trex trex 90M set 23 12:19 417912400.mp4
-rw-r--r-- 1 trex trex 254M set 23 12:19 440386842.mp4JavaScript code for the concatentaion :
const fs = require('fs');
const path = require('path');
const _ = require('lodash');
const ffmpegPath = require('@ffmpeg-installer/ffmpeg').path;
const ffprobePath = require('@ffprobe-installer/ffprobe').path;
const ffmpeg = require('fluent-ffmpeg');
ffmpeg.setFfmpegPath(ffmpegPath);
ffmpeg.setFfprobePath(ffprobePath);
function getMetadata(absPathToFile) {
return new Promise(function (resolve, reject) {
ffmpeg.ffprobe(absPathToFile, function(err, metadata) {
if (err) {
reject('get video meta: ' + err.toString());
}
resolve(metadata);
});
});
}
async function getFormat(files) {
const pArray = files.map(async f => {
const meta = await getMetadata(f);
meta.format.short_filename = meta.format.filename.split('/').pop();
return meta.format;
});
return await Promise.all(pArray);
}
function getSliceValues(duration, max = 10) {
max = duration < max ? duration * 0.5 : max; // sec
const start = _.random(0, duration * 0.9);
const end = start + max > duration ? duration : start + max;
return `inpoint ${Math.floor(start)}\noutpoint ${Math.floor(end)}\n`;
}
function addPath(arr, aPath) {
return arr.map(e => path.join(aPath, e));
}
function createConfig(meta) {
return meta.map(video => `file ${video.filename}\n${getSliceValues(video.duration)}`).join('');
}
function duplicateMeta(meta) {
for (let i = 0; i < 3; i++) {
meta.push(...meta);
}
return _.shuffle(meta);
}
const videoFolder = path.join(__dirname, 'videos/test');
const finalVideo = 'final_video.mp4';
const configFile = 'concat_config.txt';
// main
(async () => {
let videos = addPath(fs.readdirSync(videoFolder), videoFolder);
let meta = await getFormat(videos);
meta = duplicateMeta(meta); // get multiple portions of videos
fs.writeFileSync(configFile, createConfig(meta));
const mpeg = ffmpeg();
mpeg.input(configFile)
.inputOptions(['-f concat', '-safe 0'])
.outputOptions('-c copy')
.save(finalVideo);
})();Video files formats :
{ streams:
[ { index: 0,
codec_name: 'h264',
codec_long_name: 'H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10',
profile: 'High',
codec_type: 'video',
codec_time_base: '1001/60000',
codec_tag_string: 'avc1',
codec_tag: '0x31637661',
width: 1920,
height: 1080,
coded_width: 1920,
coded_height: 1088,
has_b_frames: 2,
sample_aspect_ratio: '1:1',
display_aspect_ratio: '16:9',
pix_fmt: 'yuv420p',
level: 40,
color_range: 'tv',
color_space: 'bt709',
color_transfer: 'bt709',
color_primaries: 'bt709',
chroma_location: 'left',
field_order: 'unknown',
timecode: 'N/A',
refs: 1,
is_avc: 'true',
nal_length_size: 4,
id: 'N/A',
r_frame_rate: '30000/1001',
avg_frame_rate: '30000/1001',
time_base: '1/30000',
start_pts: 0,
start_time: 0,
duration_ts: 4936900,
duration: 164.563333,
bit_rate: 4323409,
max_bit_rate: 'N/A',
bits_per_raw_sample: 8,
nb_frames: 4932,
nb_read_frames: 'N/A',
nb_read_packets: 'N/A',
tags: [Object],
disposition: [Object] },
{ index: 1,
codec_name: 'aac',
codec_long_name: 'AAC (Advanced Audio Coding)',
profile: 'LC',
codec_type: 'audio',
codec_time_base: '1/48000',
codec_tag_string: 'mp4a',
codec_tag: '0x6134706d',
sample_fmt: 'fltp',
sample_rate: 48000,
channels: 2,
channel_layout: 'stereo',
bits_per_sample: 0,
id: 'N/A',
r_frame_rate: '0/0',
avg_frame_rate: '0/0',
time_base: '1/48000',
start_pts: 0,
start_time: 0,
duration_ts: 7899120,
duration: 164.565,
bit_rate: 256000,
max_bit_rate: 263232,
bits_per_raw_sample: 'N/A',
nb_frames: 7714,
nb_read_frames: 'N/A',
nb_read_packets: 'N/A',
tags: [Object],
disposition: [Object] } ],
format:
{ filename: '/media/trex/safe1/Development/app/videos/test/417912400.mp4',
nb_streams: 2,
nb_programs: 0,
format_name: 'mov,mp4,m4a,3gp,3g2,mj2',
format_long_name: 'QuickTime / MOV',
start_time: 0,
duration: 164.565,
size: 94298844,
bit_rate: 4584150,
probe_score: 100,
tags:
{ major_brand: 'mp42',
minor_version: '0',
compatible_brands: 'mp42mp41isomavc1',
creation_time: '2015-09-21T19:11:21.000000Z' } },
chapters: [] }
{ streams:
[ { index: 0,
codec_name: 'h264',
codec_long_name: 'H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10',
profile: 'High',
codec_type: 'video',
codec_time_base: '1001/48000',
codec_tag_string: 'avc1',
codec_tag: '0x31637661',
width: 2560,
height: 1440,
coded_width: 2560,
coded_height: 1440,
has_b_frames: 2,
sample_aspect_ratio: '1:1',
display_aspect_ratio: '16:9',
pix_fmt: 'yuv420p',
level: 51,
color_range: 'tv',
color_space: 'bt709',
color_transfer: 'bt709',
color_primaries: 'bt709',
chroma_location: 'left',
field_order: 'unknown',
timecode: 'N/A',
refs: 1,
is_avc: 'true',
nal_length_size: 4,
id: 'N/A',
r_frame_rate: '24000/1001',
avg_frame_rate: '24000/1001',
time_base: '1/24000',
start_pts: 0,
start_time: 0,
duration_ts: 4206200,
duration: 175.258333,
bit_rate: 11891834,
max_bit_rate: 'N/A',
bits_per_raw_sample: 8,
nb_frames: 4202,
nb_read_frames: 'N/A',
nb_read_packets: 'N/A',
tags: [Object],
disposition: [Object] },
{ index: 1,
codec_name: 'aac',
codec_long_name: 'AAC (Advanced Audio Coding)',
profile: 'LC',
codec_type: 'audio',
codec_time_base: '1/48000',
codec_tag_string: 'mp4a',
codec_tag: '0x6134706d',
sample_fmt: 'fltp',
sample_rate: 48000,
channels: 2,
channel_layout: 'stereo',
bits_per_sample: 0,
id: 'N/A',
r_frame_rate: '0/0',
avg_frame_rate: '0/0',
time_base: '1/48000',
start_pts: 0,
start_time: 0,
duration_ts: 8414160,
duration: 175.295,
bit_rate: 256000,
max_bit_rate: 262152,
bits_per_raw_sample: 'N/A',
nb_frames: 8217,
nb_read_frames: 'N/A',
nb_read_packets: 'N/A',
tags: [Object],
disposition: [Object] } ],
format:
{ filename: '/media/trex/safe1/Development/app/videos/test/440386842.mp4',
nb_streams: 2,
nb_programs: 0,
format_name: 'mov,mp4,m4a,3gp,3g2,mj2',
format_long_name: 'QuickTime / MOV',
start_time: 0,
duration: 175.295,
size: 266214940,
bit_rate: 12149345,
probe_score: 100,
tags:
{ major_brand: 'mp42',
minor_version: '0',
compatible_brands: 'mp42mp41isomavc1',
creation_time: '2015-11-15T19:30:49.000000Z' } },
chapters: [] } -
Change the framerate of a video including audio without re-encoding using ffmpeg
12 août 2018, par Trojaner_I have a 30.02 FPS .mp4-video and I’m trying to convert it to 30 FPS. I found this question but if I try the method like described in the first answer the audio gets lost because the video is getting converted in a .h264-file which can’t contain audio as I read here.
(I’m sorry if i’ve got issues with the english language, it isn’t my mother language)
EDIT : Here goes the content I enter in the terminal and the output that returns
Input :
ffmpeg -y -i 01.mp4 -f h264 -c copy temp1.h264
Output : (I replaced the real paths with
path\to\...
)ffmpeg version N-91589-ge0539f0349 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 8.2.1 (GCC) 20180808
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
libavutil 56. 18.102 / 56. 18.102
libavcodec 58. 22.101 / 58. 22.101
libavformat 58. 17.101 / 58. 17.101
libavdevice 58. 4.101 / 58. 4.101
libavfilter 7. 26.100 / 7. 26.100
libswscale 5. 2.100 / 5. 2.100
libswresample 3. 2.100 / 3. 2.100
libpostproc 55. 2.100 / 55. 2.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'path\to\01.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.17.101
Duration: 00:02:42.01, start: 0.000000, bitrate: 5168 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 5000 kb/s, 30.02 fps, 30 tbr, 16k tbn, 60 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 159 kb/s (default)
Metadata:
handler_name : SoundHandler
Output #0, h264, to 'path\to\temp1.h264':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.17.101
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, q=2-31, 5000 kb/s, 30.02 fps, 30 tbr, 30 tbn, 30 tbc (default)
Metadata:
handler_name : VideoHandler
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
frame= 4862 fps=0.0 q=-1.0 Lsize= 98859kB time=00:02:42.00 bitrate=4999.1kbits/s speed= 351x
video:98860kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknownInput :
ffmpeg -y -r 30 -i "temp1.h264" -c copy "temp1.mp4"
Output : (I replaced the real paths with
path\to\...
)ffmpeg version N-91589-ge0539f0349 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 8.2.1 (GCC) 20180808
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
libavutil 56. 18.102 / 56. 18.102
libavcodec 58. 22.101 / 58. 22.101
libavformat 58. 17.101 / 58. 17.101
libavdevice 58. 4.101 / 58. 4.101
libavfilter 7. 26.100 / 7. 26.100
libswscale 5. 2.100 / 5. 2.100
libswresample 3. 2.100 / 3. 2.100
libpostproc 55. 2.100 / 55. 2.100
Input #0, h264, from 'path\to\temp1.h264':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: h264 (High), yuv420p(progressive), 1280x720, 30 fps, 30 tbr, 1200k tbn, 60 tbc
Output #0, mp4, to 'path\to\temp1.mp4':
Metadata:
encoder : Lavf58.17.101
Stream #0:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1280x720, q=2-31, 30 fps, 30 tbr, 15360 tbn, 30 tbc
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[mp4 @ 0000018e11422ec0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[mp4 @ 0000018e11422ec0] pts has no value
Last message repeated 156 times
[mp4 @ 0000018e11422ec0] pts has no valueB time=00:00:05.13 bitrate=5719.5kbits/s speed=10.2x
Last message repeated 153 times
[mp4 @ 0000018e11422ec0] pts has no valueB time=00:00:10.26 bitrate=4902.4kbits/s speed=10.2x
Last message repeated 150 times
[mp4 @ 0000018e11422ec0] pts has no valueB time=00:00:15.30 bitrate=4934.5kbits/s speed=10.2x
Last message repeated 137 times
[mp4 @ 0000018e11422ec0] pts has no valueB time=00:00:19.90 bitrate=4953.1kbits/s speed=9.91x
Last message repeated 152 times
[mp4 @ 0000018e11422ec0] pts has no valueB time=00:00:25.00 bitrate=4949.3kbits/s speed=9.97x
Last message repeated 152 times
[mp4 @ 0000018e11422ec0] pts has no valueB time=00:00:30.10 bitrate=4946.8kbits/s speed= 10x
Last message repeated 152 times
[mp4 @ 0000018e11422ec0] pts has no valueB time=00:00:35.20 bitrate=4945.0kbits/s speed= 10x
Last message repeated 146 times
[mp4 @ 0000018e11422ec0] pts has no valueB time=00:00:40.10 bitrate=4968.3kbits/s speed=9.99x
Last message repeated 153 times
[mp4 @ 0000018e11422ec0] pts has no valueB time=00:00:45.23 bitrate=4960.8kbits/s speed= 10x
Last message repeated 147 times
[mp4 @ 0000018e11422ec0] pts has no valueB time=00:00:50.16 bitrate=5016.4kbits/s speed= 10x
Last message repeated 152 times
[mp4 @ 0000018e11422ec0] pts has no valueB time=00:00:55.26 bitrate=4970.9kbits/s speed= 10x
Last message repeated 151 times
[mp4 @ 0000018e11422ec0] pts has no valueB time=00:01:00.33 bitrate=4970.6kbits/s speed= 10x
Last message repeated 153 times
[mp4 @ 0000018e11422ec0] pts has no valueB time=00:01:05.46 bitrate=4997.3kbits/s speed= 10x
Last message repeated 149 times
[mp4 @ 0000018e11422ec0] pts has no valueB time=00:01:10.46 bitrate=5029.6kbits/s speed= 10x
Last message repeated 153 times
[mp4 @ 0000018e11422ec0] pts has no valueB time=00:01:15.60 bitrate=5021.0kbits/s speed= 10x
Last message repeated 151 times
[mp4 @ 0000018e11422ec0] pts has no valueB time=00:01:20.66 bitrate=5017.6kbits/s speed= 10x
Last message repeated 154 times
[mp4 @ 0000018e11422ec0] pts has no valueB time=00:01:25.83 bitrate=4984.3kbits/s speed=10.1x
Last message repeated 151 times
[mp4 @ 0000018e11422ec0] pts has no valueB time=00:01:30.90 bitrate=4983.3kbits/s speed=10.1x
Last message repeated 149 times
[mp4 @ 0000018e11422ec0] pts has no valueB time=00:01:35.90 bitrate=4985.9kbits/s speed=10.1x
Last message repeated 149 times
[mp4 @ 0000018e11422ec0] pts has no valueB time=00:01:40.90 bitrate=4988.3kbits/s speed= 10x
Last message repeated 151 times
[mp4 @ 0000018e11422ec0] pts has no valueB time=00:01:45.96 bitrate=5007.0kbits/s speed=10.1x
Last message repeated 150 times
[mp4 @ 0000018e11422ec0] pts has no valueB time=00:01:51.00 bitrate=5006.7kbits/s speed=10.1x
Last message repeated 150 times
[mp4 @ 0000018e11422ec0] pts has no valueB time=00:01:56.03 bitrate=5006.4kbits/s speed=10.1x
Last message repeated 147 times
[mp4 @ 0000018e11422ec0] pts has no valueB time=00:02:00.96 bitrate=4992.9kbits/s speed= 10x
Last message repeated 151 times
[mp4 @ 0000018e11422ec0] pts has no valueB time=00:02:06.03 bitrate=4991.9kbits/s speed= 10x
Last message repeated 149 times
[mp4 @ 0000018e11422ec0] pts has no valueB time=00:02:11.03 bitrate=4993.5kbits/s speed= 10x
Last message repeated 151 times
[mp4 @ 0000018e11422ec0] pts has no valueB time=00:02:16.10 bitrate=4992.5kbits/s speed= 10x
Last message repeated 153 times
[mp4 @ 0000018e11422ec0] pts has no valueB time=00:02:21.23 bitrate=4989.2kbits/s speed=10.1x
Last message repeated 152 times
[mp4 @ 0000018e11422ec0] pts has no valueB time=00:02:26.33 bitrate=4987.3kbits/s speed=10.1x
Last message repeated 149 times
[mp4 @ 0000018e11422ec0] pts has no valueB time=00:02:31.33 bitrate=5016.5kbits/s speed= 10x
Last message repeated 153 times
[mp4 @ 0000018e11422ec0] pts has no valueB time=00:02:36.46 bitrate=5026.2kbits/s speed=10.1x
Last message repeated 148 times
[mp4 @ 0000018e11422ec0] pts has no valueB time=00:02:41.43 bitrate=4988.5kbits/s speed= 10x
Last message repeated 15 times
frame= 4862 fps=301 q=-1.0 Lsize= 98882kB time=00:02:41.96 bitrate=5001.3kbits/s speed= 10x
video:98859kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.023950% -
dxva2 : Directly use AVFrames
31 mars 2014, par Michael Niedermayerdxva2 : Directly use AVFrames
The assumption of (MPEG) Picture and H264Picture layout matching might
not hold true in the future.Signed-off-by : Hendrik Leppkes <h.leppkes@gmail.com>