
Recherche avancée
Médias (2)
-
Exemple de boutons d’action pour une collection collaborative
27 février 2013, par
Mis à jour : Mars 2013
Langue : français
Type : Image
-
Exemple de boutons d’action pour une collection personnelle
27 février 2013, par
Mis à jour : Février 2013
Langue : English
Type : Image
Autres articles (58)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, 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 (...) -
Mise à disposition des fichiers
14 avril 2011, parPar défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)
Sur d’autres sites (8006)
-
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 - Determine what parameters
27 juin 2018, par AdmiralJonBI’ve got a video file that I’m trying to determine what parameters I can use to reproduce the encoding with ffmpeg.
Here’s the ffprobe of the particular stream in question.
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video.mp4': Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.51.107
Duration: 00:05:02.84, start: 0.000000, bitrate: 4324 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuvj420p(pc, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 4323 kb/s, 25 fps, 25 tbr, 1200k tbn, 2400k tbc (default)
Metadata:
handler_name : VideoHandlerThe key part is that I’m noticing that the bitrate is quite low at 4324 kb/s, but this is actually an incredibly high quality video. To approach this sort of quality, I’ve only been able to make videos at 40000 kb/s (which is a huge increase in filesize). I also notice that it mentions yuvj420p which is an image format, but I have no idea what parameters with ffmpeg could produce that image format (if this at all would make a difference).
Would appreciate any help I can get.
Edit :
Here’s the output based on the comment below :
[STREAM]
index=0
codec_name=h264
codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
profile=Main
codec_type=video
codec_time_base=123187/3701760
codec_tag_string=avc1
codec_tag=0x31637661
width=1920
height=1080
coded_width=1920
coded_height=1080
has_b_frames=0
sample_aspect_ratio=1:1
display_aspect_ratio=16:9
pix_fmt=yuvj420p
level=41
color_range=pc
color_space=bt709
color_transfer=bt709
color_primaries=bt709
chroma_location=center
field_order=unknown
timecode=N/A
refs=1
is_avc=true
nal_length_size=4
id=N/A
r_frame_rate=15/1
avg_frame_rate=1850880/123187
time_base=1/15360
start_pts=0
start_time=0.000000
duration_ts=246374
duration=16.039974
bit_rate=13795677
max_bit_rate=N/A
bits_per_raw_sample=8
nb_frames=241
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:language=und
TAG:handler_name=VideoHandler
[/STREAM]Edit 2 :
Here’s information from mediainfo
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Main@L4.1
Format settings, CABAC : Yes
Format settings, RefFrames : 1 frame
Format settings, GOP : M=1, N=32
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 5 min 2 s
Bit rate : 4 323 kb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 25.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.083
Stream size : 156 MiB (100%)
Color range : Full
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709 -
Audacity vocal removal failed when ffmpeg-conversion was involved
10 mars 2018, par fyangI downloaded some songs coded with FLAC, and Audacity could remove the vocals quite well.
When I downloaded songs coded with ALAC, I must use ffmpeg to convert them to some other forms because Audacity didn’t recognise .m4a files.
I used the command
ffmpeg -i "song 01.m4a" -f flac "song 01.flac"
. Now Audacity could load the song, but its vocal removal failed to remove the vocals.I tried again with this command in order to be precise,
ffmpeg -i "song 01.m4a" -af "pan=stereo|c0=c0|c1=c1" -f flac "song 01.flac"
, and vocal removal did not work either.I tried to do it manually by splitting, inverting and changing both channels to mono, but the vocals were still there.
I think the problem lies with the ffmpeg conversion step. Is there any fix ? Thanks !
Below is the result of the conversion :
ffmpeg -i "song 01.m4a" -af "pan=stereo|c0=c0|c1=c1" -f flac "song 01.flac"
ffmpeg version N-90143-gb6652f5100 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7.3.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libmfx --enable-amf --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth
libavutil 56. 7.101 / 56. 7.101
libavcodec 58. 12.102 / 58. 12.102
libavformat 58. 9.100 / 58. 9.100
libavdevice 58. 2.100 / 58. 2.100
libavfilter 7. 12.100 / 7. 12.100
libswscale 5. 0.101 / 5. 0.101
libswresample 3. 0.101 / 3. 0.101
libpostproc 55. 0.100 / 55. 0.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000019f2b258000] stream 0, timescale not set
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'song 01.m4a':
Metadata:
major_brand : M4A
minor_version : 0
compatible_brands: M4A mp42isom
creation_time : 2009-12-27T00:15:23.000000Z
track : 1/10
genre :
album :
artist :
comment : ExactAudioCopy v0.95b4
DISCID :
iTunNORM : 00000F32 00000E1D 0000547D 00005B93 0006C3CA 0006C43E 00007FF8 00007FFF 00058227 0003593B
title : song 01
encoder : iTunes 9.0.2.25
date : 2005
album_artist :
lyrics :
Duration: 00:08:10.84, start: 0.000000, bitrate: 921 kb/s
Stream #0:0(und): Audio: alac (alac / 0x63616C61), 44100 Hz, stereo, s16p, 920 kb/s (default)
Metadata:
creation_time : 2009-12-27T00:15:23.000000Z
Stream #0:1: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown), 300x300 [SAR 100:100 DAR 1:1], 90k tbr, 90k tbn, 90k tbc
Stream mapping:
Stream #0:0 -> #0:0 (alac (native) -> flac (native))
Press [q] to stop, [?] for help
[Parsed_pan_0 @ 0000019f2b2a6fc0] Pure channel mapping detected: 0 1
Output #0, flac, to 'song 01.flac':
Metadata:
major_brand : M4A
minor_version : 0
compatible_brands: M4A mp42isom
lyrics :
TRACKNUMBER : 1/10
genre :
album :
artist :
DESCRIPTION : ExactAudioCopy v0.95b4
DISCID :
iTunNORM : 00000F32 00000E1D 0000547D 00005B93 0006C3CA 0006C43E 00007FF8 00007FFF 00058227 0003593B
title : song 01
ALBUMARTIST :
date : 2005
encoder : Lavf58.9.100
Stream #0:0(und): Audio: flac, 44100 Hz, stereo, s16, 128 kb/s (default)
Metadata:
creation_time : 2009-12-27T00:15:23.000000Z
encoder : Lavc58.12.102 flac
size= 54518kB time=00:08:10.84 bitrate= 909.9kbits/s speed= 35x
video:0kB audio:54508kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.018294%