
Recherche avancée
Autres articles (5)
-
L’espace de configuration de MediaSPIP
29 novembre 2010, parL’espace de configuration de MediaSPIP est réservé aux administrateurs. Un lien de menu "administrer" est généralement affiché en haut de la page [1].
Il permet de configurer finement votre site.
La navigation de cet espace de configuration est divisé en trois parties : la configuration générale du site qui permet notamment de modifier : les informations principales concernant le site (...) -
Déploiements possibles
31 janvier 2010, parDeux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
Version mono serveur
La version mono serveur consiste à n’utiliser qu’une (...) -
Sélection de projets utilisant MediaSPIP
29 avril 2011, parLes exemples cités ci-dessous sont des éléments représentatifs d’usages spécifiques de MediaSPIP pour certains projets.
Vous pensez avoir un site "remarquable" réalisé avec MediaSPIP ? Faites le nous savoir ici.
Ferme MediaSPIP @ Infini
L’Association Infini développe des activités d’accueil, de point d’accès internet, de formation, de conduite de projets innovants dans le domaine des Technologies de l’Information et de la Communication, et l’hébergement de sites. Elle joue en la matière un rôle unique (...)
Sur d’autres sites (5077)
-
Generate mp4 from m3u8 with EXT-X-START (FFMPEG)
26 février 2019, par KPS1994I’m trying to generate a MP4 from a m3u8 playlist file using FFMPEG. The format of the file is as follows :
#EXTM3U
#EXT-X-VERSION:7
#EXT-X-TARGETDURATION:607.0
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-MAP:URI=/path_to_mp4/2019-02-25_09-55-07.mp4
#EXT-X-START:TIME-OFFSET=100
#EXTINF:600.0,
/path_to_m4s/2019-02-25_11-35-18.m4s
#EXTINF:597.64,
/path_to_m4s/2019-02-25_11-45-18.m4s
#EXTINF:600.0,
/path_to_m4s/2019-02-25_11-55-18.m4s
#EXT-X-ENDLISTIn the example above, each m4s chunk is 10 minutes long, but FFMPEG completely ignores the
#EXT-X-START:TIME-OFFSET
flag. Hence generating a video that is 30 minutes long as opposed to 29 minutes and 20 seconds.Any help on how to directly convert the m3u8 file would be most appreciated. (if there is a better tool than FFMEPG, then I am willing to try.)
-
Taking care of silent priming frames converting mp4 to ts ?
13 février 2019, par keepitterronvideoOutputSettings = [
AVVideoCodecKey: AVVideoCodecH264,
AVVideoWidthKey: width,
AVVideoHeightKey: height,
AVVideoCompressionPropertiesKey: [
AVVideoAverageBitRateKey: avgBitRate,
AVVideoExpectedSourceFrameRateKey: fps,
AVVideoProfileLevelKey: AVVideoProfileLevelH264BaselineAutoLevel
]
]
audioOutputSettings = [
AVFormatIDKey: kAudioFormatMPEG4AAC,
AVSampleRateKey: 44100,
AVNumberOfChannelsKey: 2
]I record a video + audio with AVCaptureSession (screen, camera and mic in OSX) and i encode it with AVAssetWriter (AVFileType.mp4), swapping the writers every 6 seconds.
Every time a new part is written, a nodeJS app will be notified and using ffmpeg will convert it to ts withffmpeg -y -i generatedFile.mp4 -c copy -copyts -muxdelay 0 -muxpreload 0 outputFile.ts
I’ll manually write a m3u8 looking like :
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:7
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-PLAYLIST-TYPE:VOD
#EXTINF:6.140227,
11214532343c4cae953d45e94a1660ea-0.ts
#EXTINF:6.284218,
11214532343c4cae953d45e94a1660ea-1.ts
#EXTINF:6.099999999999998,
11214532343c4cae953d45e94a1660ea-2.ts
#EXTINF:6.133333,
11214532343c4cae953d45e94a1660ea-3.ts
#EXTINF:6.133333,
11214532343c4cae953d45e94a1660ea-4.ts
#EXTINF:6.100000000000001,
11214532343c4cae953d45e94a1660ea-5.ts
#EXTINF:6.133333,
11214532343c4cae953d45e94a1660ea-6.ts
#EXTINF:6.199999999999996,
11214532343c4cae953d45e94a1660ea-7.ts
#EXTINF:6.0666670000000025,
11214532343c4cae953d45e94a1660ea-8.ts
#EXT-X-ENDLISTThe issue is : I have audio gaps between parts and I believe is AAC’s priming frames not being handled correctly.
Am I correct in assuming so ?example file
❯ afinfo 11.mp4
File: 11.mp4
File type ID: mp4f
Num Tracks: 1
----
Data format: 2 ch, 44100 Hz, 'aac ' (0x00000000) 0 bits/channel, 0 bytes/packet, 1024 frames/packet, 0 bytes/frame
no channel layout.
estimated duration: 6.128617 sec
audio bytes: 87558
audio packets: 266
bit rate: 113407 bits per second
packet size upper bound: 401
maximum packet size: 401
audio data file offset: 577163
optimized
audio 270272 valid frames + 2112 priming + 0 remainder = 272384
format list:
[ 0] format: 2 ch, 44100 Hz, 'aac ' (0x00000000) 0 bits/channel, 0 bytes/packet, 1024 frames/packet, 0 bytes/frame
Channel layout: Stereo (L R)
----example file
❯ ffprobe -v error -show_format -show_streams 1.mp4
[STREAM]
index=0
codec_name=h264
codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
profile=Baseline
codec_type=video
codec_time_base=1/60
codec_tag_string=avc1
codec_tag=0x31637661
width=1920
height=1080
coded_width=1920
coded_height=1088
has_b_frames=0
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=bottom
field_order=unknown
timecode=N/A
refs=1
is_avc=true
nal_length_size=4
id=N/A
r_frame_rate=30/1
avg_frame_rate=30/1
time_base=1/600
start_pts=3600
start_time=6.000000
duration_ts=7260
duration=12.100000
bit_rate=4227137
max_bit_rate=N/A
bits_per_raw_sample=8
nb_frames=183
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=1
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
TAG:creation_time=2019-02-13T13:21:51.000000Z
TAG:language=und
TAG:handler_name=Core Media Video
[/STREAM]
[STREAM]
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
id=N/A
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/44100
start_pts=272991
start_time=6.190272
duration_ts=545352
duration=12.366259
bit_rate=115688
max_bit_rate=128000
bits_per_raw_sample=N/A
nb_frames=269
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=1
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
TAG:creation_time=2019-02-13T13:21:51.000000Z
TAG:language=und
TAG:handler_name=Core Media Audio
[/STREAM]
[FORMAT]
filename=1.mp4
nb_streams=2
nb_programs=0
format_name=mov,mp4,m4a,3gp,3g2,mj2
format_long_name=QuickTime / MOV
start_time=6.000000
duration=12.366259
size=3317034
bit_rate=2145860
probe_score=100
TAG:major_brand=mp42
TAG:minor_version=1
TAG:compatible_brands=mp41mp42isom
TAG:creation_time=2019-02-13T13:21:51.000000Z
[/FORMAT]Is there a way I can generate ts files with the encoder delay being taken care of ?
-
ffmpeg nvdec not available when adding subtitles to mp4
17 février 2019, par whatdoineed2doI have a mp4 video that I want to BURN-IN subtitles (from a .ass file and via
-vf ass=/tmp/conf-notes.ass
) with ffmpeg on a machine with a GTX1060 card however ffmpeg reports that it fails to create the NVDEC decoder.[h264 @ 0xcb9380] Error creating a NVDEC decoder: 1
[h264 @ 0xcb9380] Failed setup for format cuda: hwaccel initialisation returned error.The output file is generated ok but during the creation the CPU is used heavily (I assume for decode) - if I drop the
-vf ass=/tmp/conf-notes.ass
and perform an mp4->mp4 reencode there are no problems.I want to know what I am missing from my command to allow the GPU to perform the decode when an
.ass
file is added to the chain.$ ffmpeg -hwaccel cuvid -i 2019-01-conferance.mp4 -vf ass=/tmp/conf-notes.ass -c:a copy -preset llhq -rc vbr_hq -vb 2M -minrate 500k -maxrate 12M -c:v h264_nvenc export.mp4
ffmpeg version 4.0.2 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 8 (GCC)
configuration: --arch=x86_64 --bindir=/usr/bin --datadir=/usr/share/ffmpeg --disable-debug --disable-static --disable-stripping --enable-alsa --enable-avfilter --enable-avresample --enable-bzlib --enable-decklink --enable-doc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gpl --enable-iconv --enable-libass --enable-libbluray --enable-libcdio --enable-libdc1394 --enable-libdrm --enable-libfdk-aac --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libilbc --enable-libkvazaar --enable-libmfx --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librsvg --enable-librtmp --enable-librubberband --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtesseract --enable-libtheora --enable-libtwolame --enable-libv4l2 --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxcb-shm --enable-libxcb-xfixes --enable-libxcb-shape --enable-libxml2 --enable-libxvid --enable-libzvbi --enable-lv2 --enable-lzma --enable-libndi_newtek --enable-nonfree --enable-openal --enable-opencl --enable-opengl --enable-postproc --enable-pthreads --enable-sdl2 --enable-shared --enable-version3 --enable-xlib --enable-zlib --extra-cflags=-I/usr/include/cuda --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --optflags='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' --prefix=/usr --shlibdir=/usr/lib64 --enable-cuda --enable-cuvid --enable-libnpp --enable-nvdec --enable-nvenc --enable-runtime-cpudetect
libavutil 56. 14.100 / 56. 14.100
libavcodec 58. 18.100 / 58. 18.100
libavformat 58. 12.100 / 58. 12.100
libavdevice 58. 3.100 / 58. 3.100
libavfilter 7. 16.100 / 7. 16.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 1.100 / 5. 1.100
libswresample 3. 1.100 / 3. 1.100
libpostproc 55. 1.100 / 55. 1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '2019-01-conferance.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2019-01-12T00:00:06.000000Z
Duration: 00:00:24.07, start: 0.000000, bitrate: 11542 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 11350 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default)
Metadata:
creation_time : 2019-01-12T00:00:07.000000Z
handler_name : Mainconcept MP4 Video Media Handler
encoder : AVC Coding
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 189 kb/s (default)
Metadata:
creation_time : 2019-01-12T00:00:07.000000Z
handler_name : Mainconcept MP4 Sound Media Handler
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_nvenc))
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[h264 @ 0xcb9380] Error creating a NVDEC decoder: 1
[h264 @ 0xcb9380] Failed setup for format cuda: hwaccel initialisation returned error.
[Parsed_ass_0 @ 0x1241c00] Shaper: FriBidi 1.0.2 (SIMPLE) HarfBuzz-ng 1.7.5 (COMPLEX)
[Parsed_ass_0 @ 0x1241c00] Using font provider fontconfig
[Parsed_ass_0 @ 0x1241c00] Added subtitle file: '/tmp/conf-notes.ass' (2 styles, 101 events)The
.ass
file has been generated from a.srt
file viaffmpeg -i foo.srt foo.ass