
Recherche avancée
Autres articles (40)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)
Sur d’autres sites (5013)
-
iOS 17’s Impact on Marketing : Navigating Privacy Changes
22 septembre 2023, par Erin — Analytics Tips, Marketing -
Different PTS values in ffmpeg and MP4 CTS values obtained using ctts and stss
25 septembre 2023, par userDtrmI have been studying PTS values in .mp4 media files. PTS for video stream can be extracted from ffmpeg CLI using




 ffmpeg -hide_banner -i -vf "showinfo" -f null -




For a sample .mp4 I have downloaded from the internet shows the following output.




 Press [q] to stop, [?] for help
 [Parsed_showinfo_0 @ 0x3741c00] config in time_base : 1/30, frame_rate : 30/1
 [Parsed_showinfo_0 @ 0x3741c00] config out time_base : 0/0, frame_rate : 0/0
 [Parsed_showinfo_0 @ 0x3741c00] n : 0 pts : 0 pts_time:0 pos : 58852 fmt:yuv420p sar:1/1 s:1920x1080 i:P iskey:1 type:I checksum:49058BA3 plane_checksum :[E852D7DE 07E2B7D4 EA12FBD3] mean :[75 123 124] stdev :[52.7 4.8 11.7]
 [Parsed_showinfo_0 @ 0x3741c00] side data - User Data Unregistered :
 [Parsed_showinfo_0 @ 0x3741c00] UUID=dc45e9bd-e6d9-48b7-962c-d820d923eeef
 [Parsed_showinfo_0 @ 0x3741c00] User Data=78323634202d20636f726520313535207231302062303062636166202d20482e3236342f4d5045472d342041564320636f646563202d20436f70796c65667420323030332d32303137202d20687474703a2f2f7777772e766964656f6c616e2e6f72672f783236342e68746d6c202d206f7074696f6e733a2063616261633d31207265663d34206465626c6f636b3d313a303a3020616e616c7973653d3078333a3078313133206d653d686578207375626d653d38207073793d31207073795f72643d312e30303a302e3030206d697865645f7265663d31206d655f72616e67653d3136206368726f6d615f6d653d31207472656c6c69733d32203878386463743d312063716d3d3020646561647a6f6e653d32312c313120666173745f70736b69703d31206368726f6d615f71705f6f66667365743d2d3220746872656164733d3334206c6f6f6b61686561645f746872656164733d3520736c696365645f746872656164733d30206e723d3020646563696d6174653d3120696e7465726c616365643d3020626c757261795f636f6d7061743d302073746974636861626c653d3120636f6e73747261696e65645f696e7472613d3020626672616d65733d3320625f707972616d69643d3220625f61646170743d3220625f626961733d30206469726563743d3320776569676874623d31206f70656e5f676f703d3020776569676874703d32206b6579696e743d696e66696e697465206b6579696e745f6d696e3d3330207363656e656375743d343020696e7472615f726566726573683d302072635f6c6f6f6b61686561643d35302072633d3270617373206d62747265653d3120626974726174653d353030302072617465746f6c3d312e302071636f6d703d302e36302071706d696e3d352071706d61783d3639207170737465703d342063706c78626c75723d32302e302071626c75723d302e35207662765f6d6178726174653d35353030207662765f62756673697a653d3135303030206e616c5f6872643d6e6f6e652066696c6c65723d302069705f726174696f3d312e34302061713d313a312e303000
 [Parsed_showinfo_0 @ 0x3741c00] 
 [Parsed_showinfo_0 @ 0x3741c00] color_range:tv color_space:bt709 color_primaries:bt709 color_trc:bt709
 Output #0, null, to 'pipe :' :
 Metadata :
 major_brand : mp42
 minor_version : 0
 compatible_brands : mp42mp41isomavc1
 encoder : Lavf59.27.100
 Stream #0:0(und) : Video : wrapped_avframe, yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 30 fps, 30 tbn (default)
 Metadata :
 creation_time : 2018-01-23T22:02:00.000000Z
 handler_name : L-SMASH Video Handler
 vendor_id : [0][0][0][0]
 encoder : Lavc59.37.100 wrapped_avframe
 Stream #0:1(und) : Audio : pcm_s16le, 48000 Hz, mono, s16, 768 kb/s (default)
 Metadata :
 creation_time : 2018-01-23T22:02:00.000000Z
 handler_name : L-SMASH Audio Handler
 vendor_id : [0][0][0][0]
 encoder : Lavc59.37.100 pcm_s16le
 [Parsed_showinfo_0 @ 0x3741c00] n : 1 pts : 1 pts_time:0.0333333 pos : 149037 fmt:yuv420p sar:1/1 s:1920x1080 i:P iskey:0 type:B checksum:2005D769 plane_checksum :[92BD4F7B 3501F48D 0CAA9352] mean :[75 124 124] stdev :[52.5 4.7 11.7]
 [Parsed_showinfo_0 @ 0x3741c00] color_range:tv color_space:bt709 color_primaries:bt709 color_trc:bt709
 [Parsed_showinfo_0 @ 0x3741c00] n : 2 pts : 2 pts_time:0.0666667 pos : 139805 fmt:yuv420p sar:1/1 s:1920x1080 i:P iskey:0 type:B checksum:09AFB702 plane_checksum :[3E62184D 9D0A0753 8BF09762] mean :[75 124 124] stdev :[52.4 4.6 11.5]
 [Parsed_showinfo_0 @ 0x3741c00] color_range:tv color_space:bt709 color_primaries:bt709 color_trc:bt709
 [Parsed_showinfo_0 @ 0x3741c00] n : 3 pts : 3 pts_time:0.1 pos : 157017 fmt:yuv420p sar:1/1 s:1920x1080 i:P iskey:0 type:B checksum:99F05FA9 plane_checksum :[FFA84276 7A3D6D59 0290AFCB] mean :[75 124 124] stdev :[52.2 4.5 11.3]
 [Parsed_showinfo_0 @ 0x3741c00] color_range:tv color_space:bt709 color_primaries:bt709 color_trc:bt709
 [Parsed_showinfo_0 @ 0x3741c00] n : 4 pts : 4 pts_time:0.133333 pos : 117259 fmt:yuv420p sar:1/1 s:1920x1080 i:P iskey:0 type:P checksum:00935CD8 plane_checksum :[F81E097E 5F17005D B01452FD] mean :[74 124 124] stdev :[52.2 4.5 11.3]
 [Parsed_showinfo_0 @ 0x3741c00] color_range:tv color_space:bt709 color_primaries:bt709 color_trc:bt709
 [Parsed_showinfo_0 @ 0x3741c00] n : 5 pts : 5 pts_time:0.166667 pos : 197428 fmt:yuv420p sar:1/1 s:1920x1080 i:P iskey:0 type:B checksum:30E77B4C plane_checksum :[393DAA75 DFA88599 E2164B2F] mean :[74 124 125] stdev :[52.3 4.4 11.0]
 [Parsed_showinfo_0 @ 0x3741c00] color_range:tv color_space:bt709 color_primaries:bt709 color_trc:bt709
 [Parsed_showinfo_0 @ 0x3741c00] n : 6 pts : 6 pts_time:0.2 pos : 187073 fmt:yuv420p sar:1/1 s:1920x1080 i:P iskey:0 type:B checksum:BD5C25BC plane_checksum :[CC66DD70 F4ACA5DB 955DA253] mean :[75 124 125] stdev :[52.2 4.4 10.8]




As seen above, the output shows a starting PTS of 0 for 1st frame. However, I was looking at ctts, and stss entries in the MP4 headers with the help of ParseTimingInfoInMp4.py. This shows a different PTS (e.g., 0.0667s) for the 1st frame as seen below.




 ftyp size 32
 mvhd size 108
 iods size 42
 tkhd size 92
 edts size 36
 mdhd size 32
 Trak type : b'vide'
 Video Trak Number 0 found
 video track timescale is 30
 mdhd size 32
 hdlr size 54
 vmhd size 20
 dinf size 36
 stsd size 195
 stts size 2944 ctts size 2944
 0 dts = 0.0000 s, pts = 0.0667 s, diff in ms 66.67
 1 dts = 0.0333 s, pts = 0.2000 s, diff in ms 166.67
 2 dts = 0.0667 s, pts = 0.1333 s, diff in ms 66.67
 3 dts = 0.1000 s, pts = 0.1000 s, diff in ms 0.00
 4 dts = 0.1333 s, pts = 0.1667 s, diff in ms 33.33
 5 dts = 0.1667 s, pts = 0.3333 s, diff in ms 166.67
 6 dts = 0.2000 s, pts = 0.2667 s, diff in ms 66.67
 7 dts = 0.2333 s, pts = 0.2333 s, diff in ms 0.00
 8 dts = 0.2667 s, pts = 0.3000 s, diff in ms 33.33
 9 dts = 0.3000 s, pts = 0.4333 s, diff in ms 133.33
 10 dts = 0.3333 s, pts = 0.3667 s, diff in ms 33.33




MP4Analyser shows the following entries for stss, ctts, and edts-> for video track.







The sample file I have been using can be found in Sample mp4.


Can someone please help me to understand


- 

- why the PTS values shown in ffmpeg are different from PTS derived from stss and ctts ?
- What is the correct process in deriving PTS from stss, ctts and edts entries in MP4 header ?






-
Build FFmpeg with Freetype2 for ARM ( Android ) - SOLVED
15 juillet 2014, par Pawel CalaI’m trying to build FFmpeg binary file with freetype library included ( I need it for drawtext filter ). Unfortunately I cannot configure ffmpeg properly and every try ends with "freetype not found" error.
PS I’ve tried to build guardian-ffmpeg project but i’m getting errors during configure process.
PS2 Building plain ffmpeg works perfectly well
Configuration script :
make distclean &./configure --target-os=linux \
--cross-prefix=arm-linux-androideabi- \
--arch=arm \
--cpu=armv7-a \
--enable-libfreetype --enable-filter=drawtext \ #!Freetype params
--disable-network \
--disable-ffplay \
--disable-ffprobe \
--disable-ffserver \
--enable-protocol=file \
--sysroot=${ANDROID_NDK_ROOT_PATH}/platforms/${ANDROID_API_VERSION}/arch-arm \
--prefix=build/armeabi-v7a \
--disable-asm \
--extra-cflags='-DANDROID -Ifreetype2/ -I${ANDROID_NDK_ROOT_PATH}/sources/cxx-stl/system/include -march=armv7-a -mfloat-abi=softfp' \
--extra-ldflags='-Wl,--fix-cortex-a8 -Lfreetype2/ -L../android-libs -Wl,-rpath-link,../android-libs' \
--extra-cxxflags='-Wno-multichar -fno-exceptions -fno-rtti'
make -j6 && make install || exit 0Directories sctructure :
ffmpeg/
-ffmpeg dirs/
-freetype2/
-rest of ffmpeg files ( including configure, make, etc )I’ve checked patch sources in guardian-project and I’ve found that ffmpeg configure file might need some changes in
require_libfreetype
method ?!Thanks in advance ( and sorry for my bad english )
EDIT :
Building on OSX Mavericks,
Last 3 lines ofconfig.log
; OSX hasn’t gotpkg-config
thereforefalse
in 2nd line :require_libfreetype
false --exists --print-errors freetype
ERROR: freetype not foundEDIT :
SOLUTION !!!I’ve manadged to solve my issue. I’ve used Xubuntu 14.04 64bit + Freetype 2.5.3 + newest FFmpeg repo + install linux package "pkg_config" and small modifications in ffmpeg configure script ( find pkg_config and check initialization variable )
config file for freetype :
NDK_BASE=/home/dpc/Documents/android-ndk-r9d/
NDK_PROCESSOR=x86_64
NDK_PLATFORM_LEVEL=9
NDK_ABI=arm
NDK_COMPILER_VERSION=4.6
# Android NDK setup
NDK_PLATFORM_LEVEL=9
NDK_ABI=arm
NDK_COMPILER_VERSION=4.6
NDK_SYSROOT=$NDK_BASE/platforms/android-$NDK_PLATFORM_LEVEL/arch-$NDK_ABI
NDK_UNAME=`uname -s | tr '[A-Z]' '[a-z]'`
if [ $NDK_ABI = "x86" ]; then
HOST=i686-linux-android
NDK_TOOLCHAIN=$NDK_ABI-$NDK_COMPILER_VERSION
else
HOST=$NDK_ABI-linux-androideabi
NDK_TOOLCHAIN=$HOST-$NDK_COMPILER_VERSION
fi
NDK_TOOLCHAIN_BASE=$NDK_BASE/toolchains/$NDK_TOOLCHAIN/prebuilt/$NDK_UNAME-$NDK_PROCESSOR
echo "dpc:" $NDK_TOOLCHAIN_BASE
CC="$NDK_TOOLCHAIN_BASE/bin/$HOST-gcc --sysroot=$NDK_SYSROOT"
LD=$NDK_TOOLCHAIN_BASE/bin/$HOST-ld
STRIP=$NDK_TOOLCHAIN_BASE/bin/$HOST-strip
PREFIX=$(pwd)/build
simple_config(){
make clean
./configure --host=arm-linux-androideabi --without-zlib --without-png --prefix=
make -j4
make install DESTDIR=$(pwd)
}
complex_config(){
./configure \
CC="$CC" \
LD="$LD" \
CFLAGS="-std=gnu99 -mcpu=cortex-a8 -marm -mfloat-abi=softfp -mfpu=neon" \
--host=$HOST \
--with-sysroot="$NDK_SYSROOT" \
--enable-static \
--disable-shared \
--prefix=$PREFIX
--without-bzip2
make -j4
make install
}
make clean
complex_configffmpeg config file :
#!/bin/sh
ANDROID_NDK_ROOT_PATH=/home/dpc/Documents/android-ndk-r9d
ANDROID_API_VERSION=android-9
#export PATH=${ANDROID_NDK_ROOT_PATH}:${ANDROID_NDK_ROOT_PATH}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/:$PATH
export PATH=${ANDROID_NDK_ROOT_PATH}:${ANDROID_NDK_ROOT_PATH}/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/:$PATH
echo $PATH
#export PKG_CONFIG_PATH=/home/dpc/Documents/freetype-2.5.3/build/lib/pkgconfig/
#echo $PKG_CONFIG_PATH
#armv7-a neon
#export ARCH=armeabi-v7a-neon
#./configure --target-os=linux --cross-prefix=arm-linux-androideabi- --arch=arm --cpu=armv7-a --sysroot=${ANDROID_NDK_ROOT_PATH}/platforms/${ANDROID_API_VERSION}/arch-arm --disable-avdevice --disable-decoder=h264_vdpau --prefix=build/armeabi-v7a-neon --extra-cflags='-DANDROID -I${ANDROID_NDK_ROOT_PATH}/sources/cxx-stl/system/include -march=armv7-a -mfloat-abi=softfp -mfpu=neon' --extra-ldflags='-Wl,--fix-cortex-a8 -L../android-libs -Wl,-rpath-link,../android-libs' --extra-cxxflags='-Wno-multichar -fno-exceptions -fno-rtti'
#make -j6 && make install && make distclean|| exit 0
#armv7-a
export ARCH=armeabi-v7a
./configure --target-os=linux \
--cross-prefix=arm-linux-androideabi- \
--arch=arm \
--enable-libfreetype \
--cpu=armv7-a \
--sysroot=${ANDROID_NDK_ROOT_PATH}/platforms/${ANDROID_API_VERSION}/arch-arm \
--disable-avdevice \
--disable-decoder=h264_vdpau \
--prefix=build/armeabi-v7a \
--extra-cflags='-DANDROID -I${ANDROID_NDK_ROOT_PATH}/sources/cxx-stl/system/include -march=armv7-a -mfloat-abi=softfp' \
--extra-ldflags='-Wl,--fix-cortex-a8 -L../android-libs -Wl,-rpath-link,../android-libs' \
--extra-cxxflags='-Wno-multichar -fno-exceptions -fno-rtti'
make -j6 && make install && make distclean|| exit 0Hope it helps someone (cc : @SinhHo )