
Recherche avancée
Autres articles (77)
-
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 (...) -
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)
Sur d’autres sites (14636)
-
streaming webcam using ffmpeg and H.264
4 avril 2014, par John QualisI am new to ffmpeg. I am trying to stream my webcam live over the WAN to a ffserver by using ffmpeg and libx264 on a windows 7 64 bit machine.I have described my problem below. Can someone show me how to stream a webcam live using x264 and ffmpeg/ffserver ? Is it possible to do so ?
I am using the following command :
ffmpeg.exe -f dshow -i video="Webcam C170":audio="Microphone (3- Webcam C170)"
-an -vcodec libx264 -b:v 64k -threads 0 -r 25 -maxrate 2048k -bufsize 6000k
http://AA.BB.CC.DD:8090/feed1.ffmI get the followoing errors -
[mpeg1video @ 049ec4e0] too many threads/slices (9), reducing to 8
[libx264 @ 026999e0] broken ffmpeg default settings detected
[libx264 @ 026999e0] use an encoding preset (e.g. -vpre medium)
[libx264 @ 026999e0] preset usage: -vpre <speed> -vpre <profile>
[libx264 @ 026999e0] speed presets are listed in x264 --help
[libx264 @ 026999e0] profile is optional; x264 defaults to high
Metadata:
creation_time : now
Stream #0:0: Video: mpeg1video, yuv420p, 160x128, q=2-31, 64 kb/s, 1000k tbn, 30
tbc
Stream #0:1: Audio: pcm_mulaw, 22050 Hz, mono, s16, 176 kb/s
Stream #0:2: Video: h264, yuv422p, 160x128, q=2-31, 64 kb/s, 1000k tbn, 30 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo -> mpeg1video)
Stream #0:1 -> #0:1 (pcm_s16le -> pcm_mulaw)
Stream #0:0 -> #0:2 (rawvideo -> libx264)
**Error while opening encoder for output stream #0:2 - maybe incorrect parameters such
as bit_rate, rate, width or height**
[dshow @ 0269f640] real-time buffer 101% full! frame dropped!
</profile></speed>Here is my ffserver.conf (relevant parts)
<stream>
# coming from live feed 'feed1'
Feed feed1.ffm
Format mpeg
# Bitrate for the audio stream. Codecs usually support only a few
# different bitrates.
AudioBitRate 32
# Number of audio channels: 1 = mono, 2 = stereo
AudioChannels 1
AudioSampleRate 44100
# Bitrate for the video stream
VideoBitRate 64
VideoBufferSize 40
# Number of frames per second
#VideoFrameRate 8
#VideoFrameRate 40
VideoFrameRate 3
VideoSize 160x128
VideoGopSize 12
No Audio
ACL: .....
</stream>
...............
...............
<stream>
Format rtp
Feed feed1.ffm
VideoCodec libx264
VideoFrameRate 15
VideoBitRate 64
#VideoSize 480x272
# VideoSize 176x144
#AVPresetVideo default
#AVPresetVideo default
#AVPresetVideo baseline
#AVOptionVideo flags +global_header
</stream> -
ffmpeg "Time code of first frame" not making sense [closed]
23 janvier, par Kevin VaskoI can't seem to make sense of where ffmpeg is coming up with the "Time code of first frame" value.


My original file that I am using.


This video has the general timestamps of the original encoding date (aka the start time of the video the way I understanding it) and a duration of 8 min and 52s


$ mediainfo GL0100002_output.mp4 
General
Complete name : GL0100002_output.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom (isom/iso2/avc1/mp41)
File size : 93.7 MiB
Duration : 8 min 52 s
Overall bit rate : 1 476 kb/s
Encoded date : UTC 2022-02-23 15:18:42
Tagged date : UTC 2022-02-23 15:18:42
Writing application : Lavf58.29.100

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L3
Format settings : CABAC / 4 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference frames : 4 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 8 min 52 s
Bit rate : 1 342 kb/s
Width : 848 pixels
Height : 480 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.138
Stream size : 85.2 MiB (91%)
Title : GoPro AVC 
Writing library : x264 core 155 r2917 0a84d98
Encoding settings : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Language : English
Encoded date : UTC 2022-02-23 15:18:42
Tagged date : UTC 2022-02-23 15:18:42
Color range : Full
Codec configuration box : avcC

Audio
ID : 2
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : mp4a-40-2
Duration : 8 min 52 s
Bit rate mode : Constant
Bit rate : 129 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 8.16 MiB (9%)
Title : GoPro AAC 
Language : English
Default : Yes
Alternate group : 1
Encoded date : UTC 2022-02-23 15:18:42
Tagged date : UTC 2022-02-23 15:18:42

Other
ID : 3
Type : Time code
Format : QuickTime TC
Duration : 8 min 52 s
Frame rate : 23.976 (24000/1001) FPS
Time code of first frame : 15:57:41:15
Time code, striped : Yes
Title : GoPro AVC 
Language : English
Default : No
Encoded date : UTC 2022-02-23 15:18:42
Tagged date : UTC 2022-02-23 15:18:42



Now if I run


ffmpeg -y -nostdin -v error -ss 00:00:00.042 -i GL0100002_output.mp4 -t 00:00:25.192 -map 0 -map -0:d -c:v libx264 -preset fast -crf 21 -c:a aac -sn GL0100002_test.DSME_0001.mp4


I get the following mediainfo


$ mediainfo GL0100002_test.DSME_0001.mp4 
General
Complete name : GL0100002_test.DSME_0001.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom (isom/iso2/avc1/mp41)
File size : 4.54 MiB
Duration : 25 s 234 ms
Overall bit rate : 1 510 kb/s
Writing application : Lavf58.29.100

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L3
Format settings : CABAC / 4 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference frames : 4 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 25 s 234 ms
Bit rate : 1 376 kb/s
Width : 848 pixels
Height : 480 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.141
Stream size : 4.14 MiB (91%)
Title : GoPro AVC 
Writing library : x264 core 155 r2917 0a84d98
Encoding settings : cabac=1 / ref=2 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=6 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=1 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=30 / rc=crf / mbtree=1 / crf=21.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Language : English
Color range : Full
Codec configuration box : avcC

Audio
ID : 2
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : mp4a-40-2
Duration : 25 s 214 ms
Duration_LastFrame : -3 ms
Bit rate mode : Constant
Bit rate : 129 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 398 KiB (9%)
Title : GoPro AAC 
Language : English
Default : Yes
Alternate group : 1

Other
ID : 3
Type : Time code
Format : QuickTime TC
Duration : 25 s 234 ms
Frame rate : 23.976 (24000/1001) FPS
Time code of first frame : 15:57:41:15
Time code, striped : Yes
Title : GoPro AVC 
Language : English
Default : No



But what I don't understand is where
Time code of first frame
is coming from. I would expect it would be00:00:00.042
or evenUTC 2022-02-23 15:18:42
+ .042 but appear to be.

Time code of first frame : 15:57:41:15



Is this potentially clobbering together something to get this time that isn't obvious ?


-
How to preserve colours when colour metadata is "unknown"
5 avril 2024, par Hashim AzizI often need to scale up many files with
unknown
color metadata (probably because FFmpeg itself was dropping that metadata until very recently) :

$ ffprobe -v error -show_streams "input.mp4" | grep color

color_range=tv
color_space=unknown
color_transfer=unknown
color_primaries=unknown



No matter what I do to try and preserve the colours in these files, nothing works to prevent the colours from shifting, usually coming out darker than the input.


I've already tried :


- 

-
Setting all four color metadata options (
-colorspace
,-color_trc
,-color_primaries
,-color_range
) to all of their possible values for PAL, NTSC and HD inputs (bt470bg
,smpte170m
andbt709
respectively)

-
Automatically converting the colorspace as part of the scale by adding
in_color_matrix=auto:out_color_matrix=<colorspace></colorspace>
, where is eitherbt470
,smpte170m
orbt709


-
Explicitly converting the colorspace as part of the scale by adding
in_color_matrix=<colorspace>:out_color_matrix=bt709</colorspace>
, where is eitherbt470
,smpte170m
orbt709










After all of this, I'm still left none the wiser as to how the hell colour works in FFmpeg and what I'm meant to be doing just to get my colour to look as it does in the original input.


Here is the (simplified) FFmpeg command that I'm running as part of a larger script, most of which is probably irrelevant to the issue but which I've included in case it isn't :


ffmpeg -y -hide_banner \
-i "input.webm" -i "outro.mp4" -loop 1 -i "watermark.png" \
-movflags +faststart+write_colr \ 
-filter_complex \
"color=black:16x16:d=780[base];
[0:v]scale=1922:'max(1080,ih)':flags=lanczos:in_color_matrix=auto:out_color_matrix=bt709[v0];
[1:v]scale=1922:'max(1080,ih)':flags=lanczos,fade=in:st=0:d=2:alpha=1[v1];
[2:v]lut=a=val*0.7,fade=in:st=15:d=3:alpha=1,fade=out:st=775:d=3:alpha=1[v2];
[base][v0]scale2ref[base][v0];
[base][v0]overlay[tmp];
[tmp][v1]overlay,setsar=1[tmp2];
[v2][tmp2]scale2ref=w=oh*mdar:h=ih*0.07[watermark_scaled][video]
[video][watermark_scaled]overlay=80:50:shortest=1:format=rgb[outv];
[0:a]afade=out:st=778:d=2[0a];
[0a][1:a]concat=n=2:v=0:a=1[outa]" \
-map "[outv]" -map "[outa]" -c:v libx264 -crf 15 -c:a libopus \
-pix_fmt yuv420p -colorspace bt709 -color_trc bt709 -color_primaries bt709 -color_range tv "output.mp4" 



-