
Recherche avancée
Médias (1)
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (66)
-
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 -
De l’upload à la vidéo finale [version standalone]
31 janvier 2010, parLe chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
Upload et récupération d’informations de la vidéo source
Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...) -
Librairies et binaires spécifiques au traitement vidéo et sonore
31 janvier 2010, parLes logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
Binaires complémentaires et facultatifs flvtool2 : (...)
Sur d’autres sites (9861)
-
FFMPEG error : "First slice in a frame missing" when decoding H.265 stream
19 octobre 2023, par SnejkI have a problem with decoding IP camera stream (h.265) using ffmpeg libraries.


I use Live555 to receive RTP payload.


mMediaSession->readSource()->getNextFrame(mVideoBuffer.data(),
mVideoBuffer.size(), Stream::Static_PayloadRead, this, Stream::Static_StreamClose, this);



First two bytes (after the start code 0001) has the nal_unit_header. I am retrieving the type, from bits 1-6 ( ( NALU[0] >> 1 ) & 0x3F ). Then I am processing the data depending on the NALu type :


enum NalUnitType 
{ 
 NAL_UNIT_CODED_SLICE_TRAIL_N = 0, // 0 
 NAL_UNIT_CODED_SLICE_TRAIL_R, // 1 
 NAL_UNIT_CODED_SLICE_TSA_N, // 2 
 NAL_UNIT_CODED_SLICE_TLA, // 3 
 NAL_UNIT_CODED_SLICE_STSA_N, // 4 
 NAL_UNIT_CODED_SLICE_STSA_R, // 5 
 NAL_UNIT_CODED_SLICE_RADL_N, // 6 
 NAL_UNIT_CODED_SLICE_DLP, // 7 
 NAL_UNIT_CODED_SLICE_RASL_N, // 8 
 NAL_UNIT_CODED_SLICE_TFD, // 9 
 NAL_UNIT_RESERVED_10, 
...
 NAL_UNIT_CODED_SLICE_BLA, // 16 
 NAL_UNIT_CODED_SLICE_BLANT, // 17 
 NAL_UNIT_CODED_SLICE_BLA_N_LP, // 18 
 NAL_UNIT_CODED_SLICE_IDR, // 19 // Current name in the spec: IDR_W_DLP 
 NAL_UNIT_CODED_SLICE_IDR_N_LP, // 20 
 NAL_UNIT_CODED_SLICE_CRA, // 21 
 NAL_UNIT_RESERVED_22, 
 ...
 NAL_UNIT_VPS, // 32 
 NAL_UNIT_SPS, // 33 
 NAL_UNIT_PPS, // 34 
 NAL_UNIT_ACCESS_UNIT_DELIMITER, // 35 
 NAL_UNIT_EOS, // 36 
 NAL_UNIT_EOB, // 37 
 NAL_UNIT_FILLER_DATA, // 38 
 NAL_UNIT_SEI, // 39 Prefix SEI 
 NAL_UNIT_SEI_SUFFIX, // 40 Suffix SEI 
...
 NAL_UNIT_INVALID, 
}; 



If buffer doesn't have the start code, I am adding 0x00000001 at the start of the payload data, before sending it to FFmpeg. Camera is sending these NALu (in the same order) :


- 

- HEVC_NAL_VPS,
- HEVC_NAL_SPS,
- HEVC_NAL_PPS,
- HEVC_NAL_IDR_W_RADL,
- HEVC_NAL_IDR_W_RADL,
- HEVC_NAL_IDR_W_RADL,
- HEVC_NAL_TRAIL_R,
- HEVC_NAL_TRAIL_R
...


















My solution works partially as I have 1/3 of image decoded. The other 2 HEVC_NAL_IDR_W_RADL slices get FFmpeg error : "First slice in a frame missing". If I lower the stream resolution I have 1/2 image with one additional HEVC_NAL_IDR_W_RADL slice.


Similiar code works with H.264 stream so I know (I hope) that Live555 and FFmpeg code should be fine.


Live555 doesn't reassemble the I frames (http://lists.live555.com/pipermail/live-devel/2016-September/020244.html)


Is there a specific way to reassemble frame send in multiple slices. I have even tried to assemble the frame as it would be Fragmented Unit NAL type 49 (How to depacketize the fragmented frames in RTP data (over UDP) for H265/HEVC ?)


Many Thanks


-
How to resolve "ERROR : libx264 not found" ?
13 janvier 2022, par davidvargheseI needed to install ffmpeg with libx264 support for enabling H.264 encoding . I installed libx264 successfully using the below script with toolchains available in android-ndk-r9d .



#!/bin/bash
 NDK=~/android-ndk-r9d
 SYSROOT=$NDK/platforms/android-8/arch-arm/
 TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64
 function build_one
 {
 ./configure \
 --cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
 --sysroot="$SYSROOT" \
 --host=arm-linux \
 --enable-pic \
 --enable-shared \
 --disable-cli
 make clean
 make
 make install
 }
 build_one 




Now I wanted to build ffmpeg with libx264 support . I used the below script with —enable-libx264 , —enable-nonfree , —enable-gpl options as in the below script .



#!/bin/bash
NDK=~/android-ndk-r9d
SYSROOT=$NDK/platforms/android-8/arch-arm/
TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64
function build_one
{
./configure \
--prefix=$PREFIX \
--enable-shared \
--enable-nonfree \
--enable-gpl \
--enable-libx264 \
--disable-doc \
--disable-ffmpeg \
--disable-ffplay \
--disable-ffprobe \
--disable-ffserver \
--disable-avdevice \
--disable-doc \
--disable-symver \
--cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
--target-os=linux \
--arch=arm \
--enable-cross-compile \
--sysroot=$SYSROOT \
--extra-cflags="-Os -fpic $ADDI_CFLAGS" \
--extra-ldflags="$ADDI_LDFLAGS" \
$ADDITIONAL_CONFIGURE_FLAG
make clean
make
make install
}
CPU=arm
PREFIX=$(pwd)/android/$CPU
ADDI_CFLAGS="-marm"
build_one




But when I run the script I'm getting error "ERROR : libx264 not found" .



I suppose ffmpeg is not able to figure out the installed location of libx264 . After libx264 installation I have libx264.so file in /usr/local/lib executable at /usr/local/bin and header files at /usr/local/include directories .



What all changes do I need to make to the ffmpeg build script in-order to make it detect libx264 ?



Note : I am using Ubuntu 12.04(64 bit) for cross compiling .


-
Is it safe to ignore the error "Invalid UTF-8 in decoded subtitles text ; maybe missing -sub_charenc option Error while decoding stream" ?
30 avril 2022, par Clogged-arteryI was encoding a video with subtitles and I got the error, "Invalid UTF-8 in decoded subtitles text ; maybe missing -sub_charenc option. Error while decoding stream" but the video encoded anyway. What are the consequences of ignoring this error ? A google search showed a result of one guy saying it skips that sub so the resulting video will have missing subs. Can someone confirm this ?


I know how to fix it but I have already converted 50+ videos with subtitles and I'm fairly certain that a few of them had this error. I just want someone to tell me that it's okay to ignore so I don't have to watch 200 hours of videos.


Solution for fixing subtitle errors :


Create a batch file and edit with the following :


for %%a in ("*.srt") do ffmpeg -v 9 -loglevel 99 -sub_charenc CP1252 -i "%%a" "newfiles\%%~na.srt"
pause