Recherche avancée

Médias (1)

Mot : - Tags -/book

Autres articles (50)

  • 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

  • Soumettre améliorations et plugins supplémentaires

    10 avril 2011

    Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
    Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...)

  • Installation en mode standalone

    4 février 2011, par

    L’installation de la distribution MediaSPIP se fait en plusieurs étapes : la récupération des fichiers nécessaires. À ce moment là deux méthodes sont possibles : en installant l’archive ZIP contenant l’ensemble de la distribution ; via SVN en récupérant les sources de chaque modules séparément ; la préconfiguration ; l’installation définitive ;
    [mediaspip_zip]Installation de l’archive ZIP de MediaSPIP
    Ce mode d’installation est la méthode la plus simple afin d’installer l’ensemble de la distribution (...)

Sur d’autres sites (7971)

  • ffmpeg conversion results in different number of frames. How to fix corrupted frames ?

    19 mai 2022, par Mike Azatov

    I have used ffmpeg -i original_video.mp4 -vcodec libx265 -crf 28 -vsync 0 -vf scale=800:-1 -preset faster small_video.mp4 for awhile without problem to make a smaller sized video that is completely in sync with the original one.

    


    However, I came across one that after conversion has 44 frames less. My guess is this happens because there are 44 corrupted frames in the original one that gets discarded. If that is the case I would like to either "correct" the original one and then proceed with the conversion the same old way OR/AND convert so the corrupted frames are not skipped but are replaced with the good ones so the videos are still in full sync.

    


    Below is the log from conversion :

    


    ffmpeg -i original_video.ts -vcodec libx265 -crf 28 -vsync 0 -vf scale=800:-1 -preset faster small_video.mp4
ffmpeg version 2021-08-01-git-1f58503013-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 10.3.0 (Rev5, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libglslang --enable-vulkan --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      57.  3.100 / 57.  3.100
  libavcodec     59.  3.102 / 59.  3.102
  libavformat    59.  4.101 / 59.  4.101
  libavdevice    59.  0.100 / 59.  0.100
  libavfilter     8.  1.103 /  8.  1.103
  libswscale      6.  0.100 /  6.  0.100
  libswresample   4.  0.100 /  4.  0.100
  libpostproc    56.  0.100 / 56.  0.100
[h264 @ 000001cd26f14d40] mmco: unref short failure
    Last message repeated 1 times
[h264 @ 000001cd26f14d40] number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one
[h264 @ 000001cd26f14d40] mmco: unref short failure
    Last message repeated 1 times
[h264 @ 000001cd26f14d40] number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one
[h264 @ 000001cd26f14d40] mmco: unref short failure
    Last message repeated 1 times
[h264 @ 000001cd26f14d40] number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one
[h264 @ 000001cd26f14d40] Increasing reorder buffer to 2
Input #0, mpegts, from 'original_video.ts':
  Duration: 01:44:24.42, start: 1.560000, bitrate: 10059 kb/s
  Program 1
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
  Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn
  Stream #0:1[0x101](rus): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 192 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> hevc (libx265))
  Stream #0:1 -> #0:1 (mp2 (native) -> aac (native))
Press [q] to stop, [?] for help
[h264 @ 000001cd28f81bc0] mmco: unref short failure
    Last message repeated 1 times
[h264 @ 000001cd28f81bc0] number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one
[h264 @ 000001cd28f82680] mmco: unref short failure
    Last message repeated 1 times
[h264 @ 000001cd28f82680] number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one
[h264 @ 000001cd28dab1c0] mmco: unref short failure
    Last message repeated 1 times
[h264 @ 000001cd28dab1c0] number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one
x265 [info]: HEVC encoder version 3.5+11-c8905a745
x265 [info]: build info [Windows][GCC 10.3.0][64 bit] 8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x265 [info]: Main profile, Level-3 (Main tier)
x265 [info]: Thread pool created using 12 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 3 / wpp(8 rows)
x265 [warning]: Source height < 720p; disabling lookahead-slices
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : hex / 57 / 2 / 2
x265 [info]: Keyframe min / max / scenecut / bias  : 25 / 250 / 40 / 5.00
x265 [info]: Lookahead / bframes / badapt        : 15 / 4 / 0
x265 [info]: b-pyramid / weightp / weightb       : 1 / 1 / 0
x265 [info]: References / ref-limit  cu / depth  : 2 / on / on
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 2 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : CRF-28.0 / 0.60
x265 [info]: tools: rd=2 psy-rd=2.00 early-skip rskip mode=1 signhide tmvp
x265 [info]: tools: fast-intra strong-intra-smoothing deblock sao
Output #0, mp4, to 'small_video.mp4':
  Metadata:
    encoder         : Lavf59.4.101
  Stream #0:0: Video: hevc (hev1 / 0x31766568), yuv420p(tv, bt709, top coded first (swapped)), 800x450 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 12800 tbn
    Metadata:
      encoder         : Lavc59.3.102 libx265
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
  Stream #0:1(rus): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s
    Metadata:
      encoder         : Lavc59.3.102 aac
[h264 @ 000001cd273dd4c0] mmco: unref short failure53:36.81 bitrate= 770.6kbits/s speed=2.46x
    Last message repeated 1 times
[h264 @ 000001cd273dd4c0] number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one
[h264 @ 000001cd26f52400] mmco: unref short failure
    Last message repeated 1 times
[h264 @ 000001cd26f52400] number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one
[h264 @ 000001cd26f52400] number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one
[mp4 @ 000001cd26fce940] Non-monotonous DTS in output stream 0:0; previous: 62929920, current: 62929920; changing to 62929921. This may result in incorrect timestamps in the output file.
[h264 @ 000001cd28dab1c0] mmco: unref short failure:23:07.54 bitrate= 774.1kbits/s speed= 2.5x
    Last message repeated 1 times
[h264 @ 000001cd28dab1c0] number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one
[h264 @ 000001cd26f0e6c0] mmco: unref short failure
    Last message repeated 1 times
[h264 @ 000001cd28f82280] mmco: unref short failure:23:10.63 bitrate= 773.6kbits/s speed= 2.5x
    Last message repeated 1 times
[h264 @ 000001cd28f82280] number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one
[h264 @ 000001cd26f52400] mmco: unref short failure
    Last message repeated 1 times
[h264 @ 000001cd26f52000] number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one
original_video.ts: corrupt decoded frame in stream 0
    Last message repeated 1 times
[mp4 @ 000001cd26fce940] Non-monotonous DTS in output stream 0:0; previous: 64523776, current: 64523776; changing to 64523777. This may result in incorrect timestamps in the output file.
frame=156566 fps= 68 q=35.9 Lsize=  598731kB time=01:44:24.44 bitrate= 783.0kbits/s speed=2.72x
video:492857kB audio:101295kB subtitle:0kB other streams:0kB global headers:2kB muxing overhead: 0.770682%
x265 [info]: frame I:    688, Avg QP:27.50  kb/s: 4942.18
x265 [info]: frame P:  30767, Avg QP:28.35  kb/s: 2054.94
x265 [info]: frame B: 125111, Avg QP:34.64  kb/s: 273.26
x265 [info]: Weighted P-Frames: Y:7.7% UV:5.6%
x265 [info]: consecutive B-frames: 0.4% 0.1% 0.1% 0.1% 99.3%

encoded 156566 frames in 2300.41s (68.06 fps), 643.89 kb/s, Avg QP:33.37
[aac @ 000001cd27540480] Qavg: 462.740


    


  • Transcoding hevc to h264 using GPU and scale_npp

    19 mai 2022, par JanZg

    I am trying to transcode hevc to h264 using GPU. Default input is 10 bit hevc but I also try it on 8 bit hevc. I use hevc_cuvid decoder and h264_nvenc encoder. While scaling using CPU its correct. I was also using scale_npp=w=1280:h=720:format=yuv420p and scale_cuda - > no result.

    


    Working command without using GPU to scale :

    


    /usr/local/bin/ffmpeg -y -v warning -c:v hevc_cuvid -an -sn -dn -reconnect_at_eof 1 -reconnect_streamed 1 -reconnect_on_network_error 1 -i http://1.2.3.4:8794 -c:v h264_nvenc -pix_fmt yuv420p -vf scale=1280:720 test_hevc.mp4


    


    But when I try to scale using GPU for example scale_cuda or scale_npp I get this error :

    


    Command :

    


    /usr/local/bin/ffmpeg -y -v warning -c:v hevc_cuvid -an -sn -dn -reconnect_at_eof 1 -reconnect_streamed 1 -reconnect_on_network_error 1 -i http://1.2.3.4:8794 -c:v h264_nvenc -pix_fmt yuv420p -vf scale_npp=1280:720 test_hevc.mp4


    


    Outputs :

    


    Error output with trace log level

    


    [graph 0 input from stream 0:0 @ 0x56164efb6b40] w:3840 h:2160 pixfmt:p010le tb:1/90000 fr:50/1 sar:1/1
[format @ 0x56164efb7940] Setting ‘pix_fmts’ to value ‘yuv420p’
[auto_scale_0 @ 0x56164efb9940] w:iw h:ih flags:’’ interl:0
[Parsed_scale_npp_0 @ 0x56164efb58c0] auto-inserting filter ‘auto_scale_0’ between the filter ‘graph 0 input from stream 0:0’ and the filter ‘Parsed_scale_npp_0’
Impossible to convert between the formats supported by the filter ‘graph 0 input from stream 0:0’ and the filter ‘auto_scale_0’
Error reinitializing filters!
Failed to inject frame into filter network: Function not implemented
Error while processing the decoded data for stream #0:0
[AVIOContext @ 0x56164ea41300] Statistics: 0 seeks, 0 writeouts
[AVIOContext @ 0x56164ea39c80] Statistics: 15357720 bytes read, 0 seeks
[AVHWDeviceContext @ 0x56164ea68480] Calling cu->cuCtxDestroy(hwctx->cuda_ctx)
Conversion failed!


    


    Full output with warning log level

    


    [hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[hevc @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x555bd6e9f0c0] Error parsing NAL unit #2.
[mpegts @ 0x555bd6e85dc0] Could not find codec parameters for stream 0 (Video: hevc (HEVC / 0x43564548), none): unspecified size
Consider increasing the value for the ‘analyzeduration’ (0) and ‘probesize’ (5000000) options
[NULL @ 0x555bd6e9f0c0] PPS id out of range: 0
Last message repeated 66 times
Impossible to convert between the formats supported by the filter ‘graph 0 input from stream 0:0’ and the filter ‘auto_scale_0’
Error reinitializing filters!
Failed to inject frame into filter network: Function not implemented
Error while processing the decoded data for stream #0:0

Additional informations:

My FFmpeg Version below:

ffmpeg version N-103630-g06de593303 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 8 (Debian 8.3.0-6)
configuration: --prefix=/usr/local --enable-libtwolame --enable-libzvbi --enable-nonfree --enable-cuda-nvcc --nvccflags=’-gencode arch=compute_75,code=sm_75 -O2’ --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64
libavutil 57. 5.100 / 57. 5.100
libavcodec 59. 7.103 / 59. 7.103
libavformat 59. 5.100 / 59. 5.100
libavdevice 59. 0.101 / 59. 0.101
libavfilter 8. 9.100 / 8. 9.100
libswscale 6. 1.100 / 6. 1.100
libswresample 4. 0.100 / 4. 0.100


    


    GPU : Tesla T4

    


    System : Linux tgpu 4.19.0-17-amd64 #1 SMP Debian 4.19.194-3 (2021-07-18) x86_64 GNU/Linux

    


    Nvcc version : nvcc : NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2020 NVIDIA Corporation
Built on Mon_Oct_12_20:09:46_PDT_2020
Cuda compilation tools, release 11.1, V11.1.105
Build cuda_11.1.TC455_06.29190527_0

    


    Is it possible to scale hevc using GPU and how to fix this ?
Thank You in advance.

    


  • ffmpeg Undefined referance to several swr functions [duplicate]

    21 mai 2022, par user19068953

    I'm trying to staticly link ffmpeg to my project, i downloaded the ffmpeg source files from a github repo because it had pre writen cmake files, which i needed for this exact problem but it changed nothing (https://github.com/Pawday/ffmpeg-cmake). I edited the file a little and posted it below, and added them to lib/ffmpeg in my project directory. I first ran ./configure, then ran make, then make install like the install guide suggested. Then i ran cmake . followed by make. It compiled just fine and i ran a test without any errors :

    


    extern "C"{&#xA;    #include <libavcodec></libavcodec>avcodec.h>&#xA;}&#xA;&#xA;#include <iostream>&#xA;int main(int argc, char* argv[]) {&#xA;    if (argc &lt; 2) {&#xA;        std::cout &lt;&lt; "provide a filename" &lt;&lt; std::endl;&#xA;        return -1;&#xA;        AVPacket *pkt = av_packet_alloc();&#xA;    }&#xA;}&#xA;</iostream>

    &#xA;

    I was following the examples that ffmpeg provides, so i added this :

    &#xA;

    const AVCodec *codec = avcodec_find_decoder(AV_CODEC_ID_MPEG1VIDEO);&#xA;

    &#xA;

    But now i have this huge error :

    &#xA;

    /usr/bin/ld: /usr/local/lib/libavcodec.a(opusdec.o): in function &#xA;&#xA;`opus_decode_subpacket&#x27;:&#xA;/home/t/Desktop/Code/lib/ffmpeg/libavcodec/opusdec.c:346: undefined reference to `swr_is_initialized&#x27;&#xA;/usr/bin/ld: /usr/local/lib/libavcodec.a(opusdec.o): in function `opus_decode_frame&#x27;:&#xA;/home/t/Desktop/Code/lib/ffmpeg/libavcodec/opusdec.c:188: undefined reference to `swr_is_initialized&#x27;&#xA;/usr/bin/ld: /usr/local/lib/libavcodec.a(opusdec.o): in function `opus_init_resample&#x27;:&#xA;/home/t/Desktop/Code/lib/ffmpeg/libavcodec/opusdec.c:136: undefined reference to `swr_init&#x27;&#xA;/usr/bin/ld: /home/t/Desktop/Code/lib/ffmpeg/libavcodec/opusdec.c:142: undefined reference to `swr_convert&#x27;&#xA;/usr/bin/ld: /usr/local/lib/libavcodec.a(opusdec.o): in function `opus_decode_frame&#x27;:&#xA;/home/t/Desktop/Code/lib/ffmpeg/libavcodec/opusdec.c:202: undefined reference to `swr_convert&#x27;&#xA;/usr/bin/ld: /usr/local/lib/libavcodec.a(opusdec.o): in function `opus_flush_resample&#x27;:&#xA;/home/t/Desktop/Code/lib/ffmpeg/libavcodec/opusdec.c:90: undefined reference to `swr_convert&#x27;&#xA;/usr/bin/ld: /usr/local/lib/libavcodec.a(opusdec.o): in function `opus_decode_subpacket&#x27;:&#xA;/home/t/Desktop/Code/lib/ffmpeg/libavcodec/opusdec.c:379: undefined reference to `swr_close&#x27;&#xA;/usr/bin/ld: /home/t/Desktop/Code/lib/ffmpeg/libavcodec/opusdec.c:346: undefined reference to `swr_is_initialized&#x27;&#xA;/usr/bin/ld: /usr/local/lib/libavcodec.a(opusdec.o): in function `opus_decode_flush&#x27;:&#xA;/home/t/Desktop/Code/lib/ffmpeg/libavcodec/opusdec.c:582: undefined reference to `swr_close&#x27;&#xA;/usr/bin/ld: /usr/local/lib/libavcodec.a(opusdec.o): in function `opus_decode_close&#x27;:&#xA;/home/t/Desktop/Code/lib/ffmpeg/libavcodec/opusdec.c:607: undefined reference to `swr_free&#x27;&#xA;/usr/bin/ld: /usr/local/lib/libavcodec.a(opusdec.o): in function `opus_decode_init&#x27;:&#xA;/home/t/Desktop/Code/lib/ffmpeg/libavcodec/opusdec.c:660: undefined reference to `swr_alloc&#x27;&#xA;collect2: error: ld returned 1 exit status&#xA;make[2]: *** [CMakeFiles/Interview.dir/build.make:122: bin/Interview] Error 1&#xA;make[1]: *** [CMakeFiles/Makefile2:420: CMakeFiles/Interview.dir/all] Error 2&#xA;make: *** [Makefile:84: all] Error 2&#xA;

    &#xA;

    I find some questions with similar issues to no avail :

    &#xA;

    FFmpeg seems to be version conflict&#xA;Linking libavcodec and libavformat : Undefined references

    &#xA;

    NOTE : previously i tried downloading ffmpeg with home-brew and pkg-config maybe that is causing an error, but my guess is my cmake file is faulty.

    &#xA;

    project/CMakeLists :

    &#xA;

    cmake_minimum_required(VERSION 3.14)&#xA;&#xA;project(Interview C CXX)&#xA;set(CMAKE_CXX_STANDARD 14)&#xA;&#xA;SET( EXECUTABLE_OUTPUT_PATH ${dir}/bin )&#xA;set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin )&#xA;set( CMAKE_C_FLAGS "-lswresample")&#xA;&#xA;add_subdirectory(lib/ffmpeg)&#xA;&#xA;add_definitions(-DGL_SILENCE_DEPRECATION)&#xA;&#xA;list(APPEND SOURCES&#xA;    src/main.cpp&#xA;    src/vipch.h&#xA;    src/VideoDecoder.cpp&#xA;    src/VideoDecoder.h&#xA;    src/Application.cpp&#xA;    src/Application.h&#xA;    #src/OpenGLRenderer.cpp&#xA;    #src/OpenGLRenderer.h&#xA;    #src/Layer.h&#xA;    #src/Layer.cpp&#xA;)&#xA;&#xA;find_path(AVCODEC_INCLUDE_DIR libavcodec/avcodec.h)&#xA;find_library(AVCODEC_LIBRARY avcodec)&#xA;&#xA;find_path(AVFORMAT_INCLUDE_DIR libavformat/avformat.h)&#xA;find_library(AVFORMAT_LIBRARY avformat)&#xA;&#xA;find_path(AVDEVICE_INCLUDE_DIR libavdevice/avdevice.h)&#xA;find_library(AVDEVICE_LIBRARY avdevice)&#xA;&#xA;find_path(AVCODEC_INCLUDE_DIR libavcodec/avcodec.h)&#xA;find_library(AVCODEC_LIBRARY avcodec)&#xA;&#xA;set(THREADS_PREFER_PTHREAD_FLAG ON)&#xA;find_package(Threads REQUIRED)&#xA;&#xA;add_executable(Interview src/main.cpp src/Application.cpp src/Application.h ${SOURCES})&#xA;&#xA;target_link_libraries(Interview PRIVATE Threads::Threads)&#xA;&#xA;if(APPLE)&#xA;    list(APPEND EXTRA_LIBS&#xA;        "-framework OpenGL"&#xA;    )&#xA;&#xA;    configure_file(&#xA;        ${CMAKE_CURRENT_SOURCE_DIR}/assets/MacOSXBundleInfo.plist.in&#xA;        ${CMAKE_CURRENT_BINARY_DIR}/assets/MacOSXBundleInfo.plist&#xA;    )&#xA;&#xA;    set_target_properties(Interview PROPERTIES&#xA;        MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/assets/MacOSXBundleInfo.plist&#xA;    )&#xA;&#xA;elseif(WIN32)&#xA;    list(APPEND EXTRA_LIBS&#xA;        "-lglu32 -lopengl32"&#xA;    )&#xA;    set(CMAKE_EXE_LINKER_FLAGS "-std=gnu99 -static -static-libgcc -static-libstdc&#x2B;&#x2B; -mwindows")&#xA;&#xA;endif()&#xA;&#xA;list(APPEND EXTRA_LIBS&#xA;"-lGL -lGLU -lX11 -lz -lva -lswresample"&#xA;)&#xA;&#xA;find_package(OpenGL REQUIRED)&#xA;find_package(GLEW REQUIRED)&#xA;&#xA;#target_link_libraries(Interview ${CORELIBS})&#xA;&#xA;&#xA;target_include_directories(Interview PRIVATE &#xA;    ${AVCODEC_INCLUDE_DIR} &#xA;    ${AVFORMAT_INCLUDE_DIR}&#xA;    ${AVUTIL_INCLUDE_DIR}&#xA;    ${AVDEVICE_INCLUDE_DIR} &#xA;    ${OPENGL_INCLUDE_DIR}&#xA;    ${GLEW_INCLUDE_DIRS}&#xA;)&#xA;&#xA;target_link_libraries(Interview PRIVATE &#xA;    ${AVCODEC_LIBRARY} &#xA;    ${AVFORMAT_LIBRARY} &#xA;    ${AVUTIL_LIBRARY} &#xA;    ${AVDEVICE_LIBRARY} &#xA;    ${OPENGL_LIBRARY}&#xA;    ${GLEW_LIBRARIES}&#xA;)&#xA;

    &#xA;

    NOTE : i previously had a really similar error with pthread but with some fixes to cmake and installing pthread i fixed it.

    &#xA;

    project/lib/ffmpeg/CMakeLists :

    &#xA;

    cmake_minimum_required(VERSION 3.15)&#xA;&#xA;project(FFMPEG C CXX)&#xA;&#xA;add_library(ffmpeg_config INTERFACE)&#xA;&#xA;#TODO:[cmake] COMMON DEFINES (config.h)&#xA;# create list with all that and then pick required from that list in each target&#xA;target_compile_definitions(ffmpeg_config INTERFACE FFMPEG_CONFIGURATION="")&#xA;target_compile_definitions(ffmpeg_config INTERFACE FFMPEG_DATADIR="")&#xA;target_compile_definitions(ffmpeg_config INTERFACE AVCONV_DATADIR="")&#xA;target_compile_definitions(ffmpeg_config INTERFACE FFMPEG_LICENSE="")&#xA;&#xA;target_compile_definitions(ffmpeg_config INTERFACE CC_IDENT="")&#xA;&#xA;target_compile_definitions(ffmpeg_config INTERFACE HAVE_THREADS=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE HAVE_PTHREADS=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE HAVE_W32THREADS=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE HAVE_OS2THREADS=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE HAVE_ISNAN=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE HAVE_MMXEXT=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE HAVE_MMX2=HAVE_MMXEXT)&#xA;target_compile_definitions(ffmpeg_config INTERFACE HAVE_MMX2=HAVE_MMXEXT)&#xA;target_compile_definitions(ffmpeg_config INTERFACE HAVE_MMX_INLINE=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE HAVE_MMX=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE HAVE_AV_CONFIG_H=1)&#xA;target_compile_definitions(ffmpeg_config INTERFACE HAVE_ALTIVEC=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE HAVE_MMXEXT_INLINE=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE HAVE_NEON=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE HAVE_AMD3DNOW_INLINE=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE HAVE_X86ASM=0)&#xA;if(WIN32)&#xA;    target_compile_definitions(ffmpeg_config INTERFACE HAVE_MKSTEMP=0)&#xA;else()&#xA;    target_compile_definitions(ffmpeg_config INTERFACE HAVE_MKSTEMP=1)&#xA;endif()&#xA;&#xA;&#xA;#TODO:[cmake] detect each function and set to 0 if missing (they are in math.h)&#xA;target_compile_definitions(ffmpeg_config INTERFACE HAVE_CBRT=1)&#xA;target_compile_definitions(ffmpeg_config INTERFACE HAVE_CBRTF=1)&#xA;target_compile_definitions(ffmpeg_config INTERFACE HAVE_COPYSIGN=1)&#xA;target_compile_definitions(ffmpeg_config INTERFACE HAVE_ERF=1)&#xA;target_compile_definitions(ffmpeg_config INTERFACE HAVE_HYPOT=1)&#xA;target_compile_definitions(ffmpeg_config INTERFACE HAVE_RINT=1)&#xA;target_compile_definitions(ffmpeg_config INTERFACE HAVE_LRINT=1)&#xA;target_compile_definitions(ffmpeg_config INTERFACE HAVE_LRINTF=1)&#xA;target_compile_definitions(ffmpeg_config INTERFACE HAVE_ROUND=1)&#xA;target_compile_definitions(ffmpeg_config INTERFACE HAVE_ROUNDF=1)&#xA;target_compile_definitions(ffmpeg_config INTERFACE HAVE_TRUNC=1)&#xA;target_compile_definitions(ffmpeg_config INTERFACE HAVE_TRUNCF=1)&#xA;&#xA;&#xA;target_link_libraries(ffmpeg_config INTERFACE ffmpeg_compat)&#xA;&#xA;include (TestBigEndian)&#xA;TEST_BIG_ENDIAN(IS_BIG_ENDIAN)&#xA;if(IS_BIG_ENDIAN)&#xA;    target_compile_definitions(ffmpeg_config INTERFACE HAVE_BIGENDIAN=1)&#xA;else()&#xA;    target_compile_definitions(ffmpeg_config INTERFACE HAVE_BIGENDIAN=0)&#xA;endif()&#xA;&#xA;target_compile_definitions(ffmpeg_config INTERFACE av_restrict=)&#xA;&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_THIS_YEAR=2021)&#xA;&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_MEMORY_POISONING=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_FRAME_THREAD_ENCODER=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_MEMORY_POISONING=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_GRAY=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_ERROR_RESILIENCE=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_MPEGVIDEODEC=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_SMALL=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_H264_D3D11VA_HWACCEL=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_H264_DXVA2_HWACCEL=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_H264_NVDEC_HWACCEL=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_H264_VAAPI_HWACCEL=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_H264_VIDEOTOOLBOX_HWACCEL=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_H264_VDPAU_HWACCEL=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_NETWORK=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_XVMC=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_FORMAT_FILTER=1)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_PNG_DECODER=1)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_APNG_DECODER=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_INFLATE_WRAPPER=1)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_DEFLATE_WRAPPER=1)&#xA;&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_AVUTIL=1)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_AVCODEC=1)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_AVFORMAT=1)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_AVDEVICE=1)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_SWSCALE=1)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_SWRESAMPLE=1)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_POSTPROC=1)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_AVFILTER=1)&#xA;&#xA;&#xA;&#xA;#CONFIG MUXERS&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_H264_MUXER=1)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE2_MUXER=1)&#xA;&#xA;#CONFIG DEMUXERS&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE2_DEMUXER=1)&#xA;&#xA;# look at the end of libavformat/img2dec.c file&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_BMP_PIPE_DEMUXER=1)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_CRI_PIPE_DEMUXER=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_DDS_PIPE_DEMUXER=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_DPX_PIPE_DEMUXER=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_EXR_PIPE_DEMUXER=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_GEM_PIPE_DEMUXER=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_GIF_PIPE_DEMUXER=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_J2K_PIPE_DEMUXER=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_JPEG_PIPE_DEMUXER=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_JPEGLS_PIPE_DEMUXER=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PAM_PIPE_DEMUXER=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PBM_PIPE_DEMUXER=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PCX_PIPE_DEMUXER=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PGM_PIPE_DEMUXER=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PGMYUV_PIPE_DEMUXER=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PGX_PIPE_DEMUXER=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PHOTOCD_PIPE_DEMUXER=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PICTOR_PIPE_DEMUXER=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PNG_PIPE_DEMUXER=1)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PPM_PIPE_DEMUXER=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PSD_PIPE_DEMUXER=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_QDRAW_PIPE_DEMUXER=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_SGI_PIPE_DEMUXER=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_SVG_PIPE_DEMUXER=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_TIFF_PIPE_DEMUXER=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_WEBP_PIPE_DEMUXER=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_XBM_PIPE_DEMUXER=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_XPM_PIPE_DEMUXER=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_XWD_PIPE_DEMUXER=0)&#xA;&#xA;&#xA;#CONFIG PROTOCOLS&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_FILE_PROTOCOL=1)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_PIPE_PROTOCOL=1)&#xA;&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_ZLIB=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE CONFIG_SWSCALE_ALPHA=0)&#xA;&#xA;target_compile_definitions(ffmpeg_config INTERFACE ARCH_X86_32=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE ARCH_X86_64=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE ARCH_AARCH64=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE ARCH_ARM=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE ARCH_PPC=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE ARCH_X86=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE ARCH_MIPS=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE ARCH_ALPHA=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE ARCH_LOONGARCH=0)&#xA;target_compile_definitions(ffmpeg_config INTERFACE ARCH_LOONGARCH64=0)&#xA;&#xA;target_compile_definitions(ffmpeg_config INTERFACE SWS_MAX_FILTER_SIZE=256)&#xA;&#xA;#_________________________WARNINGS__________________________________________&#xA;#TODO[cmake]: set it for all targets individually or remove for WARNING HELL&#xA;if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")&#xA;    add_compile_options("-w")&#xA;endif()&#xA;&#xA;if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")&#xA;    add_compile_options("-w")&#xA;endif()&#xA;&#xA;if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")&#xA;    cmake_policy(SET CMP0092 NEW) #cmake disable std MSVC warnings in CMAKE_C_FLAGS&#xA;    #CMAKE_DEPFILE_FLAGS_C var in windows contains only /showIncludes and produce include tree&#xA;    set(CMAKE_DEPFILE_FLAGS_C "") #erase it&#xA;    add_compile_options("/w")&#xA;endif()&#xA;&#xA;file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/include/config.h "//cmake config will define all that")&#xA;target_include_directories(ffmpeg_config INTERFACE ${CMAKE_CURRENT_BINARY_DIR}/include)&#xA;&#xA;#TODO[cmake]: resolve config_components.h&#xA;file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/include/config_components.h "//")&#xA;target_include_directories(ffmpeg_config INTERFACE ${CMAKE_CURRENT_BINARY_DIR}/include)&#xA;&#xA;add_subdirectory(compat)&#xA;add_subdirectory(libavutil)&#xA;add_subdirectory(libavcodec)&#xA;add_subdirectory(libavformat)&#xA;add_subdirectory(libavdevice)&#xA;add_subdirectory(libavfilter)&#xA;add_subdirectory(libswresample)&#xA;add_subdirectory(libswscale)&#xA;add_subdirectory(libpostproc)&#xA;&#xA;add_subdirectory(fftools)&#xA;&#xA;add_subdirectory(doc/examples)&#xA;&#xA;&#xA;find_path(AVCODEC_INCLUDE_DIR libavcodec/avcodec.h)&#xA;find_library(AVCODEC_LIBRARY avcodec)&#xA;&#xA;find_path(AVFORMAT_INCLUDE_DIR libavformat/avformat.h)&#xA;find_library(AVFORMAT_LIBRARY avformat)&#xA;&#xA;find_path(AVDEVICE_INCLUDE_DIR libavdevice/avdevice.h)&#xA;find_library(AVDEVICE_LIBRARY avdevice)&#xA;&#xA;find_path(AVCODEC_INCLUDE_DIR libavcodec/avcodec.h)&#xA;find_library(AVCODEC_LIBRARY avcodec)&#xA;&#xA;if(APPLE)&#xA;    list(APPEND EXTRA_LIBS&#xA;        "-framework OpenGL"&#xA;    )&#xA;&#xA;    configure_file(&#xA;        ${CMAKE_CURRENT_SOURCE_DIR}/assets/MacOSXBundleInfo.plist.in&#xA;        ${CMAKE_CURRENT_BINARY_DIR}/assets/MacOSXBundleInfo.plist&#xA;    )&#xA;&#xA;    set_target_properties(FFMPEG PROPERTIES&#xA;        MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/assets/MacOSXBundleInfo.plist&#xA;    )&#xA;&#xA;elseif(WIN32)&#xA;    list(APPEND EXTRA_LIBS&#xA;        "-lglu32 -lopengl32"&#xA;    )&#xA;    set(CMAKE_EXE_LINKER_FLAGS "-std=gnu99 -static -static-libgcc -static-libstdc&#x2B;&#x2B; -mwindows")&#xA;else()&#xA;    list(APPEND EXTRA_LIBS&#xA;        "-lGL -lGLU -lX11"&#xA;    )&#xA;endif()&#xA;&#xA;&#xA;#target_link_libraries(Interview ${CORELIBS})&#xA;&#xA;set( CMAKE_C_FLAGS "-lswresample")&#xA;&#xA;list(APPEND EXTRA_LIBS&#xA;"-lGL -lGLU -lX11 -lz -lva -lswresample"&#xA;)&#xA;&#xA;target_include_directories(ffmpeg_config INTERFACE&#xA;    ${AVCODEC_INCLUDE_DIR} &#xA;    ${AVFORMAT_INCLUDE_DIR}&#xA;    ${AVUTIL_INCLUDE_DIR}&#xA;    ${AVDEVICE_INCLUDE_DIR} &#xA;    ${OPENGL_INCLUDE_DIR}&#xA;    ${GLEW_INCLUDE_DIRS}&#xA;)&#xA;&#xA;target_link_libraries(ffmpeg_config INTERFACE&#xA;    ${AVCODEC_LIBRARY} &#xA;    ${AVFORMAT_LIBRARY} &#xA;    ${AVUTIL_LIBRARY} &#xA;    ${AVDEVICE_LIBRARY} &#xA;    ${OPENGL_LIBRARY}&#xA;    ${GLEW_LIBRARIES}&#xA;)&#xA;

    &#xA;

    Ubuntu 22.04, cmake 3.16.3, ffmpeg version git-2022-05-20-cb47f66

    &#xA;