Recherche avancée

Médias (91)

Autres articles (44)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

  • Dépôt de média et thèmes par FTP

    31 mai 2013, par

    L’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
    Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)

Sur d’autres sites (3162)

  • ffmpeg can't stream to remote client

    4 septembre 2014, par KFL

    I’m building a simple ffmpeg command line on my laptop to stream from its camera. The command line reads (verbose output at the botton) :

    host1> ffmpeg -v verbose \
                 -f dshow \
                 -i video="Camera":audio="Microphone" \
                 -r 30 -g 0 -vcodec h264 -acodec libmp3lame \
                 -tune zerolatency \
                 -preset ultrafast \
                 -f mpegts udp://12.34.56.78:12345

    Firstly, it works locally. I.e., I can view the output by using ffplay on the same host :

    host1> ffplay -hide_banner -v udp://12.34.56.78:12345

    Now what is NOT working is when I do this from another machine in the same network. It shows a nan progress :

    host2> ffplay -hide_banner -v udp://12.34.56.78:12345
       nan    :  0.000 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0  

    I used ncat to dump the raw content. But there’s no output :

    host2>\ncat\ncat -v -u 12.34.56.78 12345
    Ncat: Version 5.59BETA1 ( http://nmap.org/ncat )
    Ncat: Connected to 12.34.56.78:12345.
    (...and nothing happen...)

    Note that I can exclude firewall issues as I used ncat to communicate with each other across the wire using the same port and protocol (UDP). This works and they can chat to each other :

    host1> ncat -l -u -p 12345
    host2> ncat -u 12.34.56.78 12345

    Any hint ?

    I’m using Windows x64 with FFMPEG 64bit installed from here. Below is the Output of my ffmpeg command :

    C:\ffmpeg\bin>ffmpeg -v verbose -f dshow -i video="Integrated Camera":audio="Microphone (Realtek High Definition Audio)" -r 30 -g 0 -vcodec h264 -acodec libmp3lame -tune zerolatency -preset ultrafast -f mpegts udp://12.34.56.78:12345
    ffmpeg version N-66012-g97b8809 Copyright (c) 2000-2014 the FFmpeg developers
     built on Sep  1 2014 00:21:15 with gcc 4.8.3 (GCC)
     configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug -enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-decklink --enable-zlib
     libavutil      54.  7.100 / 54.  7.100
     libavcodec     56.  1.100 / 56.  1.100
     libavformat    56.  3.100 / 56.  3.100
     libavdevice    56.  0.100 / 56.  0.100
     libavfilter     5.  0.103 /  5.  0.103
     libswscale      3.  0.100 /  3.  0.100
     libswresample   1.  1.100 /  1.  1.100
     libpostproc    53.  0.100 / 53.  0.100
    Guessed Channel Layout for  Input Stream #0.1 : stereo
    Input #0, dshow, from 'video=Integrated Camera:audio=Microphone (Realtek High Definition Audio)':
     Duration: N/A, start: 171840.657000, bitrate: N/A
       Stream #0:0: Video: rawvideo, bgr24, 640x480, 30 fps, 30 tbr, 10000k tbn, 30 tbc
       Stream #0:1: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s
    Matched encoder 'libx264' for codec 'h264'.
    [graph 0 input from stream 0:0 @ 0000000000470aa0] w:640 h:480 pixfmt:bgr24 tb:1/10000000 fr:10000000/333333 sar:0/1 sws_param:flags=2
    [auto-inserted scaler 0 @ 0000000004326d00] w:iw h:ih flags:'0x4' interl:0
    [format @ 0000000004325a00] auto-inserting filter 'auto-inserted scaler 0' between the filter 'Parsed_null_0' and the filter 'format'
    [auto-inserted scaler 0 @ 0000000004326d00] w:640 h:480 fmt:bgr24 sar:0/1 -> w:640 h:480 fmt:yuv444p sar:0/1 flags:0x4
    No pixel format specified, yuv444p for H.264 encoding chosen.
    Use -pix_fmt yuv420p for compatibility with outdated media players.
    [graph 1 input from stream 0:1 @ 0000000000460c20] tb:1/44100 samplefmt:s16 samplerate:44100 chlayout:0x3
    [audio format for output stream 0:1 @ 00000000004601a0] auto-inserting filter 'auto-inserted resampler 0' between the filter 'Parsed_anull_0' and the filter 'audio format for output stream 0:1'
    [auto-inserted resampler 0 @ 00000000004604a0] ch:2 chl:stereo fmt:s16 r:44100Hz -> ch:2 chl:stereo fmt:s16p r:44100Hz
    [libx264 @ 000000000081bb20] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
    [libx264 @ 000000000081bb20] profile High 4:4:4 Intra, level 3.0, 4:4:4 8-bit
    [mpegts @ 000000000081abe0] muxrate VBR, pcr every 3 pkts, sdt every 200, pat/pmt every 40 pkts
    Output #0, mpegts, to 'udp://12.34.56.78:12345':
     Metadata:
       encoder         : Lavf56.3.100
       Stream #0:0: Video: h264 (libx264), yuv444p, 640x480, q=-1--1, 30 fps, 90k tbn, 30 tbc
       Metadata:
         encoder         : Lavc56.1.100 libx264
       Stream #0:1: Audio: mp3 (libmp3lame), 44100 Hz, stereo, s16p
       Metadata:
         encoder         : Lavc56.1.100 libmp3lame
    Stream mapping:
     Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
     Stream #0:1 -> #0:1 (pcm_s16le (native) -> mp3 (libmp3lame))
    Press [q] to stop, [?] for help
    *** 1 dup!
    frame=  241 fps= 31 q=28.0 Lsize=    3439kB time=00:00:08.03 bitrate=3506.4kbits/s dup=1 drop=0
    video:3035kB audio:125kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 8.791966%
    Input file #0 (video=Integrated Camera:audio=Microphone (Realtek High Definition Audio)):
     Input stream #0:0 (video): 240 packets read (221184000 bytes); 240 frames decoded;
     Input stream #0:1 (audio): 16 packets read (1411200 bytes); 16 frames decoded (352800 samples);
     Total: 256 packets (222595200 bytes) demuxed
    Output file #0 (udp://12.34.56.78:12345):
     Output stream #0:0 (video): 241 frames encoded; 241 packets muxed (3108187 bytes);
     Output stream #0:1 (audio): 306 frames encoded (352512 samples); 307 packets muxed (128313 bytes);
     Total: 548 packets (3236500 bytes) muxed
    [libx264 @ 000000000081bb20] frame I:241   Avg QP:27.97  size: 12897
    [libx264 @ 000000000081bb20] mb I  I16..4: 100.0%  0.0%  0.0%
    [libx264 @ 000000000081bb20] coded y,u,v intra: 26.3% 0.5% 0.0%
    [libx264 @ 000000000081bb20] i16 v,h,dc,p: 19% 28% 21% 31%
    [libx264 @ 000000000081bb20] kb/s:3095.29
    [dshow @ 0000000000467720] real-time buffer[Integrated Camera] too full (90% of size: 3041280)! frame dropped!
    Received signal 2: terminating. (I pressed CTRL-C)
  • 'pjsip-apps/Samples' Cannot functionally run vid_streamutil.c sample

    2 décembre 2020, par ShootingKIng

    Issue Description
After building[Build Varient=Debug, Build Config=x64] the latest pjproject-vs14 (retargeted to MSVS 2017, WINSDK=8.1, because my application works at these config) as per the build instruction on trac website. Successfully built pjsua and samples.

    


    I want to use only RTP + FFMPEG APIs (pjmedia) for my application from pjproject.

    


    My config_site.h

    


    #define PJMEDIA_HAS_VIDEO           1
#define PJMEDIA_HAS_FFMPEG          1


    


    FFMPEG (pre build from ffmpeg-N-100121-g052b4c3481-win64-gpl-shared.zip)

    


    But running the example, vid_streamutil.c did not work as expected (? Whats the normal expected behaviour ?).
It says

    


    ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)


    


    To Reproduce
Steps to reproduce the behavior :

    


      

    1. run vid_streamutil.exe with parameter : --codec=H264 --remote=127.0.0.1:5000 --play-file=test.avi --send-only
(test.avi file being a sample file)
    2. 


    


    Expected behavior
Get some RTP packets in wireshark while listening to ports 4000 and 5000 maybe ? I dont know whats the expected behaviour, documentation dosent say anything about this :(

    


    Logs/Screenshots
Couldn't catch anything on Wireshark.
Console log of vid_streamutil.exe is

    


    vid_streamutil.exe --codec=H264 --remote=127.0.0.1:5000 --send-only --play-file=test.avi
10:25:24.757 os_core_win32. !pjlib 2.10 for win32 initialized
 
10:25:24.840     wmme_dev.c  WMME found 12 devices:
10:25:24.858     wmme_dev.c   dev_id 0: Wave mapper  (in=2, out=2)
10:25:24.860     wmme_dev.c   dev_id 1: Headset Microphone (Arctis 7 Ch  (in=2, out=0)
10:25:24.860     wmme_dev.c   dev_id 2: Microphone (AMM Virtual Audio D  (in=2, out=0)
10:25:24.861     wmme_dev.c   dev_id 3: CABLE Output (VB-Audio Virtual   (in=2, out=0)
10:25:24.864     wmme_dev.c   dev_id 4: VoiceMeeter Output (VB-Audio Vo  (in=2, out=0)
10:25:24.864     wmme_dev.c   dev_id 5: Microphone (Realtek Audio)  (in=2, out=0)
10:25:24.865     wmme_dev.c   dev_id 6: Headphones (Arctis 7 Game)  (in=0, out=2)
10:25:24.866     wmme_dev.c   dev_id 7: Speakers / Headphones (Realtek   (in=0, out=2)
10:25:24.867     wmme_dev.c   dev_id 8: VoiceMeeter Input (VB-Audio Voi  (in=0, out=2)
10:25:24.884     wmme_dev.c   dev_id 9: Headset Earphone (Arctis 7 Chat  (in=0, out=2)
10:25:24.885     wmme_dev.c   dev_id 10: Speakers (AMM Virtual Audio Dev  (in=0, out=2)
10:25:24.887     wmme_dev.c   dev_id 11: Speakers (VB-Audio Virtual Cabl  (in=0, out=2)
10:25:24.887     wmme_dev.c  WMME initialized
10:25:24.890          pjlib  select() I/O Queue created (0000016B2C5F9608)
10:25:24.892 colorbar_dev.c  Colorbar video src initialized with 2 device(s):
10:25:24.915 colorbar_dev.c   0: Colorbar generator
10:25:24.935 colorbar_dev.c   1: Colorbar-active
10:25:24.956   avi_player.c  The AVI file has 2 streams.
10:25:24.976   avi_player.c  AVI file player 'test.avi' created with 2 media ports
10:25:24.994 vid_streamutil  Reading video stream 1280x720 H264 @30.00fps
10:25:25.033          rtp.c  pjmedia_rtp_session_init: ses=0000016B2C6793C8, default_pt=97, ssrc=0x294823
10:25:25.053 vstdec0000016B  Decoding channel created 720x480 I420<-H264 22/1(~22)fps
10:25:25.054          rtp.c  pjmedia_rtp_session_init: ses=0000016B2C62DF1C, default_pt=97, ssrc=0x294823
10:25:25.057 vstenc0000016B  Encoding channel created 1280x720 I420->H264 30/1(~30)fps
10:25:25.060 udp0000016B2C6  SO_RCVBUF set to 65536
10:25:25.061 udp0000016B2C6  SO_SNDBUF set to 65536
10:25:25.062   vid_stream.c  Video stream vstrm0000016B2C678508 created
10:25:25.086 vstenc0000016B  Encoder stream started
10:25:25.104 vstdec0000016B  Decoder stream paused
 [VID_STEAMUTIL] Stream is active, dir is send-only, sending to 127.0.0.1:5000
10:25:25.114 vid_streamutil  Sending 1280x720 H264 @30.00fps

Commands:
  q     Quit

Command: 10:25:25.147 ffmpeg_vid_cod !ffmpeg err -22: Invalid argument
10:25:25.222 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:25.237 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:25.250 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:25.251 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:25.287 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:25.311 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:25.316 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:25.341 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:25.353 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:25.369 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:25.386 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:25.387 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:25.411 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:25.415 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:25.452 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:25.469 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:25.486 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:25.496 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:25.506 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:25.527 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:25.547 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:25.568 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:25.576 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:25.604 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:25.606 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:25.627 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:25.648 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:25.668 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:25.686 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:25.711 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:25.731 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:25.752 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:25.769 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:25.778 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:25.804 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:25.827 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:25.833 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:25.868 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:25.886 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:25.895 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:25.921 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:25.923 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:25.943 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:25.963 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:25.983 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:26.003 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:26.019 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:26.038 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:26.041 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:26.060 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:26.081 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:26.086 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:26.109 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:26.130 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:26.138 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:26.162 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:26.183 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:26.202 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:26.220 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:26.228 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:26.260 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:26.281 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:26.312 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:26.321 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:26.321 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:26.322 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:26.323 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:26.323 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:26.324 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:26.324 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:26.333 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:26.353 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:26.353 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:26.381 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:26.401 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:26.414 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:26.429 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:26.449 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:26.469 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:26.480 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:26.510 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:26.531 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:26.553 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:26.571 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:26.594 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:26.615 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:26.636 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:26.653 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:26.671 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:26.678 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:26.714 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:26.736 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:26.754 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:26.777 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:26.781 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
10:25:26.816 ffmpeg_vid_cod  ffmpeg err -22: Invalid argument
10:25:26.836 vstenc0000016B  Codec encode_begin() error: Codec internal creation error (PJMEDIA_CODEC_EFAILED)
EOF while reading stdin, will quit now..

Commands:
  q     Quit

^C


    


    Desktop information :

    


      

    • OS, Distribution & Version : MS Windows 10 Home, 1909
    • 


    • PJSIP

        

      • version : 2.10
      • 


      • applied patch(es) : Nothing Extra
      • 


      • configure script params : Default
      • 


      • config_site.h contents : Aforementioned
      • 


      • related third party libraries & versions :
FFMPEG 4.3
      • 


      


    • 


    


    #define LIBAVCODEC_VERSION_MAJOR  58
#define LIBAVCODEC_VERSION_MINOR  91
#define LIBAVCODEC_VERSION_MICRO 100


    


    Additional context
I didnt change the default program that must except adding some printf's when program goes to exit label, without this it will be very difficult to know which part of the program jumped to exit : label. Anyways, here is the full code,

    


    vid_streamutil.c (with printfs)

    


    Any help is appreciated ^^'
Thanks.

    


  • vstack results in out of sync audio

    12 février 2021, par Arlo

    When I stack two videos using vstack, the result has audio sync issues for the bottom video.

    


    My starting point : four separate RTP tracks captured from a 2 person video chat :

    


     Actor1Video.webm,
 Actor1Audio.webm,
 Actor2Video.webm,
 Actor2Audio.webm


    


    I use vstack to put Actor1 on top and Actor2 on bottom :

    


    ffmpeg -i Actor1Video.webm -i Actor2Video.webm -i Actor1Audio.webm -i Actor2Audio.webm  -filter_complex "[1][0]scale2ref=oh*mdar:ih[2nd][ref];[ref][2nd]vstack=inputs=2[v];[2:a][3:a]join=inputs=2:channel_layout=stereo:map=0.0-FL|1.0-FR[a]" -c:a libfdk_aac -map "[v]" -map "[a]"  -vsync 2 ActorsCombined.mp4


    


    Here's the log :

    


    ffmpeg version git-2021-02-08-89f78dd Copyright (c) 2000-2021 the FFmpeg developers
  built with Apple clang version 11.0.3 (clang-1103.0.32.62)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/HEAD-89f78dd_6 --enable-shared --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libaom --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-libsnappy --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-demuxer=dash --disable-libjack --disable-indev=jack --enable-opencl --enable-videotoolbox --disable-htmlpages --enable-libfdk-aac --enable-nonfree
  libavutil      56. 64.100 / 56. 64.100
  libavcodec     58.121.100 / 58.121.100
  libavformat    58. 67.100 / 58. 67.100
  libavdevice    58. 11.103 / 58. 11.103
  libavfilter     7.103.100 /  7.103.100
  libswscale      5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc    55.  8.100 / 55.  8.100
Input #0, matroska,webm, from 'Actor1Video.webm':
  Metadata:
    title           : FFmpeg
    ENCODER         : Lavf58.29.100
  Duration: 447576:28:17.41, start: 1611273978.135000, bitrate: N/A
  Stream #0:0: Video: vp8, yuv420p(tv, bt470bg/unknown/unknown, progressive), 1280x720, SAR 1:1 DAR 16:9, 29.97 fps, 29.97 tbr, 1k tbn, 1k tbc (default)
    Metadata:
      DURATION        : 447576:28:17.408999
Input #1, matroska,webm, from 'Actor2Video.webm':
  Metadata:
    title           : FFmpeg
    ENCODER         : Lavf58.29.100
  Duration: 447576:28:17.45, start: 1611273978.257000, bitrate: N/A
  Stream #1:0: Video: vp8, yuv420p(tv, bt470bg/unknown/unknown, progressive), 320x180, SAR 1:1 DAR 16:9, 29.97 fps, 29.97 tbr, 1k tbn, 1k tbc (default)
    Metadata:
      DURATION        : 447576:28:17.453999
Input #2, matroska,webm, from 'Actor1Audio.webm':
  Metadata:
    title           : FFmpeg
    ENCODER         : Lavf58.29.100
  Duration: 447576:28:17.49, start: 1611273978.112000, bitrate: N/A
  Stream #2:0: Audio: opus, 48000 Hz, stereo, fltp (default)
    Metadata:
      DURATION        : 447576:28:17.492000
Input #3, matroska,webm, from 'Actor2Audio.webm':
  Metadata:
    title           : FFmpeg
    ENCODER         : Lavf58.29.100
  Duration: 447576:28:17.45, start: 1611273978.208000, bitrate: N/A
  Stream #3:0: Audio: opus, 48000 Hz, stereo, fltp (default)
    Metadata:
      DURATION        : 447576:28:17.447999
File 'ActorsCombined.mp4' already exists. Overwrite? [y/N] y
Stream mapping:
  Stream #0:0 (vp8) -> scale2ref:ref
  Stream #1:0 (vp8) -> scale2ref:default
  Stream #2:0 (opus) -> join:input0
  Stream #3:0 (opus) -> join:input1
  vstack -> Stream #0:0 (libx264)
  join -> Stream #0:1 (libfdk_aac)
Press [q] to stop, [?] for help
[libx264 @ 0x7ff0c1831a00] using SAR=1/1
[libx264 @ 0x7ff0c1831a00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x7ff0c1831a00] profile High, level 4.0, 4:2:0, 8-bit
[libx264 @ 0x7ff0c1831a00] 264 - core 161 r3043 59c0609 - H.264/MPEG-4 AVC codec - Copyleft 2003-2021 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'ActorsCombined.mp4':
  Metadata:
    title           : FFmpeg
    encoder         : Lavf58.67.100
  Stream #0:0: Video: h264 (avc1 / 0x31637661), yuv420p(progressive), 1280x1440 [SAR 1:1 DAR 8:9], q=2-31, 29.97 fps, 30k tbn (default)
    Metadata:
      encoder         : Lavc58.121.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
  Stream #0:1: Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 139 kb/s (default)
    Metadata:
      encoder         : Lavc58.121.100 libfdk_aac
frame=36626 fps= 15 q=-1.0 Lsize=  389420kB time=00:21:59.38 bitrate=2417.9kbits/s dup=0 drop=34791 speed=0.535x    
video:365641kB audio:22446kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.343645%
[libx264 @ 0x7ff0c1831a00] frame I:158   Avg QP:15.51  size:107833
[libx264 @ 0x7ff0c1831a00] frame P:9670  Avg QP:18.71  size: 25824
[libx264 @ 0x7ff0c1831a00] frame B:26798 Avg QP:24.90  size:  4018
[libx264 @ 0x7ff0c1831a00] consecutive B-frames:  0.6%  5.2%  0.6% 93.5%
[libx264 @ 0x7ff0c1831a00] mb I  I16..4: 13.2% 75.5% 11.3%
[libx264 @ 0x7ff0c1831a00] mb P  I16..4:  1.2%  3.6%  0.2%  P16..4: 43.1% 10.4%  5.9%  0.0%  0.0%    skip:35.6%
[libx264 @ 0x7ff0c1831a00] mb B  I16..4:  0.1%  0.1%  0.0%  B16..8: 28.3%  0.7%  0.1%  direct: 2.3%  skip:68.5%  L0:45.1% L1:53.6% BI: 1.3%
[libx264 @ 0x7ff0c1831a00] 8x8 transform intra:71.6% inter:85.4%
[libx264 @ 0x7ff0c1831a00] coded y,uvDC,uvAC intra: 50.4% 77.2% 47.8% inter: 6.9% 17.0% 3.8%
[libx264 @ 0x7ff0c1831a00] i16 v,h,dc,p: 37% 28% 14% 22%
[libx264 @ 0x7ff0c1831a00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 17% 25%  4%  6%  7%  5%  6%  5%
[libx264 @ 0x7ff0c1831a00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 35% 24% 16%  4%  6%  5%  4%  4%  2%
[libx264 @ 0x7ff0c1831a00] i8c dc,h,v,p: 60% 16% 17%  6%
[libx264 @ 0x7ff0c1831a00] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x7ff0c1831a00] ref P L0: 63.1%  9.9% 20.5%  6.6%
[libx264 @ 0x7ff0c1831a00] ref B L0: 90.0%  8.9%  1.1%
[libx264 @ 0x7ff0c1831a00] ref B L1: 94.7%  5.3%
[libx264 @ 0x7ff0c1831a00] kb/s:2270.36


    


    The resulting file begins in sync, but after a few minutes the bottom video is suddenly out of sync with its audio.

    


    The strange thing is, if I merge these videos with their audio separately, without using vstack, there's no sync issue :

    


    ffmpeg -i Actor1Video.webm -i Actor1Audio.webm -vsync 2 Actor1.mp4 &&
ffmpeg -i Actor2Video.webm -i Actor2Audio.webm -vsync 2 Actor2.mp4


    


    When I do the above, the two videos are perfectly in sync. But if I take these two mp4s and stack them, I have the same issue where the bottom video goes out of sync.

    


    Any suggestions ?