Recherche avancée

Médias (91)

Sur d’autres sites (333)

  • How to merge special ts files to mp4 ? [closed]

    21 février, par mikezang

    I have some ts files and I want to merge them to mp4, I used command as below, some of ts can be merged without any problems.

    


    ffmpeg -i 'concat:01.ts|02.ts|03.ts|' -c copy -bsf:a aac_adtstoasc 01.mp4


    


    Then I found for some ts files, I got error as below when I used the same command above, what can I do to merge these ts files ?

    


    ffmpeg version 2023-11-13-git-67a2571a55-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --pkg-config=pkgconf --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-dxva2 --enable-d3d11va --enable-libvpl --enable-libshaderc --enable-vulkan --enable-libplacebo --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-libcodec2 --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      58. 32.100 / 58. 32.100
  libavcodec     60. 33.100 / 60. 33.100
  libavformat    60. 17.100 / 60. 17.100
  libavdevice    60.  4.100 / 60.  4.100
  libavfilter     9. 13.100 /  9. 13.100
  libswscale      7.  6.100 /  7.  6.100
  libswresample   4. 13.100 /  4. 13.100
  libpostproc    57.  4.100 / 57.  4.100
[png @ 0000028b191c1cc0] inflate returned error -3
Input #0, png_pipe, from 'concat:001.ts|002.ts|003.ts':
  Duration: N/A, bitrate: N/A
  Stream #0:0: Video: png, pal8(pc, gbr/unknown/unknown), 800x800, 25 fps, 25 tbr, 25 tbn
Output #0, mp4, to '01.mp4':
  Metadata:
    encoder         : Lavf60.17.100
  Stream #0:0: Video: png (mp4v / 0x7634706D), pal8(pc, gbr/unknown/unknown), 800x800, q=2-31, 25 fps, 25 tbr, 12800 tbn
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[out#0/mp4 @ 0000028b19260cc0] video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[out#0/mp4 @ 0000028b19260cc0] Output file is empty, nothing was encoded


    


    The successful ts file by ffprobe :

    


    Input #0, mpegts, from '001.ts':
  Duration: 00:00:12.04, start: 0.038000, bitrate: 942 kb/s
  Program 1
  Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn
  Stream #0:1[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 97 kb/s


    


    The failed ts file by ffprobe :

    


    [png @ 000001e9016fe940] inflate returned error -3
Input #0, png_pipe, from '001.ts':
  Duration: N/A, bitrate: N/A
  Stream #0:0: Video: png, pal8(pc, gbr/unknown/unknown), 800x800, 25 fps, 25 tbr, 25 tbn


    


  • Issue with ffprobe execution within Docker Environment

    7 mars, par Khải Hồ Quang

    Here is my Dockerfile :

    


    FROM node:18-slim as builder

WORKDIR /usr/src/ai_api_builder/

COPY package*.json tsconfig.json /usr/src/ai_api_builder/

RUN apt-get update && \
    apt-get install mariadb-client -y && \
    npm install && npm cache clean --force

RUN apt install ffmpeg -y && \
    ffmpeg -version && \
    ffprobe -version
COPY ${REPO_DIR}/ ./

RUN npm run build && mv audio_store node_modules dist/

FROM node:18-slim

# Create and cd into app directory
WORKDIR /usr/src/dwt_api_app/dist

# Copy the artifact to the new image
COPY --from=builder /usr/src/dwt_api_builder/dist ./

EXPOSE 3001

ENTRYPOINT ["node", "app.js"]


    


    When I build Dockerfile, the step check ffmpeg and ffprobe version worked :

    


    ffmpeg version 5.1.4-0+deb12u1 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 12 (Debian 12.2.0-14)
...
ffprobe version 5.1.4-0+deb12u1 Copyright (c) 2007-2023 the FFmpeg developers


    


    But when I run container, my TypeScript code not work (the metadata return undefined) :

    


    import { ffprobe } from "fluent-ffmpeg";
ffprobe(latestFilePath, async function(err: any, metadata: any) {
    console.log("metadata", metadata);
})


    


    When I exec to container and check ffmpeg -version and ffprobe -version, I got : bash: ffmpeg: command not found. And when I check in bin folder, also couldn't find ffmpeg.
    
I tried it locally (Centos7), not in container, it worked (metadata return an object), and here is ffprobe version

    


    ffprobe version 6.1-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2007-2023 the FFmpeg developers <b>&#xA;&#xA;</b>

    &#xA;

    What step did I do wrong when running the container or is there any difference between debian (in container) and centos 7 (local) that I need to pay attention to ? Thanks

    &#xA;

  • Unable to choose an output [closed]

    17 février, par Xdangin

    I try to change the time for subtitle and every time this pop up on my face

    &#xA;

    &#xA;

    Unable to choose an output format for 'output-subfamily' ; use a standard extension for the filename or specify the format manually

    &#xA;

    &#xA;

    srry guys cuz I don't get it but I'm new at this

    &#xA;

    here's the full log im case I wrote something wrong

    &#xA;

    /sdcard $ ffmpeg -itsoffset 2 -i Family.Guy.S04E23.srt -c:v copy output-sub family guy.srt&#xA;&#xA;ffmpeg version 6.1.1 Copyright (c) 2000-2023 the FFmpeg developers&#xA;&#xA;  built with Android (10552028, &#x2B;pgo, &#x2B;bolt, &#x2B;lto, -mlgo, based on r487747d) clang version 17.0.2 (https://android.googlesource.com/toolchain/llvm-project d9f89f4d16663d5012e5c09495f3b30ece3d2362)&#xA;&#xA;  configuration: --arch=aarch64 --as=aarch64-linux-android-clang --cc=aarch64-linux-android-clang --cxx=aarch64-linux-android-clang&#x2B;&#x2B; --nm=llvm-nm --pkg-config=/home/builder/.termux-build/_cache/android-r26b-api-24-v1/bin/pkg-config --strip=llvm-strip --cross-prefix=aarch64-linux-android- --disable-indevs --disable-outdevs --enable-indev=lavfi --disable-static --disable-symver --enable-cross-compile --enable-gnutls --enable-gpl --enable-version3 --enable-jni --enable-lcms2 --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgme --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenmpt --enable-libopus --enable-librav1e --enable-libsoxr --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-mediacodec --enable-opencl --enable-shared --prefix=/data/data/com.termux/files/usr --target-os=android --extra-libs=-landroid-glob --disable-vulkan --enable-neon --disable-libfdk-aac&#xA;&#xA;  libavutil      58. 29.100 / 58. 29.100&#xA;&#xA;  libavcodec     60. 31.102 / 60. 31.102&#xA;&#xA;  libavformat    60. 16.100 / 60. 16.100&#xA;&#xA;  libavdevice    60.  3.100 / 60.  3.100&#xA;&#xA;  libavfilter     9. 12.100 /  9. 12.100&#xA;&#xA;  libswscale      7.  5.100 /  7.  5.100&#xA;&#xA;  libswresample   4. 12.100 /  4. 12.100&#xA;&#xA;  libpostproc    57.  3.100 / 57.  3.100&#xA;&#xA;Input #0, srt, from &#x27;Family.Guy.S04E23.srt&#x27;:&#xA;&#xA;  Duration: N/A, bitrate: N/A&#xA;&#xA;  Stream #0:0: Subtitle: subrip&#xA;&#xA;[AVFormatContext @ 0x75b7eb2500] Unable to choose an output format for &#x27;output-sub&#x27;; use a standard extension for the filename or specify the format manually.&#xA;&#xA;[out#0 @ 0x75b7e3e840] Error initializing the muxer for output-sub: Invalid argument&#xA;&#xA;Error opening output file output-sub.&#xA;&#xA;Error opening output files: Invalid argument&#xA;&#xA;/sdcard $ ffmpeg -itsoffset 2 -i Family.Guy.S04E23.srt -c copy output-sub family guy.srt&#xA;

    &#xA;

    I searched YouTube but didn't find anything

    &#xA;