
Recherche avancée
Médias (3)
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
-
Podcasting Legal guide
16 mai 2011, par
Mis à jour : Mai 2011
Langue : English
Type : Texte
-
Creativecommons informational flyer
16 mai 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (61)
-
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 (7564)
-
FFMPEG Chapter Metadata added to a song file is sometimes off by 1 second
6 février 2021, par ElthfaI attempted to add chapter metadata to a .opus file, but afterward, the file metadata showed timestamps different than the ones I attempted to add.
It seems to be adding an extra second to the timestamps under certain conditions.
I'm not sure if this is a bug, or if maybe I am just using the command wrong.


Here are the commands I performed :


First I removed all existing metadata from the file. I did this using a command I found on stack overflow :


ffmpeg -i test_song.opus -c copy -map_metadata -1 -fflags +bitexact -flags:a +bitexact no_metadata.opus



Then I added the new metadata from an external file I had written :


ffmpeg -i no_metadata.opus -f ffmetadata -i metadata.txt -c copy -map_metadata 1 out.opus



The file 'metadata.txt' looks like :


;FFMETADATA1
[CHAPTER]
TIMEBASE=1/1000
START=0
END=400
title=400 ms
[CHAPTER]
TIMEBASE=1/1000
START=400
END=500
title=100 ms
[CHAPTER]
TIMEBASE=1/1000
START=500
END=2000s
title=1500 ms
[CHAPTER]
TIMEBASE=1/1000
START=2000
END=97000
title=The Rest



When I print out the basic data from the file, not all the timestamps shown match the ones I had in the metadata file.


> ffmpeg -i out.opus
...
Input #0, ogg, from 'out.opus':
 Duration: 00:01:37.00, start: 0.000000, bitrate: 147 kb/s

 Chapter #0:0: start 0.000000, end 0.400000
 Metadata:
 title : 400 ms

 Chapter #0:1: start 0.400000, end 1.500000
 Metadata:
 title : 100 ms
 
 Chapter #0:2: start 1.500000, end 2.000000
 Metadata:
 title : 1500 ms
 
 Chapter #0:3: start 2.000000, end 97.000000
 Metadata:
 title : The Rest
...



You can see the issues for chapters 0:1 and 0:2, which show a start and end time of 1.5 seconds respectively, when it should be 0.5 seconds for each.
I tried several combinations for this, and it seems that if the digit in the hundreds of milliseconds place is between 5 and 9 inclusive, it adds and extra second to the timestamp it saves in the metadata.


Is this due to me using the command wrong ? Or formatting the metadata file wrong ? Or is there an issue in the code with rounding timestamps ?


Thanks !


-
FFMPEG, can't stream rtmp static image with mp3
6 janvier 2021, par novousernxI try to stream on my own rtmp nginx server an single static jpeg image with an mp3 which have about an hour, and from my nginx rtmp to YouTube, but audio is not constant and without image...
This is what I used...


#! /bin/bash
 
VBR="1500k"
FPS="30"
QUAL="ultrafast"
YOUTUBE_URL="rtmp://localhost:1935/live"
YOUTUBE_KEY="test"
VIDEO_SOURCE="image.jpg"
AUDIO_SOURCE="music.mp3"
AUDIO_ENCODER="libmp3lame"
 
ffmpeg \
 -loop 1 \
 -re \
 -framerate $FPS \
 -i "$VIDEO_SOURCE" \
 -thread_queue_size 512 \
 -i "$AUDIO_SOURCE" \
 -c:v libx264 -preset $QUAL -r $FPS -g $(($FPS *2)) -b:v $VBR \
 -c:a $AUDIO_ENCODER -threads "$(nproc)" -ar 44100 -b:a 128k -bufsize 512k -pix_fmt yuv420p \
 -vf scale=1280x720,setsar=1:1 \
 -f flv $YOUTUBE_URL/$YOUTUBE_KEY



Output :


ffmpeg version 4.2.4-1ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg developers
 built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
 configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
 libavutil 56. 31.100 / 56. 31.100
 libavcodec 58. 54.100 / 58. 54.100
 libavformat 58. 29.100 / 58. 29.100
 libavdevice 58. 8.100 / 58. 8.100
 libavfilter 7. 57.100 / 7. 57.100
 libavresample 4. 0. 0 / 4. 0. 0
 libswscale 5. 5.100 / 5. 5.100
 libswresample 3. 5.100 / 3. 5.100
 libpostproc 55. 5.100 / 55. 5.100
Input #0, image2, from 'unsplash.jpg':
 Duration: 00:00:00.03, start: 0.000000, bitrate: 1976946 kb/s
 Stream #0:0: Video: mjpeg (Progressive), yuvj420p(pc, bt470bg/unknown/unknown), 7952x4472 [SAR 72:72 DAR 994:559], 30 tbr, 30 tbn, 30 tbc
Input #1, mp3, from 'ArtOfTrippyCode.mp3':
 Metadata:
 encoder : Lavf58.29.100
 Duration: 01:07:25.34, start: 0.023021, bitrate: 141 kb/s
 Stream #1:0: Audio: mp3, 48000 Hz, stereo, fltp, 141 kb/s
 Metadata:
 encoder : Lavc58.54
Stream mapping:
 Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
 Stream #1:0 -> #0:1 (mp3 (mp3float) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
[swscaler @ 0x564a7bd3ed80] deprecated pixel format used, make sure you did set range correctly
[libx264 @ 0x564a7b3e9680] VBV maxrate unspecified, assuming CBR
[libx264 @ 0x564a7b3e9680] using SAR=1/1
[libx264 @ 0x564a7b3e9680] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x564a7b3e9680] profile Constrained Baseline, level 3.1
[libx264 @ 0x564a7b3e9680] 264 - core 155 r2917 0a84d98 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=2 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=60 keyint_min=6 scenecut=0 intra_refresh=0 rc_lookahead=0 rc=cbr mbtree=0 bitrate=1500 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=1500 vbv_bufsize=512 nal_hrd=none filler=0 ip_ratio=1.40 aq=0
Output #0, flv, to 'rtmp://localhost:1935/live/test':
 Metadata:
 encoder : Lavf58.29.100
 Stream #0:0: Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 1500 kb/s, 30 fps, 1k tbn, 30 tbc
 Metadata:
 encoder : Lavc58.54.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/1500000 buffer size: 512000 vbv_delay: -1
 Stream #0:1: Audio: mp3 (libmp3lame) ([2][0][0][0] / 0x0002), 44100 Hz, stereo, fltp, 128 kb/s
 Metadata:
 encoder : Lavc58.54.100 libmp3lame
[flv @ 0x564a7b3e8340] Failed to update header with correct duration.863.7kbits/s speed=0.0424x
[flv @ 0x564a7b3e8340] Failed to update header with correct filesize.
frame= 15 fps=1.6 q=-1.0 Lsize= 97kB time=00:00:00.47 bitrate=1686.4kbits/s speed=0.0511x
video:88kB audio:8kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.021540%
[libx264 @ 0x564a7b3e9680] frame I:1 Avg QP:34.00 size: 25690
[libx264 @ 0x564a7b3e9680] frame P:14 Avg QP:29.21 size: 4569
[libx264 @ 0x564a7b3e9680] mb I I16..4: 100.0% 0.0% 0.0%
[libx264 @ 0x564a7b3e9680] mb P I16..4: 0.5% 0.0% 0.0% P16..4: 16.0% 0.0% 0.0% 0.0% 0.0% skip:83.5%
[libx264 @ 0x564a7b3e9680] coded y,uvDC,uvAC intra: 51.0% 11.4% 1.2% inter: 8.2% 3.3% 0.1%
[libx264 @ 0x564a7b3e9680] i16 v,h,dc,p: 32% 25% 31% 13%
[libx264 @ 0x564a7b3e9680] i8c dc,h,v,p: 82% 11% 7% 0%
[libx264 @ 0x564a7b3e9680] kb/s:1434.54



-
how to record camera to file while encoding stream to v4l2-loopback device ?
3 février 2021, par JonatasSo i have this logitech c920 camera 1920x1080 h264 capable and i would like to record the camera to file while at the same time copying/encoding the stream to a loopback device so the camera can be still used by other apps.
here is the code i got so far :


ffmpeg -report -f alsa -i hw:CARD=C920,DEV=0 -r 1500 -s 1920x1080 -f v4l2 -vcodec h264 \
-i /dev/video1 -copyinkf -vcodec copy /home/jonatas/Videos/2021-02-01185658.mp4 \ 
-f v4l2 /dev/video0



error :


Unknown V4L2 pixel format equivalent for yuvj420p
Could not write header for output file #1 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 1:0 -- 



some info on /dev/video0(loopbackdevice) :


v4l2-ctl -d /dev/video0

 Device Caps : 0x05208003
 Video Capture
 Video Output
 Video Memory-to-Memory
 Read/Write
 Streaming
 Extended Pix Format
Priority: 0
Video input : 0 (loopback: ok)
Video output: 0 (loopback in)
Format Video Output:
 Width/Height : 1280/720
 Pixel Format : 'YUYV' (YUYV 4:2:2)
 Field : None
 Bytes per Line : 2560
 Size Image : 1843200
 Colorspace : sRGB
 Transfer Function : Default (maps to sRGB)
 YCbCr/HSV Encoding: Default (maps to ITU-R 601)
 Quantization : Default (maps to Limited Range)
 Flags : 
Streaming Parameters Video Capture:
 Frames per second: 30.000 (30/1)
 Read buffers : 8
Streaming Parameters Video Output:
 Frames per second: 30.000 (30/1)
 Write buffers : 8

User Controls

 keep_format 0x0098f900 (bool) : default=0 value=0
 sustain_framerate 0x0098f901 (bool) : default=0 value=0
 timeout 0x0098f902 (int) : min=0 max=100000 step=1 default=0 value=0
 timeout_image_io 0x0098f903 (bool) : default=0 value=0



some info on my camera in /dev/video1


v4l2-ctl -d /dev/video1 --all
Driver Info:
 Driver name : uvcvideo
 Card type : HD Pro Webcam C920
 Bus info : usb-0000:00:14.0-7.2
 Driver version : 5.4.78
 Capabilities : 0x84a00001
 Video Capture
 Metadata Capture
 Streaming
 Extended Pix Format
 Device Capabilities
 Device Caps : 0x04200001
 Video Capture
 Streaming
 Extended Pix Format
Media Driver Info:
 Driver name : uvcvideo
 Model : HD Pro Webcam C920
 Serial : EC6C336F
 Bus info : usb-0000:00:14.0-7.2
 Media version : 5.4.78
 Hardware revision: 0x00000011 (17)
 Driver version : 5.4.78
Interface Info:
 ID : 0x03000002
 Type : V4L Video
Entity Info:
 ID : 0x00000001 (1)
 Name : HD Pro Webcam C920
 Function : V4L2 I/O
 Flags : default
 Pad 0x01000007 : 0: Sink
 Link 0x0200001f: from remote pad 0x100000a of entity 'Processing 3': Data, Enabled, Immutable
Priority: 2
Video input : 0 (Camera 1: ok)
Format Video Capture:
 Width/Height : 1280/720
 Pixel Format : 'H264' (H.264)
 Field : None
 Bytes per Line : 2560
 Size Image : 1843200
 Colorspace : sRGB
 Transfer Function : Default (maps to sRGB)
 YCbCr/HSV Encoding: Default (maps to ITU-R 601)
 Quantization : Default (maps to Full Range)
 Flags : 
Crop Capability Video Capture:
 Bounds : Left 0, Top 0, Width 1280, Height 720
 Default : Left 0, Top 0, Width 1280, Height 720
 Pixel Aspect: 1/1
Selection Video Capture: crop_default, Left 0, Top 0, Width 1280, Height 720, Flags: 
Selection Video Capture: crop_bounds, Left 0, Top 0, Width 1280, Height 720, Flags: 
Streaming Parameters Video Capture:
 Capabilities : timeperframe
 Frames per second: 30.000 (30/1)
 Read buffers : 0
 brightness 0x00980900 (int) : min=0 max=255 step=1 default=128 value=128
 contrast 0x00980901 (int) : min=0 max=255 step=1 default=128 value=128
 saturation 0x00980902 (int) : min=0 max=255 step=1 default=128 value=128
 white_balance_temperature_auto 0x0098090c (bool) : default=1 value=1
 gain 0x00980913 (int) : min=0 max=255 step=1 default=0 value=255
 power_line_frequency 0x00980918 (menu) : min=0 max=2 default=2 value=2
 0: Disabled
 1: 50 Hz
 2: 60 Hz
 white_balance_temperature 0x0098091a (int) : min=2000 max=6500 step=1 default=4000 value=3233 flags=inactive
 sharpness 0x0098091b (int) : min=0 max=255 step=1 default=128 value=128
 backlight_compensation 0x0098091c (int) : min=0 max=1 step=1 default=0 value=0
 exposure_auto 0x009a0901 (menu) : min=0 max=3 default=3 value=3
 1: Manual Mode
 3: Aperture Priority Mode
 exposure_absolute 0x009a0902 (int) : min=3 max=2047 step=1 default=250 value=333 flags=inactive
 exposure_auto_priority 0x009a0903 (bool) : default=0 value=0
 pan_absolute 0x009a0908 (int) : min=-36000 max=36000 step=3600 default=0 value=0
 tilt_absolute 0x009a0909 (int) : min=-36000 max=36000 step=3600 default=0 value=0
 focus_absolute 0x009a090a (int) : min=0 max=250 step=5 default=0 value=0
 focus_auto 0x009a090c (bool) : default=1 value=0
 zoom_absolute 0x009a090d (int) : min=100 max=500 step=1 default=100 value=100



if i remove the 3rd line of my script the camera records the stream of video and sound to the file flawless. i tried diferent things for the 3rd line as -vcodec and something to do with pix-format flag to YUYV without success.
Is it possible to achieve this with just one ffmpeg process ?
Will the sound be made available to the loopback device also ?
How to transcode it to the proper pixel format used by loopback device ?