
Recherche avancée
Médias (91)
-
Richard Stallman et le logiciel libre
19 octobre 2011, par
Mis à jour : Mai 2013
Langue : français
Type : Texte
-
Stereo master soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
Elephants Dream - Cover of the soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
#7 Ambience
16 octobre 2011, par
Mis à jour : Juin 2015
Langue : English
Type : Audio
-
#6 Teaser Music
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#5 End Title
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
Autres articles (47)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
MediaSPIP Init et Diogène : types de publications de MediaSPIP
11 novembre 2010, parÀ l’installation d’un site MediaSPIP, le plugin MediaSPIP Init réalise certaines opérations dont la principale consiste à créer quatre rubriques principales dans le site et de créer cinq templates de formulaire pour Diogène.
Ces quatre rubriques principales (aussi appelées secteurs) sont : Medias ; Sites ; Editos ; Actualités ;
Pour chacune de ces rubriques est créé un template de formulaire spécifique éponyme. Pour la rubrique "Medias" un second template "catégorie" est créé permettant d’ajouter (...) -
Changer son thème graphique
22 février 2011, parLe thème graphique ne touche pas à la disposition à proprement dite des éléments dans la page. Il ne fait que modifier l’apparence des éléments.
Le placement peut être modifié effectivement, mais cette modification n’est que visuelle et non pas au niveau de la représentation sémantique de la page.
Modifier le thème graphique utilisé
Pour modifier le thème graphique utilisé, il est nécessaire que le plugin zen-garden soit activé sur le site.
Il suffit ensuite de se rendre dans l’espace de configuration du (...)
Sur d’autres sites (5202)
-
Error for android-ndk-r21d and ffmpeg-snapshot
4 août 2020, par yejafotwhy im getting the below errors.
Am i done any misconfiguration in the build file ?


Can you change it according, im trying to configure for arm64_v8a (.so) file for android jni in my linux machine. Thanks !


Below is my build file.


#!/bin/bash
export NDK=/media/sf_sharing/android-ndk-r21d
export SYSROOT=$NDK/platforms/android-21/arch-arm64/
export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/linux-x86_64
export TARGET=aarch64-linux-android
export API=21
export AR=$TOOLCHAIN/bin/$TARGET-ar
export CC=$TOOLCHAIN/bin/$TARGET$API-clang
export CXX=$TOOLCHAIN/bin/$TARGET$API-clang++
export LD=$TOOLCHAIN/bin/$TARGET-ld
export RANLIB=$TOOLCHAIN/bin/$TARGET-ranlib
export STRIP=$TOOLCHAIN/bin/$TARGET-strip
export CROSS_PREFIX=$NDK/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64
rm -f $(pwd)/compat/strtod.o 
function build_one
 {
 ./configure\
 --prefix=$PREFIX\
 --enable-shared\
 --disable-static\
 --ar=$AR\
 --cc=$CC\
 --cxx=$CXX\
 --pkg-config=$(which pkg-config)\
 --ld=$LD\
 --ranlib=$RANLIB\
 --strip=$STRIP\
 --enable-protocol=file\
 --enable-pic\
 --enable-small\
 --disable-programs\
 --disable-doc\
 --disable-symver\
 --target-os=android\
 --sysinclude=$TOOLCHAIN/sysroot/usr/include\
 --enable-cross-compile\
 --cross-prefix=$TOOLCHAIN/bin/$TARGET-\
 --extra-cflags="-Os -fpic $ADDI_CFLAGS"\
 --extra-ldflags="$ADDI_LDFLAGS"\
 --sysroot=$TOOLCHAIN/sysroot $ADDITIONAL_CONFIG_FLAG
 make clean
 make -j2
 make install
 }
 CPU=arm64-v8a
 mkdir -p $(pwd)/android/$CPU
 PREFIX=$(pwd)/android/$CPU
 ADDI_CFLAGS="-march=armv8-a"
 #ADDI_LDFLAGS="-L$TOOLCHAIN/sysroot/usr/lib"
 ADDI_LDFLAGS="-L$SYSROOT/usr/lib"
 ADDITIONAL_CONFIG_FLAG="--arch=aarch64 --enable-yasm"
 build_one



Error :


INSTALL doc/examples/Makefile
CC libavdevice/alldevices.o
In file included from libavdevice/alldevices.c:23:
In file included from ./libavformat/internal.h:27:
In file included from ./libavformat/avformat.h:312:
In file included from ./libavcodec/avcodec.h:31:
In file included from ./libavutil/samplefmt.h:24:
In file included from ./libavutil/avutil.h:296:
In file included from ./libavutil/common.h:39:
In file included from /media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include/stdlib.h:32:
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/stdlib.h:61:7: error: expected identifier or '('
char* getenv(const char* __name);
 ^
./config.h:17:19: note: expanded from macro 'getenv'
#define getenv(x) NULL
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/stddef.h:89:18: note: expanded from macro 'NULL'
# define NULL ((void*)0)
 ^
In file included from libavdevice/alldevices.c:23:
In file included from ./libavformat/internal.h:27:
In file included from ./libavformat/avformat.h:312:
In file included from ./libavcodec/avcodec.h:31:
In file included from ./libavutil/samplefmt.h:24:
In file included from ./libavutil/avutil.h:296:
In file included from ./libavutil/common.h:39:
In file included from /media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include/stdlib.h:32:
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/stdlib.h:61:7: error: expected ')'
./config.h:17:19: note: expanded from macro 'getenv'
#define getenv(x) NULL
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/stddef.h:89:18: note: expanded from macro 'NULL'
# define NULL ((void*)0)
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/stdlib.h:61:7: note: to match this '('
./config.h:17:19: note: expanded from macro 'getenv'
#define getenv(x) NULL
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/stddef.h:89:17: note: expanded from macro 'NULL'
# define NULL ((void*)0)
 ^
In file included from libavdevice/alldevices.c:23:
In file included from ./libavformat/internal.h:27:
In file included from ./libavformat/avformat.h:312:
In file included from ./libavcodec/avcodec.h:31:
In file included from ./libavutil/samplefmt.h:24:
In file included from ./libavutil/avutil.h:296:
In file included from ./libavutil/common.h:39:
In file included from /media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include/stdlib.h:32:
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/stdlib.h:61:7: error: expected ')'
char* getenv(const char* __name);
 ^
./config.h:17:19: note: expanded from macro 'getenv'
#define getenv(x) NULL
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/stddef.h:89:24: note: expanded from macro 'NULL'
# define NULL ((void*)0)
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/stdlib.h:61:7: note: to match this '('
./config.h:17:19: note: expanded from macro 'getenv'
#define getenv(x) NULL
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/stddef.h:89:16: note: expanded from macro 'NULL'
# define NULL ((void*)0)
 ^
In file included from libavdevice/alldevices.c:23:
In file included from ./libavformat/internal.h:27:
In file included from ./libavformat/avformat.h:312:
In file included from ./libavcodec/avcodec.h:31:
In file included from ./libavutil/samplefmt.h:24:
In file included from ./libavutil/avutil.h:296:
In file included from ./libavutil/common.h:533:
In file included from ./libavutil/internal.h:143:
./libavutil/libm.h:54:32: error: static declaration of 'cbrt' follows non-static declaration
static av_always_inline double cbrt(double x)
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/math.h:191:8: note: previous declaration is here
double cbrt(double __x);
 ^
In file included from libavdevice/alldevices.c:23:
In file included from ./libavformat/internal.h:27:
In file included from ./libavformat/avformat.h:312:
In file included from ./libavcodec/avcodec.h:31:
In file included from ./libavutil/samplefmt.h:24:
In file included from ./libavutil/avutil.h:296:
In file included from ./libavutil/common.h:533:
In file included from ./libavutil/internal.h:143:
./libavutil/libm.h:61:31: error: static declaration of 'cbrtf' follows non-static declaration
static av_always_inline float cbrtf(float x)
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/math.h:192:7: note: previous declaration is here
float cbrtf(float __x);
 ^
In file included from libavdevice/alldevices.c:23:
In file included from ./libavformat/internal.h:27:
In file included from ./libavformat/avformat.h:312:
In file included from ./libavcodec/avcodec.h:31:
In file included from ./libavutil/samplefmt.h:24:
In file included from ./libavutil/avutil.h:296:
In file included from ./libavutil/common.h:533:
In file included from ./libavutil/internal.h:143:
./libavutil/libm.h:68:32: error: static declaration of 'copysign' follows non-static declaration
static av_always_inline double copysign(double x, double y)
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/math.h:279:8: note: previous declaration is here
double copysign(double __value, double __sign) __attribute_const__;
 ^
In file included from libavdevice/alldevices.c:23:
In file included from ./libavformat/internal.h:27:
In file included from ./libavformat/avformat.h:312:
In file included from ./libavcodec/avcodec.h:31:
In file included from ./libavutil/samplefmt.h:24:
In file included from ./libavutil/avutil.h:296:
In file included from ./libavutil/common.h:533:
In file included from ./libavutil/internal.h:143:
./libavutil/libm.h:121:22: error: static declaration of 'erf' follows non-static declaration
static inline double erf(double z)
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/math.h:211:8: note: previous declaration is here
double erf(double __x);
 ^
In file included from libavdevice/alldevices.c:23:
In file included from ./libavformat/internal.h:27:
In file included from ./libavformat/avformat.h:312:
In file included from ./libavcodec/avcodec.h:31:
In file included from ./libavutil/samplefmt.h:24:
In file included from ./libavutil/avutil.h:296:
In file included from ./libavutil/common.h:533:
In file included from ./libavutil/internal.h:143:
./libavutil/libm.h:340:9: warning: 'isnan' macro redefined [-Wmacro-redefined]
#define isnan(x) \
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/math.h:69:9: note: previous definition is here
#define isnan(x) __builtin_isnan(x)
 ^
In file included from libavdevice/alldevices.c:23:
In file included from ./libavformat/internal.h:27:
In file included from ./libavformat/avformat.h:312:
In file included from ./libavcodec/avcodec.h:31:
In file included from ./libavutil/samplefmt.h:24:
In file included from ./libavutil/avutil.h:296:
In file included from ./libavutil/common.h:533:
In file included from ./libavutil/internal.h:143:
./libavutil/libm.h:359:9: warning: 'isfinite' macro redefined [-Wmacro-redefined]
#define isfinite(x) \
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/math.h:65:9: note: previous definition is here
#define isfinite(x) __builtin_isfinite(x)
 ^
In file included from libavdevice/alldevices.c:23:
In file included from ./libavformat/internal.h:27:
In file included from ./libavformat/avformat.h:312:
In file included from ./libavcodec/avcodec.h:31:
In file included from ./libavutil/samplefmt.h:24:
In file included from ./libavutil/avutil.h:296:
In file included from ./libavutil/common.h:533:
In file included from ./libavutil/internal.h:143:
./libavutil/libm.h:366:31: error: static declaration of 'hypot' follows non-static declaration
static inline av_const double hypot(double x, double y)
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/math.h:199:8: note: previous declaration is here
double hypot(double __x, double __y);
 ^
In file included from libavdevice/alldevices.c:23:
In file included from ./libavformat/internal.h:27:
In file included from ./libavformat/avformat.h:312:
In file included from ./libavcodec/avcodec.h:31:
In file included from ./libavutil/samplefmt.h:24:
In file included from ./libavutil/avutil.h:296:
In file included from ./libavutil/common.h:533:
In file included from ./libavutil/internal.h:143:
./libavutil/libm.h:423:22: error: static declaration of 'rint' follows non-static declaration
static inline double rint(double x)
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/math.h:239:8: note: previous declaration is here
double rint(double __x);
 ^
In file included from libavdevice/alldevices.c:23:
In file included from ./libavformat/internal.h:27:
In file included from ./libavformat/avformat.h:312:
In file included from ./libavcodec/avcodec.h:31:
In file included from ./libavutil/samplefmt.h:24:
In file included from ./libavutil/avutil.h:296:
In file included from ./libavutil/common.h:533:
In file included from ./libavutil/internal.h:143:
./libavutil/libm.h:430:43: error: static declaration of 'lrint' follows non-static declaration
static av_always_inline av_const long int lrint(double x)
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/math.h:243:6: note: previous declaration is here
long lrint(double __x);
 ^
In file included from libavdevice/alldevices.c:23:
In file included from ./libavformat/internal.h:27:
In file included from ./libavformat/avformat.h:312:
In file included from ./libavcodec/avcodec.h:31:
In file included from ./libavutil/samplefmt.h:24:
In file included from ./libavutil/avutil.h:296:
In file included from ./libavutil/common.h:533:
In file included from ./libavutil/internal.h:143:
./libavutil/libm.h:437:43: error: static declaration of 'lrintf' follows non-static declaration
static av_always_inline av_const long int lrintf(float x)
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/math.h:244:6: note: previous declaration is here
long lrintf(float __x);
 ^
In file included from libavdevice/alldevices.c:23:
In file included from ./libavformat/internal.h:27:
In file included from ./libavformat/avformat.h:312:
In file included from ./libavcodec/avcodec.h:31:
In file included from ./libavutil/samplefmt.h:24:
In file included from ./libavutil/avutil.h:296:
In file included from ./libavutil/common.h:533:
In file included from ./libavutil/internal.h:143:
./libavutil/libm.h:444:41: error: static declaration of 'round' follows non-static declaration
static av_always_inline av_const double round(double x)
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/math.h:251:8: note: previous declaration is here
double round(double __x);
 ^
In file included from libavdevice/alldevices.c:23:
In file included from ./libavformat/internal.h:27:
In file included from ./libavformat/avformat.h:312:
In file included from ./libavcodec/avcodec.h:31:
In file included from ./libavutil/samplefmt.h:24:
In file included from ./libavutil/avutil.h:296:
In file included from ./libavutil/common.h:533:
In file included from ./libavutil/internal.h:143:
./libavutil/libm.h:451:40: error: static declaration of 'roundf' follows non-static declaration
static av_always_inline av_const float roundf(float x)
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/math.h:252:7: note: previous declaration is here
float roundf(float __x);
 ^
In file included from libavdevice/alldevices.c:23:
In file included from ./libavformat/internal.h:27:
In file included from ./libavformat/avformat.h:312:
In file included from ./libavcodec/avcodec.h:31:
In file included from ./libavutil/samplefmt.h:24:
In file included from ./libavutil/avutil.h:296:
In file included from ./libavutil/common.h:533:
In file included from ./libavutil/internal.h:143:
./libavutil/libm.h:458:41: error: static declaration of 'trunc' follows non-static declaration
static av_always_inline av_const double trunc(double x)
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/math.h:263:8: note: previous declaration is here
double trunc(double __x);
 ^
In file included from libavdevice/alldevices.c:23:
In file included from ./libavformat/internal.h:27:
In file included from ./libavformat/avformat.h:312:
In file included from ./libavcodec/avcodec.h:31:
In file included from ./libavutil/samplefmt.h:24:
In file included from ./libavutil/avutil.h:296:
In file included from ./libavutil/common.h:533:
In file included from ./libavutil/internal.h:143:
./libavutil/libm.h:465:40: error: static declaration of 'truncf' follows non-static declaration
static av_always_inline av_const float truncf(float x)
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/math.h:264:7: note: previous declaration is here
float truncf(float __x);
 ^
2 warnings and 15 errors generated.
make: *** [libavdevice/alldevices.o] Error 1
santoku@santoku:/media/sf_sharing/ffmpeg$



i tried all old version of ffmpeg,ndk with different build files but that didnt work so now im trying this latest ffmpeg-snapshot and ndk21


-
Setting up multiple resolution value in Fast API for transcoding uploaded video files
23 janvier 2024, par Sanji VinsmokeI created an API for transcoding video files like adaptive bit rate of youtube. I used Fast API. Currently, I am trying to set resolution values for each file. But whenever I am adding multiple resolutions, I am recieving "422 unprocessible entity" error in the Swagger.


Here is my code :


async def transcode_video(input_path, output_folder, res, unique_id, total_files, pbar):
 # Use asyncio for command execution with progress bar
 output_path = os.path.join(output_folder, f"{res}p.m3u8")

 # Calculate the target size
 target_size = calculate_target_size(input_path)

 cmd_duration = f"ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 {input_path}"
 total_duration = float(subprocess.check_output(cmd_duration, shell=True, text=True).strip())

 cmd = (
 f"ffmpeg -i {input_path} -vf scale=-2:{res} -c:a aac -b:a 128k "
 f"-g 50 -hls_time 1 -hls_list_size 0 "
 f"-crf 23 -b:v 100k -fs {target_size} "
 f"-hls_segment_filename \"{output_path.replace('.m3u8', '_%03d.ts')}\" "
 f"{output_path}"
 )

 process = await asyncio.create_subprocess_shell(
 cmd,
 stdout=asyncio.subprocess.PIPE,
 stderr=asyncio.subprocess.PIPE
 )

 while True:
 line = await process.stderr.readline()
 if not line:
 break
 line = line.decode().strip()
 if "time=" in line:
 # Extracting the time progress from FFmpeg output
 time_str = line.split("time=")[1].split()[0]
 current_time = sum(x * float(t) for x, t in zip([3600, 60, 1], time_str.split(":")))
 progress = (current_time / total_duration) * 100
 pbar.update(progress - pbar.n)

 # Wait for the transcoding process to complete
 await process.wait()

 if process.returncode != 0:
 raise HTTPException(status_code=500, detail="Video transcoding failed.")
 pbar.close()

 # Increment the total number of transcoded files
 total_files[0] += 1

@app.post("/transcode/")
async def transcode_video_endpoint(files: List[UploadFile] = File(...), resolutions: List[int] = None):
 # Counters for transcoded videos
 total_files = [0]

 # Iterate over each file
 for file in files:
 # Check if the file is a valid video file based on its extension
 valid_video_extensions = {".mp4", ".avi", ".mkv", ".mov", ".wmv", ".flv"}
 if not any(file.filename.lower().endswith(ext) for ext in valid_video_extensions):
 print(f"Skipping non-video file: {file.filename}")
 continue

 # Assign a unique ID for each file
 unique_id = str(uuid.uuid4())

 # Log the filename and unique ID
 print(f"Processing file: {file.filename} with unique ID: {unique_id}")

 # Create a folder for the unique ID
 unique_id_folder = os.path.join(OUTPUT_FOLDER, unique_id)
 Path(unique_id_folder).mkdir(parents=True, exist_ok=True)

 # Save the uploaded file
 input_path = os.path.join(UPLOAD_FOLDER, file.filename)
 with open(input_path, "wb") as video_file:
 video_file.write(file.file.read())

 # Check if the file is a valid video file using ffprobe
 try:
 subprocess.run(
 ["ffprobe", "-v", "error", "-select_streams", "v:0", "-show_entries", "stream=codec_type", "-of", "csv=p=0", input_path],
 check=True, capture_output=True
 )
 except subprocess.CalledProcessError:
 print(f"Skipping non-video file: {file.filename}")
 continue

 # Determine the resolutions to transcode based on the provided or default resolution
 resolutions_to_transcode = [res for res in [240, 360, 480, 720] if resolutions is None or res in resolutions]

 # If resolutions is not exactly 360, 480, 720, or 1080, transcode to the nearest lower resolution
 if resolutions is not None:
 resolutions_to_transcode = [get_closest_lower_resolution(res) for res in resolutions]

 # Transcode the video into the specified resolutions
 for res in resolutions_to_transcode:
 output_folder = os.path.join(unique_id_folder, f"{res}p")
 Path(output_folder).mkdir(parents=True, exist_ok=True)

 # Call the transcode_video function with tqdm progress bar
 with tqdm(total=100, desc=f"Transcoding {res}p", position=0, leave=True) as pbar:
 await transcode_video(input_path, output_folder, res, unique_id, total_files, pbar)

 # Create index.m3u8 file after transcoding all resolutions
 create_index_m3u8(unique_id, resolutions_to_transcode)

 return JSONResponse(content={"message": f"{total_files[0]} videos transcoded."})



If I provide one resolution it works fine. But if I provide a list of resolutions for all the uploaded videos I am getting error 422.



Code Details
422 
Error: Unprocessable Entity

Response body
Download
{
 "detail": [
 {
 "loc": [
 "body",
 "resolutions",
 0
 ],
 "msg": "value is not a valid integer",
 "type": "type_error.integer"
 }
 ]
}



I used python 3.8.18. Can you help me please ? I tried with list, object but always getting the error.


-
Concatenate Movies from Python List using MoviePy or FFmpeg
24 septembre 2020, par Python_Learner_DKI have about 10,000 short videos that I am trying to make several longer videos from.



I've created these videos using MoviePy, but keep getting memory errors when trying to concatenate them back together.



In my code I have an outer loop going through each letter of the alphabet and getting the files that start with that letter.



From the returned video clips I get the length and and strip off the last 3.5 seconds (
outro_clip_duration
) of the video, and then add it into a Python listclips
.


Where I'm stuck is I then want to take this list of trimmed videos and make one long long video from it.



I have all the files, I just need to trim them, concatenate them, and then export them as one.



I've tried many times with different MoviePy attempts and keep getting MemoryErrors so I gave up and took a swing at an ffmpeg solution seen here but it is not working out either.



The latest version of the main part of my code is here :



clips = []
outro_clip = mpy.VideoFileClip('Logo_Intro_w_Stinger_Large.mp4')
outro_clip_duration = outro_clip.duration
for def_image in vid_list_long:
 video_item = mpy.VideoFileClip('F:/sm_My_Video/sm_%s.mp4' % def_image)
 video_item_duration = video_item.duration
 clips.append(ffmpeg_extract_subclip(video_item,0,(video_item_duration - outro_clip_duration), targetname = def_image))

# #Append the outro_clip to the end 
clips.append(mpy.VideoFileClip('Logo_Intro_w_Stinger_Large.mp4',target_resolution = (h,w),audio=True))
slided_clips = [CompositeVideoClip([clip.fx( transfx.crossfadein, transition_seconds)]) for clip in clips]
#added 'method = compose' NEED TO TEST - supposedly removes the weird glitches.
c = concatenate_videoclips(slided_clips, method = 'compose')
c.write_videofile('F:/Extended_Play/%s_Extended_Play_vid.mp4' % letter,fps=23.98)




My PC is Windows 10 and I have 32 GB of RAM running Anaconda and Python 3.