Recherche avancée

Médias (91)

Autres articles (13)

  • Installation en mode ferme

    4 février 2011, par

    Le 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 (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Qualité du média après traitement

    21 juin 2013, par

    Le bon réglage du logiciel qui traite les média est important pour un équilibre entre les partis ( bande passante de l’hébergeur, qualité du média pour le rédacteur et le visiteur, accessibilité pour le visiteur ). Comment régler la qualité de son média ?
    Plus la qualité du média est importante, plus la bande passante sera utilisée. Le visiteur avec une connexion internet à petit débit devra attendre plus longtemps. Inversement plus, la qualité du média est pauvre et donc le média devient dégradé voire (...)

Sur d’autres sites (3894)

  • Install llibx264 on Opensuse

    10 août 2020, par Harry Boy

    I need to install libx264 on OpenSuse Leap 15.1.

    


    I am following the steps here : https://software.opensuse.org/package/libx264?locale=nb
Where I see that there is an option for OpenSuse Leap 15.1. and I click the 'Community packages' option.

    


    There are 3 options :

    


    Option 1 : home:regataos

    


    I select 'Expert download'

    


    zypper addrepo https://download.opensuse.org/repositories/home:regataos/openSUSE_Leap_15.1/home:regataos.repo
zypper refresh
zypper install libx264
Loading repository data...
Reading installed packages...
'libx264' not found in package names. Trying capabilities.
No provider of 'libx264' found.
Resolving package dependencies...

Nothing to do.


    


    Option 2 : home:smarty12:multimedia

    


    I select 'Expert download'

    


    zypper addrepo https://download.opensuse.org/repositories/home:smarty12:multimedia/openSUSE_Leap_15.1/home:smarty12:multimedia.repo
zypper refresh
zypper install libx264
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following 2 NEW packages are going to be installed:
libx264 libx264-157

2 new packages to install.
Overall download size: 556.5 KiB. Already cached: 0 B. After the operation, additional 2.0 MiB will be used.
Continue? [y/n/v/...? shows all options] (y): y
Retrieving package libx264-157-2019.03.03-lp151.1.86.x86_64                                                                                                  (1/2), 549.7 KiB (  2.0 MiB unpacked)
Retrieving: libx264-157-2019.03.03-lp151.1.86.x86_64.rpm ....................................................................................................................[done (6.2 KiB/s)]
Retrieving package libx264-2019.03.03-lp151.1.86.x86_64                                                                                                   (2/2),   6.7 KiB (    0   B unpacked)
Retrieving: libx264-2019.03.03-lp151.1.86.x86_64.rpm ....................................................................................................................................[done]

Checking for file conflicts: ............................................................................................................................................................[done]
(1/2) Installing: libx264-157-2019.03.03-lp151.1.86.x86_64 ..............................................................................................................................[done]
(2/2) Installing: libx264-2019.03.03-lp151.1.86.x86_64 ..................................................................................................................................[done]


    


    So this appears to have installed it.

    


    Now when I try to convert a file from one type to I get the error : "Decoder (codec h264) not found for input stream #0:1"

    


    ffmpeg -i video.mp4 video_converted.mpg
ffmpeg version 4.3 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 10.2.0 (GCC)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --enable-gpl --enable-version3 --enable-nonfree --disable-static --enable-shared --enable-avresample --enable-gmp --enable-ladspa --enable-libass --enable-libbluray --enable-libfdk-aac --enable-libfontconfig --enable-libfreetype --enable-libglslang --enable-libgsm --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libpulse --enable-libsnappy --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libxml2 --enable-opencl --enable-opengl --enable-openssl --enable-vulkan --enable-libdrm --enable-libcelt --extra-cflags='-march=core2 -pipe -O2 -DNDEBUG -D_FORTIFY_SOURCE=2 -mmmx -msse2 -mssse3 -funwind-tables' --extra-cxxflags='-march=core2 -pipe -O2 -DNDEBUG -D_FORTIFY_SOURCE=2 -mmmx -msse2 -mssse3 -funwind-tables' --extra-ldflags='-Wl,--as-needed -Wl,--strip-all' --disable-debug --disable-demuxer='hls,applehttp'
WARNING: library configuration mismatch
avutil      configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --incdir=/usr/include/ffmpeg --extra-cflags='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g' --optflags='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g' --disable-htmlpages --enable-pic --disable-stripping --enable-shared --disable-static --enable-gpl --disable-openssl --enable-avresample --enable-gnutls --enable-ladspa --disable-cuda-sdk --enable-libass --enable-libbluray --enable-libbs2b --enable-libcelt --enable-libcdio --enable-libdc1394 --enable-libdrm --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libv4l2 --enable-libvpx --enable-libwebp --enable-libxml2 --enable-libzimg --enable-libzvbi --enable-vaapi --enable-vdpau --enable-muxers --enable-demuxers --disable-encoders --disable-decoders --disable-decoder='mpeg4,h263,h264,hevc,vc1' --enable-encoder=',aac,apng,ass,ayuv,bmp,ffv1,ffvhuff,flac,gif,huffyuv,jpegls,libaom,libaom_av1,libcodec2,libgsm,libmp3lame,libopenjpeg,libopus,libschroedinger,libspeex,libtheora,libtwolame,libvorbis,libvpx_vp8,libvpx_vp9,libwebp,libwebp_anim,mjpeg,mpeg1video,mpeg2video,mp2,mp2fixed,opus,pam,pbm,pcm_alaw,pcm_f32be,pcm_f32le,pcm_f64be,pcm_f64le,pcm_mulaw,pcm_s16be,pcm_s16be_planar,pcm_s16le,pcm_s16le_planar,pcm_s24be,pcm_s24le,pcm_s24le_planar,pcm_s32be,pcm_s32le,pcm_s32le_planar,pcm_s8,pcm_s8_planar,pcm_u16be,pcm_u16le,pcm_u24be,pcm_u24le,pcm_u32be,pcm_u32le,pcm_u8,pcx,pgm,pgmyuv,png,ppm,rawvideo,sgi,srt,ssa,sunrast,targa,text,tiff,v210,v308,v408,v410,vorbis,webvtt,xbm,xwd,y41p,yuv4,zlib,' --enable-decoder=',aac,ac3,ansi,apng,ass,ayuv,bmp,dirac,exr,ffv1,ffvhuff,ffwavesynth,flac,gif,gsm,huffyuv,ilbc,libaom,libaom_av1,libcelt,libcodec2,libdav1d,libgsm,libopenjpeg,libopus,libschroedinger,libspeex,libvorbis,libvpx_vp8,libvpx_vp9,mjpeg,mpeg1video,mpeg2video,,mp1,mp1float,mp2,mp2float,mp3,mp3float,opus,pam,pbm,pcm_alaw,pcm_bluray,pcm_dvd,pcm_f32be,pcm_f32le,pcm_f64be,pcm_f64le,pcm_mulaw,pcm_s16be,pcm_s16be_planar,pcm_s16le,pcm_s16le_planar,pcm_s24be,pcm_s24le,pcm_s24le_planar,pcm_s32be,pcm_s32le,pcm_s32le_planar,pcm_s8,pcm_s8_planar,pcm_u16be,pcm_u16le,pcm_u24be,pcm_u24le,pcm_u32be,pcm_u32le,pcm_u8,pcx,pgm,pgmyuv,pgssub,png,ppm,rawvideo,sgi,srt,ssa,sunrast,targa,text,theora,tiff,v210,v210x,v308,v408,v410,vorbis,vp3,vp5,vp6,vp6a,vp6f,vp8,vp9,webp,webvtt,xbm,xwd,y41p,yuv4,zlib,'
avcodec     configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --incdir=/usr/include/ffmpeg --extra-cflags='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g' --optflags='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g' --disable-htmlpages --enable-pic --disable-stripping --enable-shared --disable-static --enable-gpl --disable-openssl --enable-avresample --enable-gnutls --enable-ladspa --disable-cuda-sdk --enable-libass --enable-libbluray --enable-libbs2b --enable-libcelt --enable-libcdio --enable-libdc1394 --enable-libdrm --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libv4l2 --enable-libvpx --enable-libwebp --enable-libxml2 --enable-libzimg --enable-libzvbi --enable-vaapi --enable-vdpau --enable-muxers --enable-demuxers --disable-encoders --disable-decoders --disable-decoder='mpeg4,h263,h264,hevc,vc1' --enable-encoder=',aac,apng,ass,ayuv,bmp,ffv1,ffvhuff,flac,gif,huffyuv,jpegls,libaom,libaom_av1,libcodec2,libgsm,libmp3lame,libopenjpeg,libopus,libschroedinger,libspeex,libtheora,libtwolame,libvorbis,libvpx_vp8,libvpx_vp9,libwebp,libwebp_anim,mjpeg,mpeg1video,mpeg2video,mp2,mp2fixed,opus,pam,pbm,pcm_alaw,pcm_f32be,pcm_f32le,pcm_f64be,pcm_f64le,pcm_mulaw,pcm_s16be,pcm_s16be_planar,pcm_s16le,pcm_s16le_planar,pcm_s24be,pcm_s24le,pcm_s24le_planar,pcm_s32be,pcm_s32le,pcm_s32le_planar,pcm_s8,pcm_s8_planar,pcm_u16be,pcm_u16le,pcm_u24be,pcm_u24le,pcm_u32be,pcm_u32le,pcm_u8,pcx,pgm,pgmyuv,png,ppm,rawvideo,sgi,srt,ssa,sunrast,targa,text,tiff,v210,v308,v408,v410,vorbis,webvtt,xbm,xwd,y41p,yuv4,zlib,' --enable-decoder=',aac,ac3,ansi,apng,ass,ayuv,bmp,dirac,exr,ffv1,ffvhuff,ffwavesynth,flac,gif,gsm,huffyuv,ilbc,libaom,libaom_av1,libcelt,libcodec2,libdav1d,libgsm,libopenjpeg,libopus,libschroedinger,libspeex,libvorbis,libvpx_vp8,libvpx_vp9,mjpeg,mpeg1video,mpeg2video,,mp1,mp1float,mp2,mp2float,mp3,mp3float,opus,pam,pbm,pcm_alaw,pcm_bluray,pcm_dvd,pcm_f32be,pcm_f32le,pcm_f64be,pcm_f64le,pcm_mulaw,pcm_s16be,pcm_s16be_planar,pcm_s16le,pcm_s16le_planar,pcm_s24be,pcm_s24le,pcm_s24le_planar,pcm_s32be,pcm_s32le,pcm_s32le_planar,pcm_s8,pcm_s8_planar,pcm_u16be,pcm_u16le,pcm_u24be,pcm_u24le,pcm_u32be,pcm_u32le,pcm_u8,pcx,pgm,pgmyuv,pgssub,png,ppm,rawvideo,sgi,srt,ssa,sunrast,targa,text,theora,tiff,v210,v210x,v308,v408,v410,vorbis,vp3,vp5,vp6,vp6a,vp6f,vp8,vp9,webp,webvtt,xbm,xwd,y41p,yuv4,zlib,'
avformat    configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --incdir=/usr/include/ffmpeg --extra-cflags='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g' --optflags='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g' --disable-htmlpages --enable-pic --disable-stripping --enable-shared --disable-static --enable-gpl --disable-openssl --enable-avresample --enable-gnutls --enable-ladspa --disable-cuda-sdk --enable-libass --enable-libbluray --enable-libbs2b --enable-libcelt --enable-libcdio --enable-libdc1394 --enable-libdrm --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libv4l2 --enable-libvpx --enable-libwebp --enable-libxml2 --enable-libzimg --enable-libzvbi --enable-vaapi --enable-vdpau --enable-muxers --enable-demuxers --disable-encoders --disable-decoders --disable-decoder='mpeg4,h263,h264,hevc,vc1' --enable-encoder=',aac,apng,ass,ayuv,bmp,ffv1,ffvhuff,flac,gif,huffyuv,jpegls,libaom,libaom_av1,libcodec2,libgsm,libmp3lame,libopenjpeg,libopus,libschroedinger,libspeex,libtheora,libtwolame,libvorbis,libvpx_vp8,libvpx_vp9,libwebp,libwebp_anim,mjpeg,mpeg1video,mpeg2video,mp2,mp2fixed,opus,pam,pbm,pcm_alaw,pcm_f32be,pcm_f32le,pcm_f64be,pcm_f64le,pcm_mulaw,pcm_s16be,pcm_s16be_planar,pcm_s16le,pcm_s16le_planar,pcm_s24be,pcm_s24le,pcm_s24le_planar,pcm_s32be,pcm_s32le,pcm_s32le_planar,pcm_s8,pcm_s8_planar,pcm_u16be,pcm_u16le,pcm_u24be,pcm_u24le,pcm_u32be,pcm_u32le,pcm_u8,pcx,pgm,pgmyuv,png,ppm,rawvideo,sgi,srt,ssa,sunrast,targa,text,tiff,v210,v308,v408,v410,vorbis,webvtt,xbm,xwd,y41p,yuv4,zlib,' --enable-decoder=',aac,ac3,ansi,apng,ass,ayuv,bmp,dirac,exr,ffv1,ffvhuff,ffwavesynth,flac,gif,gsm,huffyuv,ilbc,libaom,libaom_av1,libcelt,libcodec2,libdav1d,libgsm,libopenjpeg,libopus,libschroedinger,libspeex,libvorbis,libvpx_vp8,libvpx_vp9,mjpeg,mpeg1video,mpeg2video,,mp1,mp1float,mp2,mp2float,mp3,mp3float,opus,pam,pbm,pcm_alaw,pcm_bluray,pcm_dvd,pcm_f32be,pcm_f32le,pcm_f64be,pcm_f64le,pcm_mulaw,pcm_s16be,pcm_s16be_planar,pcm_s16le,pcm_s16le_planar,pcm_s24be,pcm_s24le,pcm_s24le_planar,pcm_s32be,pcm_s32le,pcm_s32le_planar,pcm_s8,pcm_s8_planar,pcm_u16be,pcm_u16le,pcm_u24be,pcm_u24le,pcm_u32be,pcm_u32le,pcm_u8,pcx,pgm,pgmyuv,pgssub,png,ppm,rawvideo,sgi,srt,ssa,sunrast,targa,text,theora,tiff,v210,v210x,v308,v408,v410,vorbis,vp3,vp5,vp6,vp6a,vp6f,vp8,vp9,webp,webvtt,xbm,xwd,y41p,yuv4,zlib,'
swresample  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --incdir=/usr/include/ffmpeg --extra-cflags='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g' --optflags='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g' --disable-htmlpages --enable-pic --disable-stripping --enable-shared --disable-static --enable-gpl --disable-openssl --enable-avresample --enable-gnutls --enable-ladspa --disable-cuda-sdk --enable-libass --enable-libbluray --enable-libbs2b --enable-libcelt --enable-libcdio --enable-libdc1394 --enable-libdrm --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libv4l2 --enable-libvpx --enable-libwebp --enable-libxml2 --enable-libzimg --enable-libzvbi --enable-vaapi --enable-vdpau --enable-muxers --enable-demuxers --disable-encoders --disable-decoders --disable-decoder='mpeg4,h263,h264,hevc,vc1' --enable-encoder=',aac,apng,ass,ayuv,bmp,ffv1,ffvhuff,flac,gif,huffyuv,jpegls,libaom,libaom_av1,libcodec2,libgsm,libmp3lame,libopenjpeg,libopus,libschroedinger,libspeex,libtheora,libtwolame,libvorbis,libvpx_vp8,libvpx_vp9,libwebp,libwebp_anim,mjpeg,mpeg1video,mpeg2video,mp2,mp2fixed,opus,pam,pbm,pcm_alaw,pcm_f32be,pcm_f32le,pcm_f64be,pcm_f64le,pcm_mulaw,pcm_s16be,pcm_s16be_planar,pcm_s16le,pcm_s16le_planar,pcm_s24be,pcm_s24le,pcm_s24le_planar,pcm_s32be,pcm_s32le,pcm_s32le_planar,pcm_s8,pcm_s8_planar,pcm_u16be,pcm_u16le,pcm_u24be,pcm_u24le,pcm_u32be,pcm_u32le,pcm_u8,pcx,pgm,pgmyuv,png,ppm,rawvideo,sgi,srt,ssa,sunrast,targa,text,tiff,v210,v308,v408,v410,vorbis,webvtt,xbm,xwd,y41p,yuv4,zlib,' --enable-decoder=',aac,ac3,ansi,apng,ass,ayuv,bmp,dirac,exr,ffv1,ffvhuff,ffwavesynth,flac,gif,gsm,huffyuv,ilbc,libaom,libaom_av1,libcelt,libcodec2,libdav1d,libgsm,libopenjpeg,libopus,libschroedinger,libspeex,libvorbis,libvpx_vp8,libvpx_vp9,mjpeg,mpeg1video,mpeg2video,,mp1,mp1float,mp2,mp2float,mp3,mp3float,opus,pam,pbm,pcm_alaw,pcm_bluray,pcm_dvd,pcm_f32be,pcm_f32le,pcm_f64be,pcm_f64le,pcm_mulaw,pcm_s16be,pcm_s16be_planar,pcm_s16le,pcm_s16le_planar,pcm_s24be,pcm_s24le,pcm_s24le_planar,pcm_s32be,pcm_s32le,pcm_s32le_planar,pcm_s8,pcm_s8_planar,pcm_u16be,pcm_u16le,pcm_u24be,pcm_u24le,pcm_u32be,pcm_u32le,pcm_u8,pcx,pgm,pgmyuv,pgssub,png,ppm,rawvideo,sgi,srt,ssa,sunrast,targa,text,theora,tiff,v210,v210x,v308,v408,v410,vorbis,vp3,vp5,vp6,vp6a,vp6f,vp8,vp9,webp,webvtt,xbm,xwd,y41p,yuv4,zlib,'
libavutil      56. 51.100 / 56. 31.100
libavcodec     58. 91.100 / 58. 54.100
libavformat    58. 45.100 / 58. 29.100
libavdevice    58. 10.100 / 58. 10.100
libavfilter     7. 85.100 /  7. 85.100
libavresample   4.  0.  0 /  4.  0.  0
libswscale      5.  7.100 /  5.  7.100
libswresample   3.  7.100 /  3.  5.100
libpostproc    55.  7.100 / 55.  7.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55dfcea468c0] st: 1 edit list: 1 Missing key frame while searching for timestamp: 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55dfcea468c0] st: 1 edit list 1 Cannot find an index entry before timestamp: 0.
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video.mp4':
Metadata:
major_brand     : isom
minor_version   : 0
compatible_brands: mp41avc1
creation_time   : 2019-07-25T09:16:31.000000Z
encoder         : vlc 3.0.4 stream output
encoder-eng     : vlc 3.0.4 stream output
Duration: 00:00:07.07, start: 0.000000, bitrate: 3900 kb/s
Stream #0:0(eng): Audio: mp3 (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default)
Metadata:
  creation_time   : 2019-07-25T09:16:31.000000Z
  handler_name    : SoundHandler
Stream #0:1(eng): Video: h264 (avc1 / 0x31637661), none, 1088x1920, 3766 kb/s, 29.99 fps, 29.97 tbr, 1000k tbn, 1000k tbc (default)
Metadata:
  rotate          : 90
  creation_time   : 2019-07-25T09:16:31.000000Z
  handler_name    : VideoHandler
Side data:
  displaymatrix: rotation of -90.00 degrees
Stream mapping:
  Stream #0:1 -> #0:0 (? (?) -> mpeg1video (native))
  Stream #0:0 -> #0:1 (mp3 (mp3float) -> mp2 (native))
 


    


    Decoder (codec h264) not found for input stream #0:1

    


    How can I successfully install libx264 o Opensuse 15.1

    


  • Processing WebRTC RTC stream in node js server with ffmpeg

    23 juillet 2020, par Dave B

    I am trying to build a video chat app where I am creating an RTCPeerConnection and creating an offer and saving the SDP in a file. I want the SDP I sent to server should be sent to RTMP server like Nginx RTMP. Here is the offer SDP I am getting

    


    v=0
o=- 3688975056307578818 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE 0 1 2
a=msid-semantic: WMS AqaeHB0L8drTd5r0qQnzCSeYVf4bHFaVqfrq
m=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 0 8 106 105 13 110 112 113 126
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:Xtid
a=ice-pwd:jE3iBRpWqFaIN3UJVOAh0G/1
a=ice-options:trickle
a=fingerprint:sha-256 48:E4:36:A6:24:66:F6:40:0F:93:9C:AB:C9:93:DF:C7:0F:D1:21:F5:9E:F7:FA:A8:58:84:1F:68:A1:61:B6:0F
a=setup:actpass
a=mid:0
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
a=extmap:5 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
a=extmap:6 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id
a=sendrecv
a=msid:AqaeHB0L8drTd5r0qQnzCSeYVf4bHFaVqfrq 284f316d-6c5d-4283-af4d-86d44803807d
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=rtcp-fb:111 transport-cc
a=fmtp:111 minptime=10;useinbandfec=1
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:106 CN/32000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:110 telephone-event/48000
a=rtpmap:112 telephone-event/32000
a=rtpmap:113 telephone-event/16000
a=rtpmap:126 telephone-event/8000
a=ssrc:2317617486 cname:fpKjO3/hiHYYBw7w
a=ssrc:2317617486 msid:AqaeHB0L8drTd5r0qQnzCSeYVf4bHFaVqfrq 284f316d-6c5d-4283-af4d-86d44803807d
a=ssrc:2317617486 mslabel:AqaeHB0L8drTd5r0qQnzCSeYVf4bHFaVqfrq
a=ssrc:2317617486 label:284f316d-6c5d-4283-af4d-86d44803807d
m=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 102 122 127 121 125 107 108 109 124 120 123 119 114 115 116
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:Xtid
a=ice-pwd:jE3iBRpWqFaIN3UJVOAh0G/1
a=ice-options:trickle
a=fingerprint:sha-256 48:E4:36:A6:24:66:F6:40:0F:93:9C:AB:C9:93:DF:C7:0F:D1:21:F5:9E:F7:FA:A8:58:84:1F:68:A1:61:B6:0F
a=setup:actpass
a=mid:1
a=extmap:14 urn:ietf:params:rtp-hdrext:toffset
a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:13 urn:3gpp:video-orientation
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:12 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
a=extmap:11 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type
a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing
a=extmap:8 http://tools.ietf.org/html/draft-ietf-avtext-framemarking-07
a=extmap:9 http://www.webrtc.org/experiments/rtp-hdrext/color-space
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
a=extmap:5 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
a=extmap:6 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id
a=sendrecv
a=msid:AqaeHB0L8drTd5r0qQnzCSeYVf4bHFaVqfrq 7106bf9f-3f79-4f24-959b-b82b603a7acc
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:96 VP8/90000
a=rtcp-fb:96 goog-remb
a=rtcp-fb:96 transport-cc
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
a=rtpmap:98 VP9/90000
a=rtcp-fb:98 goog-remb
a=rtcp-fb:98 transport-cc
a=rtcp-fb:98 ccm fir
a=rtcp-fb:98 nack
a=rtcp-fb:98 nack pli
a=fmtp:98 profile-id=0
a=rtpmap:99 rtx/90000
a=fmtp:99 apt=98
a=rtpmap:100 VP9/90000
a=rtcp-fb:100 goog-remb
a=rtcp-fb:100 transport-cc
a=rtcp-fb:100 ccm fir
a=rtcp-fb:100 nack
a=rtcp-fb:100 nack pli
a=fmtp:100 profile-id=2
a=rtpmap:101 rtx/90000
a=fmtp:101 apt=100
a=rtpmap:102 H264/90000
a=rtcp-fb:102 goog-remb
a=rtcp-fb:102 transport-cc
a=rtcp-fb:102 ccm fir
a=rtcp-fb:102 nack
a=rtcp-fb:102 nack pli
a=fmtp:102 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f
a=rtpmap:122 rtx/90000
a=fmtp:122 apt=102
a=rtpmap:127 H264/90000
a=rtcp-fb:127 goog-remb
a=rtcp-fb:127 transport-cc
a=rtcp-fb:127 ccm fir
a=rtcp-fb:127 nack
a=rtcp-fb:127 nack pli
a=fmtp:127 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42001f
a=rtpmap:121 rtx/90000
a=fmtp:121 apt=127
a=rtpmap:125 H264/90000
a=rtcp-fb:125 goog-remb
a=rtcp-fb:125 transport-cc
a=rtcp-fb:125 ccm fir
a=rtcp-fb:125 nack
a=rtcp-fb:125 nack pli
a=fmtp:125 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f
a=rtpmap:107 rtx/90000
a=fmtp:107 apt=125
a=rtpmap:108 H264/90000
a=rtcp-fb:108 goog-remb
a=rtcp-fb:108 transport-cc
a=rtcp-fb:108 ccm fir
a=rtcp-fb:108 nack
a=rtcp-fb:108 nack pli
a=fmtp:108 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42e01f
a=rtpmap:109 rtx/90000
a=fmtp:109 apt=108
a=rtpmap:124 H264/90000
a=rtcp-fb:124 goog-remb
a=rtcp-fb:124 transport-cc
a=rtcp-fb:124 ccm fir
a=rtcp-fb:124 nack
a=rtcp-fb:124 nack pli
a=fmtp:124 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=4d0032
a=rtpmap:120 rtx/90000
a=fmtp:120 apt=124
a=rtpmap:123 H264/90000
a=rtcp-fb:123 goog-remb
a=rtcp-fb:123 transport-cc
a=rtcp-fb:123 ccm fir
a=rtcp-fb:123 nack
a=rtcp-fb:123 nack pli
a=fmtp:123 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=640032
a=rtpmap:119 rtx/90000
a=fmtp:119 apt=123
a=rtpmap:114 red/90000
a=rtpmap:115 rtx/90000
a=fmtp:115 apt=114
a=rtpmap:116 ulpfec/90000
a=ssrc-group:FID 967462980 1884395933
a=ssrc:967462980 cname:fpKjO3/hiHYYBw7w
a=ssrc:967462980 msid:AqaeHB0L8drTd5r0qQnzCSeYVf4bHFaVqfrq 7106bf9f-3f79-4f24-959b-b82b603a7acc
a=ssrc:967462980 mslabel:AqaeHB0L8drTd5r0qQnzCSeYVf4bHFaVqfrq
a=ssrc:967462980 label:7106bf9f-3f79-4f24-959b-b82b603a7acc
a=ssrc:1884395933 cname:fpKjO3/hiHYYBw7w
a=ssrc:1884395933 msid:AqaeHB0L8drTd5r0qQnzCSeYVf4bHFaVqfrq 7106bf9f-3f79-4f24-959b-b82b603a7acc
a=ssrc:1884395933 mslabel:AqaeHB0L8drTd5r0qQnzCSeYVf4bHFaVqfrq
a=ssrc:1884395933 label:7106bf9f-3f79-4f24-959b-b82b603a7acc
m=application 9 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP4 0.0.0.0
a=ice-ufrag:Xtid
a=ice-pwd:jE3iBRpWqFaIN3UJVOAh0G/1
a=ice-options:trickle
a=fingerprint:sha-256 48:E4:36:A6:24:66:F6:40:0F:93:9C:AB:C9:93:DF:C7:0F:D1:21:F5:9E:F7:FA:A8:58:84:1F:68:A1:61:B6:0F
a=setup:actpass
a=mid:2
a=sctp-port:5000
a=max-message-size:262144


    


    this is the ffmpeg command

    


    ffmpeg -protocol_whitelist rtp,udp,file -loglevel trace -analyzeduration 300M -probesize 300M -i test.sdp -c:v copy -c:a aac -ar 16k -ac 1 -preset ultrafast -tune zerolatency rtmp://127.0.0.1/live/1234


    


    Also trying this

    


    ffmpeg -loglevel debug -protocol_whitelist file,crypto,udp,rtp -re -vcodec libvpx -acodec opus -i test.sdp -vcodec libx264 -acodec aac -y output.mp4


    


    FFMpeg gives an error like this

    


    ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
  built with Apple clang version 11.0.0 (clang-1100.0.33.17)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.2_2 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
Reading option '-protocol_whitelist' ... matched as AVOption 'protocol_whitelist' with argument 'file,crypto,udp,rtp'.
Reading option '-re' ... matched as option 're' (read input at native frame rate) with argument '1'.
Reading option '-vcodec' ... matched as option 'vcodec' (force video codec ('copy' to copy stream)) with argument 'libvpx'.
Reading option '-acodec' ... matched as option 'acodec' (force audio codec ('copy' to copy stream)) with argument 'opus'.
Reading option '-i' ... matched as input url with argument 'test.sdp'.
Reading option '-vcodec' ... matched as option 'vcodec' (force video codec ('copy' to copy stream)) with argument 'libx264'.
Reading option '-acodec' ... matched as option 'acodec' (force audio codec ('copy' to copy stream)) with argument 'aac'.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option 'output.mp4' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Applying option y (overwrite output files) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input url test.sdp.
Applying option re (read input at native frame rate) with argument 1.
Applying option vcodec (force video codec ('copy' to copy stream)) with argument libvpx.
Applying option acodec (force audio codec ('copy' to copy stream)) with argument opus.
Successfully parsed a group of options.
Opening an input file: test.sdp.
[NULL @ 0x7f949000ac00] Opening 'test.sdp' for reading
[sdp @ 0x7f949000ac00] Format sdp probed with size=2048 and score=50
[sdp @ 0x7f949000ac00] audio codec set to: opus
[sdp @ 0x7f949000ac00] audio samplerate set to: 48000
[sdp @ 0x7f949000ac00] audio channels set to: 2
[sdp @ 0x7f949000ac00] audio codec set to: opus
[sdp @ 0x7f949000ac00] audio samplerate set to: 16000
[sdp @ 0x7f949000ac00] audio channels set to: 1
[sdp @ 0x7f949000ac00] audio codec set to: opus
[sdp @ 0x7f949000ac00] audio samplerate set to: 32000
[sdp @ 0x7f949000ac00] audio channels set to: 1
[sdp @ 0x7f949000ac00] audio codec set to: adpcm_g722
[sdp @ 0x7f949000ac00] audio samplerate set to: 8000
[sdp @ 0x7f949000ac00] audio channels set to: 1
[sdp @ 0x7f949000ac00] audio codec set to: pcm_mulaw
[sdp @ 0x7f949000ac00] audio samplerate set to: 8000
[sdp @ 0x7f949000ac00] audio channels set to: 1
[sdp @ 0x7f949000ac00] audio codec set to: pcm_alaw
[sdp @ 0x7f949000ac00] audio samplerate set to: 8000
[sdp @ 0x7f949000ac00] audio channels set to: 1
[sdp @ 0x7f949000ac00] audio codec set to: pcm_alaw
[sdp @ 0x7f949000ac00] audio samplerate set to: 32000
[sdp @ 0x7f949000ac00] audio channels set to: 1
[sdp @ 0x7f949000ac00] audio codec set to: pcm_alaw
[sdp @ 0x7f949000ac00] audio samplerate set to: 16000
[sdp @ 0x7f949000ac00] audio channels set to: 1
[sdp @ 0x7f949000ac00] audio codec set to: (null)
[sdp @ 0x7f949000ac00] audio samplerate set to: 8000
[sdp @ 0x7f949000ac00] audio channels set to: 1
[sdp @ 0x7f949000ac00] audio codec set to: (null)
[sdp @ 0x7f949000ac00] audio samplerate set to: 48000
[sdp @ 0x7f949000ac00] audio channels set to: 1
[sdp @ 0x7f949000ac00] audio codec set to: (null)
[sdp @ 0x7f949000ac00] audio samplerate set to: 32000
[sdp @ 0x7f949000ac00] audio channels set to: 1
[sdp @ 0x7f949000ac00] audio codec set to: (null)
[sdp @ 0x7f949000ac00] audio samplerate set to: 16000
[sdp @ 0x7f949000ac00] audio channels set to: 1
[sdp @ 0x7f949000ac00] audio codec set to: (null)
[sdp @ 0x7f949000ac00] audio samplerate set to: 8000
[sdp @ 0x7f949000ac00] audio channels set to: 1
[sdp @ 0x7f949000ac00] video codec set to: vp8
    Last message repeated 20 times
[udp @ 0x7f948fc07200] bind failed: Address already in use
[AVIOContext @ 0x7f948fe1c4c0] Statistics: 5985 bytes read, 0 seeks
test.sdp: Invalid data found when processing input


    


    Can anyone please point out what I am doing wrong here ? or I am in the right path ?
Please help !

    


  • FFMPEG API Mp4 H264 Encoding/Muxing - unspecified pixel format

    28 juillet 2020, par Fabrice

    I'm working on a c++ project using ffmpeg. I have to generate an mp4 file with h264 encoding.

    


    My problem is that the file generate but when reading the file with VLC I've got no image, and analyzing it with ffprobe give me (log below) the error :

    


    


    unspecified pixel format

    


    


    ffprobe version N-93020-g3224d6691c Copyright (c) 2007-2019 the FFmpeg developers
  built with gcc 8.2.1 (GCC) 20181201
  configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --enable-sdl2 --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-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
  libavutil      56. 26.100 / 56. 26.100
  libavcodec     58. 44.100 / 58. 44.100
  libavformat    58. 26.100 / 58. 26.100
  libavdevice    58.  6.101 / 58.  6.101
  libavfilter     7. 48.100 /  7. 48.100
  libswscale      5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
  libpostproc    55.  4.100 / 55.  4.100
[h264 @ 02a46240] non-existing PPS 0 referenced
[h264 @ 02a46240] decode_slice_header error
[h264 @ 02a46240] no frame!
...
[h264 @ 02a46240] non-existing PPS 0 referenced
[h264 @ 02a46240] decode_slice_header error
[h264 @ 02a46240] no frame!
[mov,mp4,m4a,3gp,3g2,mj2 @ 02a35380] decoding for stream 0 failed
[mov,mp4,m4a,3gp,3g2,mj2 @ 02a35380] Could not find codec parameters for stream 0 (Video: h264 (avc1 / 0x31637661), none, 352x288, 320 kb/s): unspecified pixel format
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\Fabrice\Desktop\video\Test.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.26.100
  Duration: 00:00:09.00, start: 0.000000, bitrate: 323 kb/s
    Stream #0:0(und): Video: h264 (avc1 / 0x31637661), none, 352x288, 320 kb/s, 25.11 fps, 25 tbr, 12800 tbn, 25600 tbc (default)
    Metadata:
      handler_name    : VideoHandler


    


    Here is the code I use to genererate my mp4 File, it's based on sample from ffmpeg (see : FFMPEG Muxing sample). I have tried to adapt it without using deprecated function. It works using webm/vp8 encoding, but not mp4/h264.

    


    #include &#xA;#include &#xA;#include &#xA;extern "C"&#xA;{&#xA;#include <libavcodec></libavcodec>avcodec.h>&#xA;#include <libswscale></libswscale>swscale.h>&#xA;#include <libavformat></libavformat>avformat.h>&#xA;#include <libavutil></libavutil>error.h> &#xA;#include <libavutil></libavutil>opt.h>&#xA;#include <libavutil></libavutil>imgutils.h>&#xA;}&#xA;&#xA;#pragma comment(lib, "avcodec.lib")&#xA;#pragma comment(lib, "swscale.lib")&#xA;#pragma comment(lib, "avformat.lib")&#xA;#pragma comment(lib, "avutil.lib")&#xA;&#xA;/* 10 seconds stream duration */&#xA;#define STREAM_DURATION   10.0&#xA;#define STREAM_FRAME_RATE 25 /* 25 images/s */&#xA;#define STREAM_NB_FRAMES  ((int)(STREAM_DURATION * STREAM_FRAME_RATE))&#xA;#define STREAM_PIX_FMT    AV_PIX_FMT_YUV420P /* default pix_fmt */&#xA;&#xA;//#pragma warning(disable : 4996) // TODO: remove&#xA;&#xA;static int sws_flags = SWS_BICUBIC;&#xA;&#xA;/* Add an output stream. */&#xA;static AVStream *add_stream(AVFormatContext *formatContext, AVCodec **codec, enum AVCodecID codecId, AVCodecContext **codecCtx)&#xA;{&#xA;    AVStream *stream;&#xA;&#xA;    // Get the encoder codec&#xA;    *codec = avcodec_find_encoder(codecId);&#xA;    if (!(*codec)) {&#xA;        fprintf(stderr, "Could not find encoder for &#x27;%s&#x27;\n",&#xA;            avcodec_get_name(codecId));&#xA;        exit(1);&#xA;    }&#xA;&#xA;    // Get the stream for codec&#xA;    stream = avformat_new_stream(formatContext, *codec);&#xA;    if (!stream) {&#xA;        fprintf(stderr, "Could not allocate stream\n");&#xA;        exit(1);&#xA;    }&#xA;    stream->id = formatContext->nb_streams - 1;&#xA;&#xA;    (*codecCtx) = avcodec_alloc_context3(*codec);&#xA;&#xA;    switch ((*codec)->type) {&#xA;    case AVMEDIA_TYPE_VIDEO:&#xA;        stream->codecpar->codec_id = codecId;&#xA;        stream->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;&#xA;        stream->codecpar->bit_rate = 400000;&#xA;        stream->codecpar->width = 352;&#xA;        stream->codecpar->height = 288;&#xA;        stream->codecpar->format = STREAM_PIX_FMT;&#xA;        stream->time_base = { 1, STREAM_FRAME_RATE };&#xA;&#xA;        avcodec_parameters_to_context((*codecCtx), stream->codecpar);&#xA;        (*codecCtx)->gop_size = 12; /* emit one intra frame every twelve frames at most */&#xA;        (*codecCtx)->max_b_frames = 2;&#xA;        (*codecCtx)->time_base = { 1, STREAM_FRAME_RATE };&#xA;        if ((*codecCtx)->codec_id == AV_CODEC_ID_MPEG1VIDEO) {&#xA;            /* Needed to avoid using macroblocks in which some coeffs overflow.&#xA;             * This does not happen with normal video, it just happens here as&#xA;             * the motion of the chroma plane does not match the luma plane. */&#xA;            (*codecCtx)->mb_decision = 2;&#xA;        }&#xA;        break;&#xA;&#xA;    default:&#xA;        break;&#xA;    }&#xA;    &#xA;    //if (stream->codecpar->codec_id == AV_CODEC_ID_H264) {&#xA;    //  av_opt_set(codecCtx, "preset", "ultrafast", 0);&#xA;    //}&#xA;    //(*codecCtx)->flags |= AV_CODEC_FLAG_LOW_DELAY;&#xA;&#xA;    /* Some formats want stream headers to be separate. */&#xA;    if (formatContext->oformat->flags &amp; AVFMT_GLOBALHEADER)&#xA;        (*codecCtx)->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;&#xA;&#xA;&#xA;    int ret = avcodec_parameters_from_context(stream->codecpar, (*codecCtx));&#xA;    if (ret &lt; 0) {&#xA;        char error[255];&#xA;        av_strerror(ret, error, 255);&#xA;        fprintf(stderr, "avcodec_parameters_from_context returned (%d) - %s", ret, error);&#xA;        return false;&#xA;    }&#xA;&#xA;    return stream;&#xA;}&#xA;&#xA;/**************************************************************/&#xA;/* video output */&#xA;&#xA;static AVFrame *frame_video;&#xA;static int frame_count;&#xA;&#xA;static void open_video(AVCodec *codec, AVStream *stream, AVCodecContext *codecCtx)&#xA;{&#xA;    int ret;&#xA;&#xA;    /* open the codec */&#xA;    ret = avcodec_open2(codecCtx, codec, NULL);&#xA;    if (ret &lt; 0) {&#xA;        char error[255];&#xA;        av_strerror(ret, error, 255);&#xA;        fprintf(stderr, "Could not open video codec: %s\n", error);&#xA;        exit(1);&#xA;    }&#xA;&#xA;    /* allocate and init a re-usable frame */&#xA;    frame_video = av_frame_alloc();&#xA;    if (!frame_video) {&#xA;        fprintf(stderr, "Could not allocate video frame\n");&#xA;        exit(1);&#xA;    }&#xA;&#xA;    frame_video->format = codecCtx->pix_fmt;&#xA;    frame_video->width = codecCtx->width;&#xA;    frame_video->height = codecCtx->height;&#xA;&#xA;    ret = av_frame_get_buffer(frame_video, 32);&#xA;    if (ret &lt; 0) {&#xA;        fprintf(stderr, "Could not allocate the video frame data\n");&#xA;        exit(1);&#xA;    }&#xA;}&#xA;&#xA;/* Prepare a dummy image. */&#xA;static void fill_yuv_image(AVFrame *pict, int frame_index, int width, int height)&#xA;{&#xA;    int x, y, i;&#xA;&#xA;    i = frame_index;&#xA;&#xA;    /* Y */&#xA;    for (y = 0; y &lt; height; y&#x2B;&#x2B;)&#xA;        for (x = 0; x &lt; width; x&#x2B;&#x2B;)&#xA;            pict->data[0][y * pict->linesize[0] &#x2B; x] = x &#x2B; y &#x2B; i * 3;&#xA;&#xA;    /* Cb and Cr */&#xA;    for (y = 0; y &lt; height / 2; y&#x2B;&#x2B;) {&#xA;        for (x = 0; x &lt; width / 2; x&#x2B;&#x2B;) {&#xA;            pict->data[1][y * pict->linesize[1] &#x2B; x] = 128 &#x2B; y &#x2B; i * 2;&#xA;            pict->data[2][y * pict->linesize[2] &#x2B; x] = 64 &#x2B; x &#x2B; i * 5;&#xA;        }&#xA;    }&#xA;}&#xA;&#xA;int timestamp = 0;&#xA;static void write_video_frame(AVFormatContext *formatContext, AVStream *stream, AVCodecContext *codecCtx)&#xA;{&#xA;    int ret;&#xA;    static struct SwsContext *sws_ctx;&#xA;&#xA;    if (frame_count >= STREAM_NB_FRAMES) {&#xA;        /* No more frames to compress. The codec has a latency of a few&#xA;         * frames if using B-frames, so we get the last frames by&#xA;         * passing the same picture again. */&#xA;    }&#xA;    else {&#xA;        if (codecCtx->pix_fmt != AV_PIX_FMT_YUV420P) {&#xA;            /* as we only generate a YUV420P picture, we must convert it&#xA;             * to the codec pixel format if needed */&#xA;            if (!sws_ctx) {&#xA;                sws_ctx = sws_getContext(codecCtx->width, codecCtx->height, AV_PIX_FMT_YUV420P,&#xA;                    codecCtx->width, codecCtx->height, codecCtx->pix_fmt,&#xA;                    sws_flags, NULL, NULL, NULL);&#xA;                if (!sws_ctx) {&#xA;                    fprintf(stderr, "Could not initialize the conversion context\n");&#xA;                    exit(1);&#xA;                }&#xA;            }&#xA;            fill_yuv_image(frame_video, frame_count, codecCtx->width, codecCtx->height);&#xA;            sws_scale(sws_ctx, (const uint8_t * const *)frame_video->data, frame_video->linesize,&#xA;                0, codecCtx->height, frame_video->data, frame_video->linesize);&#xA;        }&#xA;        else {&#xA;            fill_yuv_image(frame_video, frame_count, codecCtx->width, codecCtx->height);&#xA;        }&#xA;    }&#xA;&#xA;    frame_video->format = AV_PIX_FMT_YUV420P;&#xA;    frame_video->width = codecCtx->width;&#xA;    frame_video->height = codecCtx->height;&#xA;&#xA;    if (formatContext->oformat->flags &amp; 0x0020) {&#xA;        /* Raw video case - directly store the picture in the packet */&#xA;        AVPacket pkt;&#xA;        av_init_packet(&amp;pkt);&#xA;&#xA;        pkt.flags |= AV_PKT_FLAG_KEY;&#xA;        pkt.stream_index = stream->index;&#xA;        pkt.data = frame_video->data[0];&#xA;        pkt.size = sizeof(AVPicture);&#xA;&#xA;        ret = av_interleaved_write_frame(formatContext, &amp;pkt);&#xA;    }&#xA;    else {&#xA;        AVPacket pkt = { 0 };&#xA;        av_init_packet(&amp;pkt);&#xA;&#xA;        /* encode the image */&#xA;        fprintf(stderr, "\nFrame type : %c\n", av_get_picture_type_char(frame_video->pict_type));&#xA;        fprintf(stderr, "Frame pts: %lld, \n", frame_video->pts);&#xA;        fprintf(stderr, "Codec timebase: %d/%d\n", codecCtx->time_base.num, codecCtx->time_base.den);&#xA;        fprintf(stderr, "Stream timebase: %d/%d\n", stream->time_base.num, stream->time_base.den);&#xA;        fprintf(stderr, "Resacale: %lld, \n\n", av_rescale_q(1, codecCtx->time_base, stream->time_base));&#xA;        ret = avcodec_send_frame(codecCtx, frame_video);&#xA;        if (ret &lt; 0) {&#xA;            char error[255];&#xA;            av_strerror(ret, error, 255);&#xA;            fprintf(stderr, "Error encoding video frame: %s\n", error);&#xA;            exit(1);&#xA;        }&#xA;        /* If size is zero, it means the image was buffered. */&#xA;        ret = avcodec_receive_packet(codecCtx, &amp;pkt);&#xA;        if (!ret &amp;&amp; pkt.size) {&#xA;            pkt.stream_index = stream->index;&#xA;            fprintf(stderr, "Packet flags : %d\n", pkt.flags);&#xA;            fprintf(stderr, "Packet pts: %lld\n", pkt.pts);&#xA;            fprintf(stderr, "Packet dts: %lld\n", pkt.dts);&#xA;            fprintf(stderr, "Packet duration: %lld\n", pkt.duration);&#xA;            fprintf(stderr, "Packet pos: %lld\n\n", pkt.pos);&#xA;            &#xA;            /* Write the compressed frame to the media file. */&#xA;            ret = av_interleaved_write_frame(formatContext, &amp;pkt);&#xA;        }&#xA;        else {&#xA;            ret = 0;&#xA;        }&#xA;    }&#xA;    if (ret != 0) {&#xA;        char error[255];&#xA;        av_strerror(ret, error, 255);&#xA;        fprintf(stderr, "Error while writing video frame: %s\n", error);&#xA;        exit(1);&#xA;    }&#xA;    frame_count&#x2B;&#x2B;;&#xA;}&#xA;&#xA;static void close_video(AVFormatContext *oc, AVStream *st)&#xA;{&#xA;    av_free(frame_video->data[0]);&#xA;    av_free(frame_video);&#xA;}&#xA;&#xA;/**************************************************************/&#xA;/* media file output */&#xA;&#xA;int main(int argc, char **argv)&#xA;{&#xA;    // The outputed media&#xA;    char filename[100];&#xA;    const char *mediaFormat = "mp4"; AVCodecID mediaVideoCodec = AV_CODEC_ID_H264;&#xA;    //const char *mediaFormat="webm"; AVCodecID mediaVideoCodec = AV_CODEC_ID_VP8;&#xA;    AVOutputFormat *formatOut;&#xA;    AVFormatContext *formatCtx;&#xA;&#xA;    // The video stream&#xA;    AVStream *stream_video;&#xA;    AVCodec *codec_video = nullptr;&#xA;    AVCodecContext *codecCtx_video = nullptr;&#xA;    double time_video = 0;&#xA;&#xA;    // Return code&#xA;    int ret;&#xA;&#xA;    strcpy_s(filename, "C:\\Test.");&#xA;    strcat_s(filename, mediaFormat);&#xA;&#xA;    // allocate the output media context&#xA;    avformat_alloc_output_context2(&amp;formatCtx, NULL, NULL, filename);&#xA;    if (!formatCtx) {&#xA;        return 1;&#xA;    }&#xA;    formatOut = formatCtx->oformat;&#xA;&#xA;    // Add the video stream using H264 codec&#xA;    stream_video = NULL;&#xA;    stream_video = add_stream(formatCtx, &amp;codec_video, mediaVideoCodec, &amp;codecCtx_video);&#xA;&#xA;    // Open video codec and allocate the necessary encode buffers&#xA;    if (stream_video)&#xA;        open_video(codec_video, stream_video, codecCtx_video);&#xA;&#xA;    av_dump_format(formatCtx, 0, filename, 1);&#xA;&#xA;    // Open the output media file, if needed&#xA;    if (!(formatOut->flags &amp; AVFMT_NOFILE)) {&#xA;        ret = avio_open(&amp;formatCtx->pb, filename, AVIO_FLAG_WRITE);&#xA;        if (ret &lt; 0) {&#xA;            char error[255];&#xA;            av_strerror(ret, error, 255);&#xA;            fprintf(stderr, "Could not open &#x27;%s&#x27;: %s\n", filename, error);&#xA;            return 1;&#xA;        }&#xA;    }&#xA;&#xA;    // Write media header&#xA;    ret = avformat_write_header(formatCtx, NULL);&#xA;    if (ret &lt; 0) {&#xA;        char error[255];&#xA;        av_strerror(ret, error, 255);&#xA;        fprintf(stderr, "Error occurred when opening output file: %s\n", error);&#xA;        return 1;&#xA;    }&#xA;&#xA;    if (frame_video)&#xA;        frame_video->pts = 0;&#xA;    for (;;) {&#xA;        // Compute video time from last added video frame&#xA;        time_video = ((double)frame_video->pts) * av_q2d(stream_video->time_base);&#xA;&#xA;        // Stop media if enough time&#xA;        if (!stream_video || time_video >= STREAM_DURATION)&#xA;            break;&#xA;&#xA;        // Add a video frame&#xA;        write_video_frame(formatCtx, stream_video, codecCtx_video);&#xA;&#xA;        // Increase frame pts according to time base&#xA;        frame_video->pts &#x2B;= av_rescale_q(1, codecCtx_video->time_base, stream_video->time_base);&#xA;    }&#xA;&#xA;    // Write media trailer&#xA;    av_write_trailer(formatCtx);&#xA;&#xA;    /* Close each codec. */&#xA;    if (stream_video)&#xA;        close_video(formatCtx, stream_video);&#xA;&#xA;    if (!(formatOut->flags &amp; AVFMT_NOFILE))&#xA;        /* Close the output file. */&#xA;        avio_close(formatCtx->pb);&#xA;&#xA;    /* free the stream */&#xA;    avformat_free_context(formatCtx);&#xA;&#xA;    return 0;&#xA;}&#xA;

    &#xA;

    What am I missing ? Which part give me this error ?

    &#xA;