
Recherche avancée
Médias (1)
-
Video d’abeille en portrait
14 mai 2011, par
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (54)
-
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 (...) -
Menus personnalisés
14 novembre 2010, parMediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
Menus créés à l’initialisation du site
Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...) -
MediaSPIP Core : La Configuration
9 novembre 2010, parMediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...)
Sur d’autres sites (5173)
-
Replace Special Characters In Batch-File Variable Feeding ffmpeg program
14 janvier 2019, par whereswallerI am attempting to write a batch-file that leverages
ffmpeg.exe
to convert all files in a folder structure to mp3 format (specifically 128 KBps).My batch-file is presently unable to process filenames (constructed by concatenating the
%_SOURCE%
and%%~F
variables) containing certain special characters generating the following errors :No such file or directory
…
ellipsis sign–
en dash—
em dash−
minus sign
Invalid argument
‘
and’
curved single quotation marks“
and”
curved double quotation marks
Invalid argument (yet sometimes passes depending on where symbol is in the filename, for example, seems to work if placed between the
n
andt
ofDont
inC:\Users\Test\Documents\Input\Peter Bjorn And John - I Know You Dont Love Me.mp3
)-
hyphen!
exclamation mark~
tilde'
non-curved single quotation mark=
equals sign+
plus sign%
percentage sign(
open bracket
How can I modify my batch-file script so that the
%%~F
variable escapes these characters correctly ?Example current filename input :
C:\Users\Test\Documents\Input\Peter Bjorn And John - I Know You Don't Love Me.mp3
Example desired filename input :
C:\Users\Test\Documents\Input\Peter Bjorn And John - I Know You Don"^'"t Love Me.mp3
Script (see line beginning
C:\ffmpeg\bin\ffmpeg.exe
) :@echo off
setlocal EnableExtensions DisableDelayedExpansion
rem // Define constants here:
set "_SOURCE=C:\Users\Test\Documents\Input" & rem // (absolute source path)
set "_TARGET=C:\Users\Test\Documents\Output" & rem // (absolute target path)
set "_PATTERN=*.*" & rem // (pure file pattern for input files)
set "_FILEEXT=.mp3" & rem // (pure file extension of output files)
pushd "%_TARGET%" || exit /B 1
for /F "delims=" %%F in ('
cd /D "%_SOURCE%" ^&^& ^(rem/ list but do not copy: ^
^& xcopy /L /S /Y /I ".\%_PATTERN%" "%_TARGET%" ^
^| find ".\" ^& rem/ remove summary line;
^)
') do (
2> nul mkdir "%%~dpF."
rem // Set up the correct `ffmpeg` command line here:
set "FFREPORT=file=C\:\\Users\\Test\\Documents\\Output\\ffreport-%%~F.log:level=32"
"C:\ffmpeg\bin\ffmpeg.exe" -report -n -i "%_SOURCE%\%%~F" -vn -c:a libmp3lame -b:a 128k "%%~dpnF%_FILEEXT%"
if not errorlevel 1 if exist "%%~dpnF%_FILEEXT%" del /f /q "%_SOURCE%\%%~F"
)
popd
endlocal
pause -
Replace Special Characters In Batch-File Variable Feeding FFMPEG Programme
6 janvier 2019, par whereswallerI am attempting to write a batch-file that leverages the FFMPEG programme to convert all files in a folder structure to mp3 format (specifically 128kbps).
My batch-file is presently unable to process filenames (constructed by concatenating the %_SOURCE% and %% F variables) containing certain special characters, for example :
’
"
öHow can I modify my script so that the %% F variable escapes these characters correctly ?
Example current filename input : "C :\Users\Test\Documents\Input\Peter Bjorn And John - I Know You Don’t Love Me.mp3"
Example desired filename input : "C :\Users\Test\Documents\Input\Peter Bjorn And John - I Know You Don"^’"t Love Me.mp3"
Script (see line beginning "C :\ffmpeg\bin\ffmpeg.exe") :
@echo off
setlocal EnableExtensions DisableDelayedExpansion
rem // Define constants here:
set "_SOURCE=C:\Users\Test\Documents\Input" & rem // (absolute source path)
set "_TARGET=C:\Users\Test\Documents\Output" & rem // (absolute target path)
set "_PATTERN=*.*" & rem // (pure file pattern for input files)
set "_FILEEXT=.mp3" & rem // (pure file extension of output files)
pushd "%_TARGET%" || exit /B 1
for /F "delims=" %%F in ('
cd /D "%_SOURCE%" ^&^& ^(rem/ list but do not copy: ^
^& xcopy /L /S /Y /I ".\%_PATTERN%" "%_TARGET%" ^
^| find ".\" ^& rem/ remove summary line;
^)
') do (
2> nul mkdir "%%~dpF.
rem // Set up the correct `ffmpeg` command line here:
set "FFREPORT=file=C\:\\Users\\Test\\Documents\\Output\\ffreport-%%~F.log:level=32"
"C:\ffmpeg\bin\ffmpeg.exe" -report -n -i "%_SOURCE%\%%~F" -vn -c:a libmp3lame -b:a 128k "%%~dpnF%_FILEEXT%"
if not errorlevel 1 if exist "%%~dpnF%_FILEEXT%" del /f /q "%_SOURCE%\%%~F"
)
popd
endlocal
pause -
Invalid data found in the last hls segment after transcoding
28 février 2024, par GalaDOSWhen I use
ffmpeg
to transcode some pure audio flv files tohls
segments, the last.ts
segment contains some decoding errors. It seems that it happens when the last segment's duration is short enough (about 1.5 second).


Here is my transcode command :



ffmpeg -i 111.flv -c:a aac -b:a 128k -f hls -hls_time 10.00 -hls_list_size 9999 tmp.m3u8




And output :



ffmpeg version n4.0.1-5-gb5106c5 Copyright (c) 2000-2018 the FFmpeg developers
 built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-4)
 configuration: --prefix=/home/zx/ffmpeg_build --extra-cflags=-I/home/zx/ffmpeg_build/include --extra-ldflags='-L/home/zx/ffmpeg_build/lib -ldl' --bindir=/home/zx/bin --pkg-config-flags=--static --enable-gpl --enable-nonfree --enable-version3 --enable-libfdk_aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libspeex --enable-libvpx --enable-libx264 --disable-shared --enable-static --disable-debug
 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
 libswscale 5. 1.100 / 5. 1.100
 libswresample 3. 1.100 / 3. 1.100
 libpostproc 55. 1.100 / 55. 1.100
Input #0, flv, from '111.flv':
 Metadata:
 major_brand : M4A 
 minor_version : 512
 compatible_brands: isomiso2
 date : 2018-05-31 01:31
 encoder : Lavf57.25.100
 Duration: 00:12:11.40, start: 0.000000, bitrate: 135 kb/s
 Stream #0:0: Audio: aac (LC), 48000 Hz, stereo, fltp, 128 kb/s
Stream mapping:
 Stream #0:0 -> #0:0 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[hls @ 0x25d4280] Opening 'tmp0.ts' for writing
[mpegts @ 0x26feb80] frame size not set
Output #0, hls, to 'tmp.m3u8':
 Metadata:
 major_brand : M4A 
 minor_version : 512
 compatible_brands: isomiso2
 date : 2018-05-31 01:31
 encoder : Lavf58.12.100
 Stream #0:0: Audio: aac (LC), 48000 Hz, stereo, fltp, 128 kb/s
 Metadata:
 encoder : Lavc58.18.100 aac
[hls @ 0x25d4280] Opening 'tmp1.ts' for writing
[hls @ 0x25d4280] Opening 'tmp.m3u8.tmp' for writing
[hls @ 0x25d4280] Opening 'tmp2.ts' for writing
[hls @ 0x25d4280] Opening 'tmp.m3u8.tmp' for writing
[hls @ 0x25d4280] Opening 'tmp3.ts' for writing
[hls @ 0x25d4280] Opening 'tmp.m3u8.tmp' for writing
[hls @ 0x25d4280] Opening 'tmp4.ts' for writing
......
[hls @ 0x25d4280] Opening 'tmp71.ts' for writing
[hls @ 0x25d4280] Opening 'tmp.m3u8.tmp' for writing
[hls @ 0x25d4280] Opening 'tmp72.ts' for writingx 
[hls @ 0x25d4280] Opening 'tmp.m3u8.tmp' for writing
[hls @ 0x25d4280] Opening 'tmp73.ts' for writing
[hls @ 0x25d4280] Opening 'tmp.m3u8.tmp' for writing
[hls @ 0x25d4280] Opening 'tmp.m3u8.tmp' for writing
size=N/A time=00:12:11.39 bitrate=N/A speed=84.7x 
video:0kB audio:11421kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[aac @ 0x25a0580] Qavg: 567.976




After transcoding, the duration of the last segment in
m3u8
file is 1.39 second :


....
#EXTINF:9.984000,
tmp71.ts
#EXTINF:10.005333,
tmp72.ts
#EXTINF:1.386667,
tmp73.ts
#EXT-X-ENDLIST




But when I use
ffprobe
to parse the last segment, I got an error :


ffprobe -i tmp73.ts 
ffprobe version n4.0.1-5-gb5106c5 Copyright (c) 2007-2018 the FFmpeg developers
 built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-4)
 configuration: --prefix=/home/zx/ffmpeg_build --extra-cflags=-I/home/zx/ffmpeg_build/include --extra-ldflags='-L/home/zx/ffmpeg_build/lib -ldl' --bindir=/home/zx/bin --pkg-config-flags=--static --enable-gpl --enable-nonfree --enable-version3 --enable-libfdk_aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libspeex --enable-libvpx --enable-libx264 --disable-shared --enable-static --disable-debug
 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
 libswscale 5. 1.100 / 5. 1.100
 libswresample 3. 1.100 / 3. 1.100
 libpostproc 55. 1.100 / 55. 1.100
tmp73.ts: Invalid data found when processing input




The input flv :



http://45.76.56.248/hls_transcode_fail.flv
md5sum: 4627bbb27bcb22c143ad4dfa47359650




Since my statistic module relies on the output of
ffprobe
, this exception will cause the entire transcoding task to fail. My temporary solution is to skip the last segment which is too short in the statistics phase. But I need a more reasonable and robust way to fix or bypass this issue. Any suggestion will be appreciated.