ConvertX icon indicating copy to clipboard operation
ConvertX copied to clipboard

error converting with ffmpeg (from mp4 to av1)

Open thejjw opened this issue 9 months ago • 3 comments

I said to av1, but seems to occur with hevc, etc. as well

here is the docker logs pertinent to the incidence:

stderr: ffmpeg version 6.1.1 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 13.2.1 (Alpine 13.2.1_git20240309) 20240309
  configuration: --prefix=/usr --disable-librtmp --disable-lzma --disable-static --disable-stripping --enable-avfilter --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-libmp3lame --enable-libopenmpt --enable-libopus --enable-libplacebo --enable-libpulse --enable-librav1e --enable-librist --enable-libsoxr --enable-libsrt --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-lto=auto --enable-lv2 --enable-openssl --enable-pic --enable-postproc --enable-pthreads --enable-shared --enable-vaapi --enable-vdpau --enable-version3 --enable-vulkan --optflags=-O3 --enable-libjxl --enable-libsvtav1 --enable-libvpl
  libavutil      58. 29.100 / 58. 29.100
  libavcodec     60. 31.102 / 60. 31.102
  libavformat    60. 16.100 / 60. 16.100
  libavdevice    60.  3.100 / 60.  3.100
  libavfilter     9. 12.100 /  9. 12.100
  libswscale      7.  5.100 /  7.  5.100
  libswresample   4. 12.100 /  4. 12.100                                                                                                                                                                           libpostproc    57.  3.100 / 57.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from './data/uploads/1/4/20250519075757_9ymzX6QgXT.mp4':
  Metadata:
    major_brand     : isom                                                                                                                                                                                           minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.12.100
    comment         : vid:v1c044g50000d0l0m4nog65lbd13q80g                                                                                                                                                         Duration: 00:00:37.99, start: 0.000000, bitrate: 1826 kb/s                                                                                                                                                       Stream #0:0[0x1](und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(progressive), 576x1024 [SAR 1:1 DAR 9:16], 1639 kb/s, 30 fps, 30 tbr, 15360 tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
  Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 180 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]
[AVFormatContext @ 0xb946b9994c0] Unable to choose an output format for './data/output/1/4/20250519075757_9ymzX6QgXT.av1'; use a standard extension for the filename or specify the format manually.
[out#0 @ 0xb946b93e4c0] Error initializing the muxer for ./data/output/1/4/20250519075757_9ymzX6QgXT.av1: Invalid argument
Error opening output file ./data/output/1/4/20250519075757_9ymzX6QgXT.av1.
Error opening output files: Invalid argument

Failed to convert ./data/uploads/1/4/20250519075757_9ymzX6QgXT.mp4 from mp4 to av1 using ffmpeg. error: Error: Command failed: ffmpeg -i ./data/uploads/1/4/20250519075757_9ymzX6QgXT.mp4 ./data/output/1/4/20250519075757_9ymzX6QgXT.av1                                                                                                                                                                                         ffmpeg version 6.1.1 Copyright (c) 2000-2023 the FFmpeg developers                                                                                                                                                 built with gcc 13.2.1 (Alpine 13.2.1_git20240309) 20240309
  configuration: --prefix=/usr --disable-librtmp --disable-lzma --disable-static --disable-stripping --enable-avfilter --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-libmp3lame --enable-libopenmpt --enable-libopus --enable-libplacebo --enable-libpulse --enable-librav1e --enable-librist --enable-libsoxr --enable-libsrt --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-lto=auto --enable-lv2 --enable-openssl --enable-pic --enable-postproc --enable-pthreads --enable-shared --enable-vaapi --enable-vdpau --enable-version3 --enable-vulkan --optflags=-O3 --enable-libjxl --enable-libsvtav1 --enable-libvpl      
  libavutil      58. 29.100 / 58. 29.100                                                                                                                                                                           libavcodec     60. 31.102 / 60. 31.102                                                                                                                                                                           libavformat    60. 16.100 / 60. 16.100                                                                                                                                                                           libavdevice    60.  3.100 / 60.  3.100                                                                                                                                                                           libavfilter     9. 12.100 /  9. 12.100                                                                                                                                                                           libswscale      7.  5.100 /  7.  5.100                                                                                                                                                                           libswresample   4. 12.100 /  4. 12.100                                                                                                                                                                           libpostproc    57.  3.100 / 57.  3.100                                                                                                                                                                         Input #0, mov,mp4,m4a,3gp,3g2,mj2, from './data/uploads/1/4/20250519075757_9ymzX6QgXT.mp4':                                                                                                                        Metadata:                                                                                                                                                                                                          major_brand     : isom                                                                                                                                                                                           minor_version   : 512                                                                                                                                                                                            compatible_brands: isomiso2avc1mp41                                                                                                                                                                              encoder         : Lavf58.12.100                                                                                                                                                                                  comment         : vid:v1c044g50000d0l0m4nog65lbd13q80g                                                                                                                                                         Duration: 00:00:37.99, start: 0.000000, bitrate: 1826 kb/s                                                                                                                                                       Stream #0:0[0x1](und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(progressive), 576x1024 [SAR 1:1 DAR 9:16], 1639 kb/s, 30 fps, 30 tbr, 15360 tbn (default)                                   Metadata:                                                                                                                                                                                                          handler_name    : VideoHandler                                                                                                                                                                                   vendor_id       : [0][0][0][0]                                                                                                                                                                               Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 180 kb/s (default)                                                                                                             Metadata:                                                                                                                                                                                                          handler_name    : SoundHandler                                                                                                                                                                                   vendor_id       : [0][0][0][0]                                                                                                                                                                             [AVFormatContext @ 0xb946b9994c0] Unable to choose an output format for './data/output/1/4/20250519075757_9ymzX6QgXT.av1'; use a standard extension for the filename or specify the format manually.             [out#0 @ 0xb946b93e4c0] Error initializing the muxer for ./data/output/1/4/20250519075757_9ymzX6QgXT.av1: Invalid argument                                                                                       Error opening output file ./data/output/1/4/20250519075757_9ymzX6QgXT.av1.                                                                                                                                       Error opening output files: Invalid argument                                                                                                                                                                                                                                                                                                                                                                                      error: NOT_FOUND                                                                                                                                                                                                  status: 404,                                                                                                                                                                                                       code: "NOT_FOUND"                                                                                                                                                                                                                                                                                                                                                                                                                    at NotFoundError (/app/node_modules/elysia/src/error.ts:87:3)                                                                                                                                                                                                                                                                 

The mp4 file, although i don't think this is specific to the file, is this

I'd appreciate if you could take a look at it...although this is not critical to me (since i use image conversion mostly) i think this is one of the main functionalities anyway.

Also it would be nice to have some control of how conversion would happen (bitrate, q parameter, etc...although default by no-option is fine by me for casual use though)... it was indeed my purpose to try this out to see what quality does convertx produce as i select av1, hevc, etc.

Thanks.

thejjw avatar May 19 '25 06:05 thejjw

I can recreate it with the provided video, will look into it when I have time

C4illin avatar May 19 '25 08:05 C4illin

av1 needs a container, what do you think is the best default mkv or mp4? mkv is the most flexible so I guess that it's best

C4illin avatar May 19 '25 10:05 C4illin

i personally use mp4 but thats probably just my personal preference (i think i started using it after seeing some downloads from YouTube av1 videos were made in mp4 format) I think mkv is a sensible default too

thejjw avatar May 19 '25 20:05 thejjw