Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

split video not working #48

Open
tuthanika opened this issue Nov 27, 2024 · 1 comment
Open

split video not working #48

tuthanika opened this issue Nov 27, 2024 · 1 comment

Comments

@tuthanika
Copy link

tuthanika commented Nov 27, 2024

Video file name : demo-video 13 34.mp4
Path : /content/drive/Shareddrives/tuthanika/1/demo-video 13 34.mp4
Error: /content/drive/Shareddrives/tuthanika/1/demo-video: No such file or directory

  • Log:
    Status Legend:
    (OK):download completed.
    INFO:pyrogram.connection.connection:Connecting...
    INFO:pyrogram.connection.connection:Connected! Production DC5 (media) - IPv4 - TCPAbridgedO
    INFO:pyrogram.session.session:NetworkTask started
    INFO:pyrogram.session.session:Session initialized: Layer 161
    INFO:pyrogram.session.session:Device: CPython 3.10.12 - Pyrogram 2.2.11
    INFO:pyrogram.session.session:System: Linux 6.1.85+ (EN)
    INFO:pyrogram.session.session:Session started
    INFO:pyrogram.session.session:PingTask started
    INFO:pyrogram.session.session:PingTask stopped
    INFO:pyrogram.connection.connection:Disconnected
    INFO:pyrogram.session.session:NetworkTask stopped
    INFO:pyrogram.session.session:Session stopped
    ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
    built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
    configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
    libavutil 56. 70.100 / 56. 70.100
    libavcodec 58.134.100 / 58.134.100
    libavformat 58. 76.100 / 58. 76.100
    libavdevice 58. 13.100 / 58. 13.100
    libavfilter 7.110.100 / 7.110.100
    libswscale 5. 9.100 / 5. 9.100
    libswresample 3. 9.100 / 3. 9.100
    libpostproc 55. 9.100 / 55. 9.100
    /content/drive/Shareddrives/tuthanika/1/demo-video: No such file or directory

P/s: if possible, please support "mkvtoolnix" as an alternative to "ffmpeg", because "mkvtoolnix" video split mode has less errors when rejoining. Here is a sample command to run on colab to split

import os, sys, re

input_folder = "/content/drive/Shareddrives/tuthanika/1" #@param {type:"string"}
output_folder = "/content/temp" #@param {type:"string"}
sizecat = 1940 #@param {type:"integer"}

my_suffixes = (".mp4", ".mov", ".mkv", ".avi", ".ts", ".flv", ".webm", ".wmv", ".mpg", ".m4v", ".f4v")

from pathlib import Path
Path(output_folder).mkdir(parents=True, exist_ok=True)

for filename in os.listdir(input_folder):
if (filename.endswith(my_suffixes)):
files = os.path.splitext(filename)[0]
cmd = !mkvmerge -o "$output_folder/{filename}" "$input_folder/{filename}" --split size:{sizecat}M --title "{files}"

@XronTrix10
Copy link
Owner

Thanks for the information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants