reticivis-net / mediaforge

A Discord bot for editing and creating videos, images, GIFs, and more!
GNU General Public License v3.0
81 stars 28 forks source link

ffmpeg: One of -r/-fpsmax was specified together a non-CFR -vsync/-fps_mode. This is contradictory. #200

Closed HenryStickmin0 closed 1 year ago

HenryStickmin0 commented 1 year ago

It wont work

reticivis-net commented 1 year ago

Where traceback.txt

HenryStickmin0 commented 1 year ago
DATETIME:2023-08-11 17:15:33.353617
COMMAND:
TRACEBACK:
processing.common.CMDError: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/dev/shm/mediaforge/iRGRBjHN.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    encoder         : Lavf60.10.100
  Duration: 00:00:11.15, start: 0.000000, bitrate: 44149 kb/s
  Stream #0:0[0x1](und): Video: png (mp4v / 0x7634706D), rgb24(pc, gbr/bt709/bt709, progressive), 480x862 [SAR 1199:1200 DAR 1199:2155], 44461 kb/s, 30 fps, 30 tbr, 15360 tbn (default)
    Metadata:
      handler_name    : ISO Media file produced by Google Inc.
      vendor_id       : [0][0][0][0]
      encoder         : Lavc60.22.100 png
  Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default)
    Metadata:
      handler_name    : ISO Media file produced by Google Inc.
      vendor_id       : [0][0][0][0]
Multiple -c, -codec, -acodec, -vcodec, -scodec or -dcodec options specified for stream 0, only the last option '-c:v png' will be used.
[vost#0:0/png @ 0x5555ec04ea40] One of -r/-fpsmax was specified together a non-CFR -vsync/-fps_mode. This is contradictory.
Error opening output file /dev/shm/mediaforge/GbBkyclw.mp4.
Error opening output files: Invalid argument

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/root/.cache/pypoetry/virtualenvs/mediaforge-HXFskkj--py3.11/lib/python3.11/site-packages/discord/app_commands/commands.py", line 827, in _do_call
    return await self._callback(self.binding, interaction, **params)  # type: ignore
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mediaforge/src/commands/media.py", line 302, in concatv
    await process(ctx, processing.ffmpeg.concatv, [["VIDEO", "GIF"], ["VIDEO", "GIF"]])
  File "/mediaforge/src/core/process.py", line 151, in process
    raise e
  File "/mediaforge/src/core/process.py", line 121, in process
    result = await queue.enqueue(run())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mediaforge/src/core/queue.py", line 26, in enqueue
    raise e
  File "/mediaforge/src/core/queue.py", line 23, in enqueue
    res = await task
          ^^^^^^^^^^
  File "/mediaforge/src/core/process.py", line 107, in run
    command_result = await func(*args, **kwargs)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mediaforge/src/processing/ffmpeg.py", line 535, in concatv
    fixedfixedvideo1 = await changefps(fixedvideo1, fps)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mediaforge/src/processing/ffmpeg.py", line 371, in changefps
    await run_command("ffmpeg", "-hide_banner", "-i", file, "-r", str(fps), "-c", "copy", "-c:v", "png", "-fps_mode",
  File "/mediaforge/src/processing/common.py", line 75, in run_command
    raise CMDError(f"Command {args} failed.") from CMDError(result)
processing.common.CMDError: Command ('ffmpeg', '-hide_banner', '-i', '/dev/shm/mediaforge/iRGRBjHN.mp4', '-r', '30.0', '-c', 'copy', '-c:v', 'png', '-fps_mode', 'vfr', '/dev/shm/mediaforge/GbBkyclw.mp4') failed.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/root/.cache/pypoetry/virtualenvs/mediaforge-HXFskkj--py3.11/lib/python3.11/site-packages/discord/ext/commands/hybrid.py", line 438, in _invoke_with_namespace
    value = await self._do_call(ctx, ctx.kwargs)  # type: ignore
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.cache/pypoetry/virtualenvs/mediaforge-HXFskkj--py3.11/lib/python3.11/site-packages/discord/app_commands/commands.py", line 846, in _do_call
    raise CommandInvokeError(self, e) from e
discord.app_commands.errors.CommandInvokeError: Command 'concatv' raised an exception: CMDError: Command ('ffmpeg', '-hide_banner', '-i', '/dev/shm/mediaforge/iRGRBjHN.mp4', '-r', '30.0', '-c', 'copy', '-c:v', 'png', '-fps_mode', 'vfr', '/dev/shm/mediaforge/GbBkyclw.mp4') failed.
reticivis-net commented 1 year ago

can you test the same command to see if the issue still occurs?