
Recherche avancée
Autres articles (18)
-
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...) -
Demande de création d’un canal
12 mars 2010, parEn fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...) -
Installation en mode ferme
4 février 2011, parLe mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
C’est la méthode que nous utilisons sur cette même plateforme.
L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)
Sur d’autres sites (4489)
-
Unable to inject album art into m4a when converting from mp3 FFMPEG
25 décembre 2022, par RyanI've been trying so many variations of conversion for mp3 to M4A with album art injection via URL. The command below is written in
Go
, but runs directly in shell. I assume I need to parse the item in the stream differently or more explicitly specify jpg codec somehow, but at a loss.

cmd = exec.Command(
 "ffmpeg",
 "-i",
 escapedInputPath,
 "-i",
 bookArt,
 "-c:v",
 "copy",
 "-c:a",
 "aac",
 "-b:a",
 "256k",
 "-map",
 "0:0",
 "-map",
 "1:0",
 "-metadata:s:v",
 "title=Album cover",
 "-metadata:s:v",
 "comment=Cover (front)",
 escapedOutputPath,
 )



Error


Metadata:
 encoder : Lavf59.27.100
 Duration: 05:54:05.07, start: 0.025057, bitrate: 64 kb/s
 Stream #0:0: Audio: mp3, 44100 Hz, mono, fltp, 64 kb/s
Input #1, image2, from 'https://myimage.jpg':
 Duration: 00:00:00.04, start: 0.000000, bitrate: 17234 kb/s
 Stream #1:0: Video: mjpeg (Progressive), yuvj444p(pc, bt470bg/unknown/unknown), 267x400 [SAR 300:300 DAR 267:400], 25 fps, 25 tbr, 25 tbn
Stream mapping:
 Stream #0:0 -> #0:0 (mp3 (mp3float) -> aac (native))
 Stream #1:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
[ipod @ 0x119b04d30] Could not find tag for codec mjpeg in stream #1, codec not currently supported in container
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:0 -- 
[aac @ 0x119b05ae0] Qavg: nan
Conversion failed!



-
How to improve this Powershell script ?
3 janvier 2023, par Joan VengeI wrote a powershell script that merges go pro video files if they have multiple files. It works when the videos are at the root drive i.e. C :, but otherwise not. The mergevideos.txt file is not created if I run the script from a different directory. Or the txt is created but it's empty. Not sure what's going on when run from a different directory.


So is there a way to fix these issues and refactor this code to make it better ? Ideally I want the script to automatically look at the directory it's in or allows me to specify the directory it should work in so I can just call it from the same location but the videos can be anywhere.


$path = "C:/NewVideos/"
$oldvids = Get-ChildItem -Path $path *.mp4
foreach ($oldvid in $oldvids) {
 $curpath = $oldvid.DirectoryName

 $name = [System.IO.Path]::GetFileNameWithoutExtension($oldvid)
 $ext = [System.IO.Path]::GetExtension($oldvid)
 if ($name.StartsWith("GX01") -and !($name.EndsWith("_merged")))
 {
 $newvid = $curpath + $name + "_merged" + $ext
 if ([System.IO.File]::Exists($newvid))
 {
 Write-Output "$name | ALREADY MERGED"
 continue
 }

 $count = 1

 for ($num = 2; $num -lt 10; $num++)
 {
 $nextpart = $name.Replace("GX01", "GX0" + $num)
 if ([System.IO.File]::Exists($curpath + "/" + $nextpart + $ext))
 {
 $count = $num
 }
 }

 if ($count -eq 1)
 {
 Write-Output "$name | SINGLE VIDEO"
 continue
 }

 $mergefile = $curpath + "mergevideos.txt"
 if (!(Test-Path $mergefile))
 {
 New-Item -path $curpath -name mergevideos.txt -type "file"
 }

 Clear-Content $mergefile

 for ($num = 1; $num -le $count; $num++)
 {
 $nextpart = $name.Replace("GX01", "GX0" + $num)
 $videofilename = "file '" + $nextpart + $ext + "'"
 Add-Content $mergefile $videofilename
 }

 Write-Output "$name | MERGING $count VIDEOS"
 ffmpeg -f concat -safe 0 -i $mergefile -c copy $newvid
 }
}



-
Wave64 (.w64) file format : question regarding chunk GUIDs
24 janvier 2023, par pduI am having trouble understanding the headers of the Wave64 (.w64) files generated by
ffmpeg
and especially the GUIDs.

The specification


I have found this document which describes the file format and the GUIDs. I have also found other websites (here and here) that (indirectly) point to the same document. So this document is the only thing I have.


According to this document the GUIDs are 128bits/16bytes long and should start with the FourCC of the Wave file format, but in lowercase instead of uppercase (see page 3). It also says that the 64bits fields are stored in little-endian (see item 3 of the list page 1), but it does not say anything about 128bits fields (but it should be the same).
For example the GUID for the RIFF chunk is :
66666972-912E-11CF-A5D6-28DB04C10000
.

The problem


When I open a .w64 file generated by
ffmpeg
with an hex editor, I get this :72 69 66 66 2E 91 CF 11 A5 D6 28 DB 04 C1 00 00
. At the beginning,76 69 66 66
stands forriff
in ASCII. We can see that0x66666972
from the spec was indeed stored in little-endian order (so far, so good). If we continue, we have2E 91
andCF 11
, which are still little-endian for0x912E
and0x11CF
. But now it gets weird : the following group of bytes are :A5 D6
and28 DB 04 C1 00 00
for0xA5D6
and0x28DB04C10000
in the spec. So it is in big-endian now ?

For reference, the relevant
ffmpeg
source files are wavenc.c, w64.h and w64.c.
I have also found this thread where someone implemented a .wav to .w64 converter (see the .7z attachment in the first post) and the GUIDs are stored in the same way asffmpeg
.

Conclusion


Seeing that two different implementations are doing the same thing, it probably means that I am missing something. Do you have any explanation ?