
Recherche avancée
Médias (3)
-
Elephants Dream - Cover of the soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
Valkaama DVD Label
4 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (60)
-
Gestion générale des documents
13 mai 2011, parMédiaSPIP ne modifie jamais le document original mis en ligne.
Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...) -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (6603)
-
how to add duration to mjpeg or how to make mjpeg faster
10 octobre 2014, par n2v2rda2i have ip-cam mjpeg that i made and it have total 240 frames
encode souce is
ffmpeg.exe -framerate 25 -i c :\%06d.jpg\ -s 1920x1080 -qscale 1 -vcodec mjpeg -r 25 C :\result.mjpg -ynow i want to play result.mjpg by mjpeg player i made
my problem
1. i can't get mjpeg's play time or duration time
2. playing is slower then other movie player so i want to sync it and play more fasterbelow is ffprobe result
Input #0, mjpeg, from 'result.mjpg':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: mjpeg, yuvj444p(pc, bt470bg), 1920x1080, 25 tbr, 1200k tbn, 25 tbcbelow is result added -show_frame
[FRAME]
media_type=video
key_frame=1
pkt_pts=720000
pkt_pts_time=0.600000
pkt_dts=720000
pkt_dts_time=0.600000
best_effort_timestamp=720000
best_effort_timestamp_time=0.600000
pkt_duration=48000
pkt_duration_time=0.040000
pkt_pos=4731406
pkt_size=313289
width=1920
height=1080
pix_fmt=yuvj444p
sample_aspect_ratio=333:320
pict_type=I
coded_picture_number=0
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
[/FRAME]ffprobe show me there are Duration : N/A, bitrate : N/A
how do i set Duration and bitrate
is there any encode-option i have to set ?when i decode mjpeg like below
i can’t get duration just 0
AVFormatContext* pFC;
int ret;
pFC = avformat_alloc_context();
ret = avformat_open_input(&pFC, filename, NULL, NULL);
if (ret < 0) {
// fail .
}
ret = avformat_find_stream_info(pFC, NULL);
if (ret < 0) {
// fail
}
printf("duration %ld", pFC->duration); <----- only 0 -
How can I generate encoded HEVC bitstream using ffmpeg ?
31 octobre 2014, par jgmaoI am able to encoded YUV file to mp4 using HEVC :
ffmpeg.exe -f rawvideo -s 1920x1080 -pix_fmt yuv420p -i input.yuv -c:v hevc -r 30 -x265-params crf=27 -vframes 300 -an -y test.mp4
Here is the mp4box -info test.mp4 shows :
* Movie Info *
Timescale 1000 - Duration 00:00:10.000
1 track(s)
Fragmented File: no
File suitable for progressive download (moov before mdat)
File Brand isom - version 512
Created: UNKNOWN DATE Modified: UNKNOWN DATE File has no MPEG4 IOD/OD
iTunes Info:
Encoder Software: Lavf56.11.100
Track # 1 Info - TrackID 1 - TimeScale 15360 - Media Duration 00:00:10.000 Track has 1 edit lists: track duration is 00:00:10.000 Media Info: Language "Undetermined" - Type "vide:hev1" - 300 samples Visual Track layout: x=0 y=0 width=1920 height=1080 MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x23 HEVC Video - Visual Size 1920 x 1080
HEVC Info: Profile Main @ Level 5 - Chroma Format 1
NAL Unit length bits: 32 - general profile compatibility 0x60000000
Parameter Sets: 1 VPS 1 SPS 1 PPS
SPS resolution 1920x1080
Bit Depth luma 8 - Chroma 8 - 1 temporal layersBut how can I get the decodeble bit stream ? I tried
mp4box -raw 1 test.mp4 -out out.bin
It gives :
Extracting MPEG-H HEVC stream to hevc
But the out.bin couldn’t be decoded by HM or elecard.
Thanks
-
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: [] }