
Recherche avancée
Médias (91)
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
-
Core Media Video
4 avril 2013, par
Mis à jour : Juin 2013
Langue : français
Type : Video
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
-
Exemple de boutons d’action pour une collection collaborative
27 février 2013, par
Mis à jour : Mars 2013
Langue : français
Type : Image
-
Exemple de boutons d’action pour une collection personnelle
27 février 2013, par
Mis à jour : Février 2013
Langue : English
Type : Image
Autres articles (26)
-
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users. -
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...) -
Les vidéos
21 avril 2011, parComme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)
Sur d’autres sites (3233)
-
Unknown input format : 'rawvideo' when trying to save animation
8 juin 2022, par John KlintSo, I get a strange error trying to save animations created with matplotlib.FuncAnimation using FFMpegWriter.


/home/j/PycharmProjects/venvtest/venv/bin/python /home/j/PycharmProjects/venvtest/main.py
MovieWriter stderr:
Unknown input format: 'rawvideo'

Traceback (most recent call last):
 File "/home/j/PycharmProjects/venvtest/venv/lib/python3.9/site-packages/matplotlib/animation.py", line 234, in saving
 yield self
 File "/home/j/PycharmProjects/venvtest/venv/lib/python3.9/site-packages/matplotlib/animation.py", line 1093, in save
 writer.grab_frame(**savefig_kwargs)
 File "/home/j/PycharmProjects/venvtest/venv/lib/python3.9/site-packages/matplotlib/animation.py", line 351, in grab_frame
 self.fig.savefig(self._proc.stdin, format=self.frame_format,
 File "/home/j/PycharmProjects/venvtest/venv/lib/python3.9/site-packages/matplotlib/figure.py", line 3046, in savefig
 self.canvas.print_figure(fname, **kwargs)
 File "/home/j/PycharmProjects/venvtest/venv/lib/python3.9/site-packages/matplotlib/backend_bases.py", line 2319, in print_figure
 result = print_method(
 File "/home/j/PycharmProjects/venvtest/venv/lib/python3.9/site-packages/matplotlib/backend_bases.py", line 1648, in wrapper
 return func(*args, **kwargs)
 File "/home/j/PycharmProjects/venvtest/venv/lib/python3.9/site-packages/matplotlib/_api/deprecation.py", line 415, in wrapper
 return func(*inner_args, **inner_kwargs)
 File "/home/j/PycharmProjects/venvtest/venv/lib/python3.9/site-packages/matplotlib/backends/backend_agg.py", line 486, in print_raw
 fh.write(renderer.buffer_rgba())
BrokenPipeError: [Errno 32] Broken pipe

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
 File "/home/j/PycharmProjects/venvtest/main.py", line 24, in <module>
 anim.save('basic_animation.mp4', writer=FFwriter)
 File "/home/j/PycharmProjects/venvtest/venv/lib/python3.9/site-packages/matplotlib/animation.py", line 1093, in save
 writer.grab_frame(**savefig_kwargs)
 File "/usr/lib/python3.9/contextlib.py", line 137, in __exit__
 self.gen.throw(typ, value, traceback)
 File "/home/j/PycharmProjects/venvtest/venv/lib/python3.9/site-packages/matplotlib/animation.py", line 236, in saving
 self.finish()
 File "/home/j/PycharmProjects/venvtest/venv/lib/python3.9/site-packages/matplotlib/animation.py", line 342, in finish
 self._cleanup() # Inline _cleanup() once cleanup() is removed.
 File "/home/j/PycharmProjects/venvtest/venv/lib/python3.9/site-packages/matplotlib/animation.py", line 373, in _cleanup
 raise subprocess.CalledProcessError(
subprocess.CalledProcessError: Command '['/usr/bin/ffmpeg', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '640x480', '-pix_fmt', 'rgba', '-r', '5', '-loglevel', 'error', '-i', 'pipe:', '-vcodec', 'h264', '-pix_fmt', 'yuv420p', '-y', 'basic_animation.mp4']' returned non-zero exit status 1.

Process finished with exit code 1
</module>


I am confident it has nothing to do with the animation data, the error occurs even when I create a simple test animation :


import numpy as np
from matplotlib import pyplot as plt
from matplotlib import animation
# plt.rcParams['animation.ffmpeg_path'] = '/usr/bin/ffmpeg'

fig = plt.figure()
ax = plt.axes(xlim=(0, 2), ylim=(-2, 2))
line, = ax.plot([], [], lw=2)


def init():
 line.set_data([], [])
 return line,


def animate(i):
 x = np.linspace(0, 2, 1000)
 y = np.sin(2 * np.pi * (x - 0.01 * i))
 line.set_data(x, y)
 return line,


anim = animation.FuncAnimation(fig, animate, init_func=init,
 frames=200, interval=20, blit=True)

FFwriter = animation.FFMpegWriter()
anim.save('basic_animation.mp4', writer=FFwriter)



I am currently using PyCharm in LinuxMint and I have a fairly new version of FFMpeg (4.2.4) installed. Given that FFMpeg complains about 'rawvideo' which as far as I understand it is just a bunch of images in series, it seems unlikely this has anything to do with codecs. If I run ffmpeg -formats, sure enough rawvideo is in the list.


I have tried manually setting plt.rcParams, like in the commented line in the code above, with no success. I have also tried setting up both anaconda and venv environments, but I get the same error.
Annoyingly, I did not have this problem a few months ago when I was using Ubuntu. I have also verified that it works on my friends Ubuntu desktop, using the same simple venv as I set up for myself.


Any ideas ?


EDIT : I use the fish shell, if that is relevant...


Well this is peculiar. If I start a terminal from within PyCharm and check supported formats, I get the following :


(venv) ffmpeg -formats
ffmpeg version 4.3.4 Copyright (c) 2000-2021 the FFmpeg developers
 built with gcc 11.3.0 (GCC)
 configuration: --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu --disable-debug --disable-doc --disable-static --enable-optimizations --enable-shared --disable-everything --enable-ffplay --enable-ffprobe --enable-gnutls --enable-libaom --enable-libdav1d --enable-libfdk-aac --enable-libmp3lame --enable-libfontconfig --enable-libfreetype --enable-libopus --enable-libpulse --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-openal --enable-opengl --enable-sdl2 --enable-vulkan --enable-zlib --enable-libv4l2 --enable-libxcb --enable-vdpau --enable-vaapi --enable-encoder='ac3,alac,flac,libfdk_aac,g723_1,mp2,libmp3lame,libopus,libspeex,pcm_alaw,pcm_mulaw,pcm_f32le,pcm_s16be,pcm_s24be,pcm_s16le,pcm_s24le,pcm_s32le,pcm_u8,tta,libvorbis,wavpack,' --enable-encoder='ass,ffv1,libaom_av1,libvpx_vp8,libvpx_vp9,mjpeg_vaapi,rawvideo,theora,vp8_vaapi,libopenh264' --enable-decoder='adpcm_g722,alac,flac,g723_1,g729,libfdk_aac,libopus,libspeex,mp2,mp3,m4a,pcm_alaw,pcm_mulaw,pcm_f16le,pcm_f24le,pcm_f32be,pcm_f32le,pcm_f64be,pcm_f64le,pcm_s16be,pcm_s16be_planar,pcm_s24be,pcm_s16le,pcm_s16le_planar,pcm_s24le,pcm_s24le_planar,pcm_s32le,pcm_s32le_planar,pcm_s64be,pcm_s64le,pcm_s8,pcm_s8_planar,pcm_u8,pcm_u24be,pcm_u24le,pcm_u32be,pcm_u32le,tta,vorbis,wavpack,' --enable-decoder='ass,ffv1,mjpeg,mjpegb,libaom_av1,libdav1d,libvpx_vp8,libvpx_vp9,rawvideo,theora,vp8,vp9,libopenh264' --enable-encoder='bmp,gif,jpegls,png,tiff,webp,' --enable-decoder='bmp,gif,jpegls,png,tiff,webp,' --enable-hwaccel='vp8_vaapi,mjpeg_vaapi,' --enable-parser='aac,ac3,flac,mjpeg,mpegaudio,mpeg4video,opus,vp3,vp8,vp9,vorbis,' --enable-muxer='ac3,ass,flac,g722,gif,matroska,mp3,mpegvideo,rtp,ogg,opus,pcm_s16be,pcm_s16le,wav,webm,' --enable-demuxer='aac,ac3,ass,flac,g722,gif,image_jpeg_pipe,image_png_pipe,image_webp_pipe,matroska,mjpeg,mov,mp3,mpegvideo,ogg,pcm_mulaw,pcm_alaw,pcm_s16be,pcm_s16le,rtp,wav,' --enable-filter='crop,scale,overlay,amix,amerge,aresample,format,aformat,fps,transpose,pad,' --enable-protocol='crypto,file,pipe,rtp,srtp,rtsp,tcp,udp,unix,' --arch=x86_64 --enable-libopenh264
 libavutil 56. 51.100 / 56. 51.100
 libavcodec 58. 91.100 / 58. 91.100
 libavformat 58. 45.100 / 58. 45.100
 libavdevice 58. 10.100 / 58. 10.100
 libavfilter 7. 85.100 / 7. 85.100
 libswscale 5. 7.100 / 5. 7.100
 libswresample 3. 7.100 / 3. 7.100
File formats:
 D. = Demuxing supported
 .E = Muxing supported
 --
 D aac raw ADTS AAC (Advanced Audio Coding)
 DE ac3 raw AC-3
 D alaw PCM A-law
 D asf ASF (Advanced / Active Streaming Format)
 DE ass SSA (SubStation Alpha) subtitle
 DE flac raw FLAC
 DE g722 raw G.722
 DE gif CompuServe Graphics Interchange Format (GIF)
 D jpeg_pipe piped jpeg sequence
 E matroska Matroska
 D matroska,webm Matroska / WebM
 D mjpeg raw MJPEG video
 D mov,mp4,m4a,3gp,3g2,mj2 QuickTime / MOV
 DE mp3 MP3 (MPEG audio layer 3)
 D mpegts MPEG-TS (MPEG-2 Transport Stream)
 D mpegvideo raw MPEG video
 D mulaw PCM mu-law
 DE ogg Ogg
 E opus Ogg Opus
 D png_pipe piped png sequence
 D rm RealMedia
 DE rtp RTP output
 DE s16be PCM signed 16-bit big-endian
 DE s16le PCM signed 16-bit little-endian
 D sdp SDP
 DE wav WAV / WAVE (Waveform Audio)
 E webm WebM
 D webp_pipe piped webp sequence




As is evident, there is no support for 'rawvideo' in the list above ! Very strange indeed, I do not know which ffmpeg this list belongs to, perhaps it is a version integrated into matplotlib's animation class ?


Anyway, if I uncomment the line setting the ffmpeg_path I am back at the old error. I did get it to work however, by changing the path from '/usr/bin/ffmpeg' to '/home/j/.conda/envs/venvtest/bin/ffmpeg'. Then I get the file to run, create the animation and save it. This works for my real files as well, which do not even run that particular conda-environment. They do not recognize or find the ffmpeg I have in /usr/bin though. I have no clue why but at least I have a workaround now.


Final edit :
It is solved. It was flatpak's fault. Lesson is, don't use flatpak (or snap for that matter) to install Pycharm.


-
ffmpeg Undefined referance to several swr functions [duplicate]
21 mai 2022, par user19068953I'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"{
 #include <libavcodec></libavcodec>avcodec.h>
}

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


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


const AVCodec *codec = avcodec_find_decoder(AV_CODEC_ID_MPEG1VIDEO);



But now i have this huge error :


/usr/bin/ld: /usr/local/lib/libavcodec.a(opusdec.o): in function 

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



I find some questions with similar issues to no avail :


FFmpeg seems to be version conflict
Linking libavcodec and libavformat : Undefined references


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.


project/CMakeLists :


cmake_minimum_required(VERSION 3.14)

project(Interview C CXX)
set(CMAKE_CXX_STANDARD 14)

SET( EXECUTABLE_OUTPUT_PATH ${dir}/bin )
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin )
set( CMAKE_C_FLAGS "-lswresample")

add_subdirectory(lib/ffmpeg)

add_definitions(-DGL_SILENCE_DEPRECATION)

list(APPEND SOURCES
 src/main.cpp
 src/vipch.h
 src/VideoDecoder.cpp
 src/VideoDecoder.h
 src/Application.cpp
 src/Application.h
 #src/OpenGLRenderer.cpp
 #src/OpenGLRenderer.h
 #src/Layer.h
 #src/Layer.cpp
)

find_path(AVCODEC_INCLUDE_DIR libavcodec/avcodec.h)
find_library(AVCODEC_LIBRARY avcodec)

find_path(AVFORMAT_INCLUDE_DIR libavformat/avformat.h)
find_library(AVFORMAT_LIBRARY avformat)

find_path(AVDEVICE_INCLUDE_DIR libavdevice/avdevice.h)
find_library(AVDEVICE_LIBRARY avdevice)

find_path(AVCODEC_INCLUDE_DIR libavcodec/avcodec.h)
find_library(AVCODEC_LIBRARY avcodec)

set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)

add_executable(Interview src/main.cpp src/Application.cpp src/Application.h ${SOURCES})

target_link_libraries(Interview PRIVATE Threads::Threads)

if(APPLE)
 list(APPEND EXTRA_LIBS
 "-framework OpenGL"
 )

 configure_file(
 ${CMAKE_CURRENT_SOURCE_DIR}/assets/MacOSXBundleInfo.plist.in
 ${CMAKE_CURRENT_BINARY_DIR}/assets/MacOSXBundleInfo.plist
 )

 set_target_properties(Interview PROPERTIES
 MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/assets/MacOSXBundleInfo.plist
 )

elseif(WIN32)
 list(APPEND EXTRA_LIBS
 "-lglu32 -lopengl32"
 )
 set(CMAKE_EXE_LINKER_FLAGS "-std=gnu99 -static -static-libgcc -static-libstdc++ -mwindows")

endif()

list(APPEND EXTRA_LIBS
"-lGL -lGLU -lX11 -lz -lva -lswresample"
)

find_package(OpenGL REQUIRED)
find_package(GLEW REQUIRED)

#target_link_libraries(Interview ${CORELIBS})


target_include_directories(Interview PRIVATE 
 ${AVCODEC_INCLUDE_DIR} 
 ${AVFORMAT_INCLUDE_DIR}
 ${AVUTIL_INCLUDE_DIR}
 ${AVDEVICE_INCLUDE_DIR} 
 ${OPENGL_INCLUDE_DIR}
 ${GLEW_INCLUDE_DIRS}
)

target_link_libraries(Interview PRIVATE 
 ${AVCODEC_LIBRARY} 
 ${AVFORMAT_LIBRARY} 
 ${AVUTIL_LIBRARY} 
 ${AVDEVICE_LIBRARY} 
 ${OPENGL_LIBRARY}
 ${GLEW_LIBRARIES}
)



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


project/lib/ffmpeg/CMakeLists :


cmake_minimum_required(VERSION 3.15)

project(FFMPEG C CXX)

add_library(ffmpeg_config INTERFACE)

#TODO:[cmake] COMMON DEFINES (config.h)
# create list with all that and then pick required from that list in each target
target_compile_definitions(ffmpeg_config INTERFACE FFMPEG_CONFIGURATION="")
target_compile_definitions(ffmpeg_config INTERFACE FFMPEG_DATADIR="")
target_compile_definitions(ffmpeg_config INTERFACE AVCONV_DATADIR="")
target_compile_definitions(ffmpeg_config INTERFACE FFMPEG_LICENSE="")

target_compile_definitions(ffmpeg_config INTERFACE CC_IDENT="")

target_compile_definitions(ffmpeg_config INTERFACE HAVE_THREADS=0)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_PTHREADS=0)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_W32THREADS=0)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_OS2THREADS=0)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_ISNAN=0)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_MMXEXT=0)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_MMX2=HAVE_MMXEXT)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_MMX2=HAVE_MMXEXT)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_MMX_INLINE=0)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_MMX=0)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_AV_CONFIG_H=1)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_ALTIVEC=0)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_MMXEXT_INLINE=0)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_NEON=0)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_AMD3DNOW_INLINE=0)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_X86ASM=0)
if(WIN32)
 target_compile_definitions(ffmpeg_config INTERFACE HAVE_MKSTEMP=0)
else()
 target_compile_definitions(ffmpeg_config INTERFACE HAVE_MKSTEMP=1)
endif()


#TODO:[cmake] detect each function and set to 0 if missing (they are in math.h)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_CBRT=1)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_CBRTF=1)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_COPYSIGN=1)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_ERF=1)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_HYPOT=1)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_RINT=1)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_LRINT=1)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_LRINTF=1)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_ROUND=1)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_ROUNDF=1)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_TRUNC=1)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_TRUNCF=1)


target_link_libraries(ffmpeg_config INTERFACE ffmpeg_compat)

include (TestBigEndian)
TEST_BIG_ENDIAN(IS_BIG_ENDIAN)
if(IS_BIG_ENDIAN)
 target_compile_definitions(ffmpeg_config INTERFACE HAVE_BIGENDIAN=1)
else()
 target_compile_definitions(ffmpeg_config INTERFACE HAVE_BIGENDIAN=0)
endif()

target_compile_definitions(ffmpeg_config INTERFACE av_restrict=)

target_compile_definitions(ffmpeg_config INTERFACE CONFIG_THIS_YEAR=2021)

target_compile_definitions(ffmpeg_config INTERFACE CONFIG_MEMORY_POISONING=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_FRAME_THREAD_ENCODER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_MEMORY_POISONING=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_GRAY=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_ERROR_RESILIENCE=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_MPEGVIDEODEC=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_SMALL=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_H264_D3D11VA_HWACCEL=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_H264_DXVA2_HWACCEL=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_H264_NVDEC_HWACCEL=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_H264_VAAPI_HWACCEL=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_H264_VIDEOTOOLBOX_HWACCEL=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_H264_VDPAU_HWACCEL=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_NETWORK=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_XVMC=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_FORMAT_FILTER=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_PNG_DECODER=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_APNG_DECODER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_INFLATE_WRAPPER=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_DEFLATE_WRAPPER=1)

target_compile_definitions(ffmpeg_config INTERFACE CONFIG_AVUTIL=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_AVCODEC=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_AVFORMAT=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_AVDEVICE=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_SWSCALE=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_SWRESAMPLE=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_POSTPROC=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_AVFILTER=1)



#CONFIG MUXERS
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_H264_MUXER=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE2_MUXER=1)

#CONFIG DEMUXERS
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE2_DEMUXER=1)

# look at the end of libavformat/img2dec.c file
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_BMP_PIPE_DEMUXER=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_CRI_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_DDS_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_DPX_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_EXR_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_GEM_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_GIF_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_J2K_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_JPEG_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_JPEGLS_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PAM_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PBM_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PCX_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PGM_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PGMYUV_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PGX_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PHOTOCD_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PICTOR_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PNG_PIPE_DEMUXER=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PPM_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PSD_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_QDRAW_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_SGI_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_SVG_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_TIFF_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_WEBP_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_XBM_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_XPM_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_XWD_PIPE_DEMUXER=0)


#CONFIG PROTOCOLS
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_FILE_PROTOCOL=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_PIPE_PROTOCOL=1)

target_compile_definitions(ffmpeg_config INTERFACE CONFIG_ZLIB=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_SWSCALE_ALPHA=0)

target_compile_definitions(ffmpeg_config INTERFACE ARCH_X86_32=0)
target_compile_definitions(ffmpeg_config INTERFACE ARCH_X86_64=0)
target_compile_definitions(ffmpeg_config INTERFACE ARCH_AARCH64=0)
target_compile_definitions(ffmpeg_config INTERFACE ARCH_ARM=0)
target_compile_definitions(ffmpeg_config INTERFACE ARCH_PPC=0)
target_compile_definitions(ffmpeg_config INTERFACE ARCH_X86=0)
target_compile_definitions(ffmpeg_config INTERFACE ARCH_MIPS=0)
target_compile_definitions(ffmpeg_config INTERFACE ARCH_ALPHA=0)
target_compile_definitions(ffmpeg_config INTERFACE ARCH_LOONGARCH=0)
target_compile_definitions(ffmpeg_config INTERFACE ARCH_LOONGARCH64=0)

target_compile_definitions(ffmpeg_config INTERFACE SWS_MAX_FILTER_SIZE=256)

#_________________________WARNINGS__________________________________________
#TODO[cmake]: set it for all targets individually or remove for WARNING HELL
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
 add_compile_options("-w")
endif()

if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
 add_compile_options("-w")
endif()

if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
 cmake_policy(SET CMP0092 NEW) #cmake disable std MSVC warnings in CMAKE_C_FLAGS
 #CMAKE_DEPFILE_FLAGS_C var in windows contains only /showIncludes and produce include tree
 set(CMAKE_DEPFILE_FLAGS_C "") #erase it
 add_compile_options("/w")
endif()

file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/include/config.h "//cmake config will define all that")
target_include_directories(ffmpeg_config INTERFACE ${CMAKE_CURRENT_BINARY_DIR}/include)

#TODO[cmake]: resolve config_components.h
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/include/config_components.h "//")
target_include_directories(ffmpeg_config INTERFACE ${CMAKE_CURRENT_BINARY_DIR}/include)

add_subdirectory(compat)
add_subdirectory(libavutil)
add_subdirectory(libavcodec)
add_subdirectory(libavformat)
add_subdirectory(libavdevice)
add_subdirectory(libavfilter)
add_subdirectory(libswresample)
add_subdirectory(libswscale)
add_subdirectory(libpostproc)

add_subdirectory(fftools)

add_subdirectory(doc/examples)


find_path(AVCODEC_INCLUDE_DIR libavcodec/avcodec.h)
find_library(AVCODEC_LIBRARY avcodec)

find_path(AVFORMAT_INCLUDE_DIR libavformat/avformat.h)
find_library(AVFORMAT_LIBRARY avformat)

find_path(AVDEVICE_INCLUDE_DIR libavdevice/avdevice.h)
find_library(AVDEVICE_LIBRARY avdevice)

find_path(AVCODEC_INCLUDE_DIR libavcodec/avcodec.h)
find_library(AVCODEC_LIBRARY avcodec)

if(APPLE)
 list(APPEND EXTRA_LIBS
 "-framework OpenGL"
 )

 configure_file(
 ${CMAKE_CURRENT_SOURCE_DIR}/assets/MacOSXBundleInfo.plist.in
 ${CMAKE_CURRENT_BINARY_DIR}/assets/MacOSXBundleInfo.plist
 )

 set_target_properties(FFMPEG PROPERTIES
 MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/assets/MacOSXBundleInfo.plist
 )

elseif(WIN32)
 list(APPEND EXTRA_LIBS
 "-lglu32 -lopengl32"
 )
 set(CMAKE_EXE_LINKER_FLAGS "-std=gnu99 -static -static-libgcc -static-libstdc++ -mwindows")
else()
 list(APPEND EXTRA_LIBS
 "-lGL -lGLU -lX11"
 )
endif()


#target_link_libraries(Interview ${CORELIBS})

set( CMAKE_C_FLAGS "-lswresample")

list(APPEND EXTRA_LIBS
"-lGL -lGLU -lX11 -lz -lva -lswresample"
)

target_include_directories(ffmpeg_config INTERFACE
 ${AVCODEC_INCLUDE_DIR} 
 ${AVFORMAT_INCLUDE_DIR}
 ${AVUTIL_INCLUDE_DIR}
 ${AVDEVICE_INCLUDE_DIR} 
 ${OPENGL_INCLUDE_DIR}
 ${GLEW_INCLUDE_DIRS}
)

target_link_libraries(ffmpeg_config INTERFACE
 ${AVCODEC_LIBRARY} 
 ${AVFORMAT_LIBRARY} 
 ${AVUTIL_LIBRARY} 
 ${AVDEVICE_LIBRARY} 
 ${OPENGL_LIBRARY}
 ${GLEW_LIBRARIES}
)



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


-
Transcoding hevc to h264 using GPU and scale_npp
19 mai 2022, par JanZgI 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.