
Recherche avancée
Autres articles (50)
-
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 (...) -
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 (...) -
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)
Sur d’autres sites (6129)
-
Video concatenation with ffmpeg gives incorrect duration
12 mars 2019, par Sergey MellI have a video file and I try to operate with it by means of fluent-ffmpeg. Here is an information which I get about this file with
ffprobe
. You can see that video duration is 6.014s.{ streams:
[ { index: 0,
codec_name: 'h264',
codec_long_name: 'H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10',
profile: 'Constrained Baseline',
codec_type: 'video',
codec_time_base: '1001/60000',
codec_tag_string: 'avc1',
codec_tag: '0x31637661',
width: 376,
height: 668,
coded_width: 376,
coded_height: 668,
has_b_frames: 0,
sample_aspect_ratio: '0:1',
display_aspect_ratio: '0:1',
pix_fmt: 'yuv420p',
level: 30,
color_range: 'N/A',
color_space: 'unknown',
color_transfer: 'unknown',
color_primaries: 'unknown',
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: 178200,
duration: 5.94,
bit_rate: 1161187,
max_bit_rate: 'N/A',
bits_per_raw_sample: 8,
nb_frames: 178,
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/44100',
codec_tag_string: 'mp4a',
codec_tag: '0x6134706d',
sample_fmt: 'fltp',
sample_rate: 44100,
channels: 1,
channel_layout: 'mono',
bits_per_sample: 0,
id: 'N/A',
r_frame_rate: '0/0',
avg_frame_rate: '0/0',
time_base: '1/44100',
start_pts: 0,
start_time: 0,
duration_ts: 264159,
duration: 5.99,
bit_rate: 70594,
max_bit_rate: 70594,
bits_per_raw_sample: 'N/A',
nb_frames: 259,
nb_read_frames: 'N/A',
nb_read_packets: 'N/A',
tags: [Object],
disposition: [Object] } ],
format:
{ filename: '/Users/sergey/Desktop/vid1.mp4',
nb_streams: 2,
nb_programs: 0,
format_name: 'mov,mp4,m4a,3gp,3g2,mj2',
format_long_name: 'QuickTime / MOV',
start_time: 0,
duration: 6.014,
size: 921490,
bit_rate: 1225793,
probe_score: 100,
tags:
{ major_brand: 'isom',
minor_version: '512',
compatible_brands: 'isomiso2avc1mp41',
encoder: 'Lavf57.25.100' } },
chapters: [] }However, if I concatenate two such files into a single one :
ffmpeg -r 30000/1001 -i /Users/sergey/Desktop/vid1.mp4 -r 30000/1001 -i /Users/sergey/Desktop/vid1.mp4 -y -filter_complex concat=n=2:v=1:a=1 -r 30000/1001 -video_track_timescale 30k /var/folders/8z/5zzmwz4d6mnc2bwfb_1h8jbw0000gn/T/1552213381581.mp4
the duration of result is 12.005 instead of 12.028 expected :
{ 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: 376,
height: 668,
coded_width: 376,
coded_height: 668,
has_b_frames: 2,
sample_aspect_ratio: '0:1',
display_aspect_ratio: '0:1',
pix_fmt: 'yuv420p',
level: 30,
color_range: 'N/A',
color_space: 'unknown',
color_transfer: 'unknown',
color_primaries: 'unknown',
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: 358380,
duration: 11.946,
bit_rate: 859761,
max_bit_rate: 'N/A',
bits_per_raw_sample: 8,
nb_frames: 358,
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/44100',
codec_tag_string: 'mp4a',
codec_tag: '0x6134706d',
sample_fmt: 'fltp',
sample_rate: 44100,
channels: 1,
channel_layout: 'mono',
bits_per_sample: 0,
id: 'N/A',
r_frame_rate: '0/0',
avg_frame_rate: '0/0',
time_base: '1/44100',
start_pts: 0,
start_time: 0,
duration_ts: 528362,
duration: 11.980998,
bit_rate: 70319,
max_bit_rate: 70319,
bits_per_raw_sample: 'N/A',
nb_frames: 517,
nb_read_frames: 'N/A',
nb_read_packets: 'N/A',
tags: [Object],
disposition: [Object] } ],
format:
{ filename: '/var/folders/8z/5zzmwz4d6mnc2bwfb_1h8jbw0000gn/T/1552213381581.mp4',
nb_streams: 2,
nb_programs: 0,
format_name: 'mov,mp4,m4a,3gp,3g2,mj2',
format_long_name: 'QuickTime / MOV',
start_time: 0,
duration: 12.005,
size: 1403350,
bit_rate: 935177,
probe_score: 100,
tags:
{ major_brand: 'isom',
minor_version: '512',
compatible_brands: 'isomiso2avc1mp41',
encoder: 'Lavf57.71.100' } },
chapters: [] }I’ve already looked through this question but it seems doesn’t help as long as it is exactly the same file so all stats are the same.
So, main questions are "Why result duration differs from sum of two files ?" and "How to fix it ?".
Could anybody suggest some help ? Thanks in advance.
-
Why does this ffmpeg filter result in an "Invalid Size" error ?
10 avril 2019, par pdoherty926Why do I see this error message :
[Parsed_scale_0 @ 0x559a264c28a0] Invalid size ’if(gt(iw’
[AVFilterGraph @ 0x559a268a19e0] Error initializing filter ’scale’
with args ’if(gt(iw’ Error initializing complex filters.
Invalid argument
when trying to crop a video using ffmpeg and the following complex filter :
ffmpeg -f mp4 -ss 01:24 \
-i https://storage.googleapis.com/bucket/video.mp4 \
-y \
-filter_complex scale='if(gt(iw,ih),-1,616):if(gt(iw,ih),1440,-1)', crop=1440:616 \
-an \
-vcodec libx264 \
-r 60 -pix_fmt yuv420p \
-movflags faststart \
-f mp4 \
-t 1 \
/tmp/asset.1554913197962.mp4In case it’s relevant, here’s the output of ffprobe :
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'https://storage.googleapis.com/bucket/video.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.56.101
Duration: 00:02:53.76, start: 0.000000, bitrate: 2910 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 2777 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)
Metadata:
handler_name : SoundHandler
"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": 1080,
"has_b_frames": 1,
"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",
"refs": 1,
"is_avc": "true",
"nal_length_size": "4",
"r_frame_rate": "30000/1001",
"avg_frame_rate": "30000/1001",
"time_base": "1/90000",
"start_pts": 0,
"start_time": "0.000000",
"duration_ts": 15633630,
"duration": "173.707000",
"bit_rate": "2777254",
"bits_per_raw_sample": "8",
"nb_frames": "5206",
"disposition": {
"default": 1,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 0,
"visual_impaired": 0,
"clean_effects": 0,
"attached_pic": 0,
"timed_thumbnails": 0
},
"tags": {
"language": "und",
"handler_name": "VideoHandler"
}
},
{
"index": 1,
"codec_name": "aac",
"codec_long_name": "AAC (Advanced Audio Coding)",
"profile": "LC",
"codec_type": "audio",
"codec_time_base": "1/44100",
"codec_tag_string": "mp4a",
"codec_tag": "0x6134706d",
"sample_fmt": "fltp",
"sample_rate": "44100",
"channels": 2,
"channel_layout": "stereo",
"bits_per_sample": 0,
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"time_base": "1/44100",
"start_pts": 0,
"start_time": "0.000000",
"duration_ts": 7662596,
"duration": "173.755011",
"bit_rate": "125588",
"max_bit_rate": "125588",
"nb_frames": "7483",
"disposition": {
"default": 1,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 0,
"visual_impaired": 0,
"clean_effects": 0,
"attached_pic": 0,
"timed_thumbnails": 0
},
"tags": {
"language": "eng",
"handler_name": "SoundHandler"
}
}
],
"format": {
"filename": "https://storage.googleapis.com/bucket/video.mp4",
"nb_streams": 2,
"nb_programs": 0,
"format_name": "mov,mp4,m4a,3gp,3g2,mj2",
"format_long_name": "QuickTime / MOV",
"start_time": "0.000000",
"duration": "173.755000",
"size": "63209767",
"bit_rate": "2910294",
"probe_score": 100,
"tags": {
"major_brand": "isom",
"minor_version": "512",
"compatible_brands": "isomiso2avc1mp41",
"encoder": "Lavf57.56.101"
}
}
} -
An error occured 'maybe incorrect parameters such as bit_rate, rate, width or height' when I encode my video
17 mai 2019, par CrystalI always use this source code when I encode my videos. they are almost 1920x1080 videos.
but An error occured when I tried to encode a 7680x3840 video.ffmpeg version 3.2.2 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.4.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
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
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
[avisynth @ 03af8040] Stream #0: not enough frames to estimate rate; consider increasing probesize
Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, avisynth, from 'a.mp4.avs':
Duration: 00:00:01.85, start: 0.000000, bitrate: 2 kb/s
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 7680x3840, 60 fps, 60 tbr, 60 tbn, 60 tbc
Stream #0:1: Audio: pcm_f32le, 48000 Hz, stereo, flt, 3072 kb/s
[libx264 @ 054c5c20] VBV maxrate specified, but no bufsize, ignored
[libx264 @ 054c5c20] frame MB size (480x240) > level limit (8192)
[libx264 @ 054c5c20] DPB size (4 frames, 460800 mbs) > level limit (0 frames, 32768 mbs)
[libx264 @ 054c5c20] MB rate (6912000) > level limit (245760)
[libx264 @ 054c5c20] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
x264 [error]: malloc of size 152432416 failed
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (pcm_f32le (native) -> aac (native))
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or heightthere is a strange message.
’malloc of size 152432416 failed’
I think this is memory problem but I have no idea to solve this problem.This is avs file
PluginPath = "D:\Application\Frame_Doubling_Set_Drag_And_Drop\ffmpeg-Convert-TrueMotion-x86_Newer_Svpflow\_exe\"
LoadPlugin(PluginPath + "ffms2.dll")
LoadPlugin(PluginPath + "svpflow1.dll")
LoadPlugin(PluginPath + "svpflow2.dll")
LoadPlugin(PluginPath + "mvtools2.dll")
Video=FFVideoSource("a.mp4", threads=8)
Audio=FFAudioSource("a.mp4")
Audiodub(Video, Audio)
Import(PluginPath + "InterFrame2.avsi")
InterFrame(GPU=true, Preset="Medium", FrameDouble=true, NewNum=60000, NewDen=1000, Cores=8)and this is batch file
@echo off
CD /D "%~dp1"
cls
set DestPath=%~dp1
set Src0=%~nx1
set Src1=%~n1
set DestExt=.mp4
set Dest0=%DestPath%\%Src1%-Cnv%DestExt%
set Dest1=%DestPath%\%Src1%-Cnv-New%DestExt%
set exe=%~dp0_exe\ffmpeg.exe
set Opt1=-i
set Opt2=-c:v libx264 -b:v 200000k -minrate 10k -maxrate 200000k -profile:v high -level 4.1 -pix_fmt yuv420p
set Opt3=-c:a aac -ab 192k
set Opt4=-f mp4
If Not Exist "%Src0%" (echo. && echo [ %Src0% ] Not Found. && echo. && pause && Goto End)
If Exist "%Dest0%" set Dest0=%Dest1%
"%exe%" %Opt1% "%Src0%" %Opt2% %Opt3% %Opt4% "%Dest0%"
:End
If Not Exist "%Dest0%" (echo. && pause)
rem pause
pauseWhat’s my problem ?