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

Failed conversion doesn't provide any error message #72

Open
anon8675309 opened this issue Aug 28, 2021 · 0 comments
Open

Failed conversion doesn't provide any error message #72

anon8675309 opened this issue Aug 28, 2021 · 0 comments

Comments

@anon8675309
Copy link

Issue: When attempting to convert a video, I do not get any errors, however I always get a 0 byte output file.

Expected result: if a conversion fails, the user is shown an error message so they can easily troubleshoot the issue, file a bug report, etc.

Conditions to close: Error messages are displayed to the user

Here's an example of me attempting to convert a video. First, we have the settings (I tried many different settings, all with the same result):
video_converter_settings

After clicking the WEBM button, it appears to be working:
video_converter_active

However, that conversion screen goes away after just a couple seconds and an empty file appears.
video_converter_results

I expected that I would find some errors in the logs, indicating what went wrong. I logged in as an administrator, went to the Settings page from the drop down menu in the top right, clicked on the Logging section. There are no errors related to Video Converter, just messages about themingDefaults which predate the installation of Video Converter. Still, I will paste them here for reference (in case the problem causing that is also causing issues with Video Converter):

OCP\AppFramework\QueryException: Could not resolve themingDefaults! Class themingDefaults does not exist

After SSHing into the server:

  • /var/log/syslog contains nothing of interest
  • journalctl -e doesn't show anything
  • /var/log/apache2/nextcloud_error.log didn't have anything relevant
  • /var/log/apache2/error.log finally turned up some clues!

The relevant bits of /var/log/apache2/error.log:

ffmpeg version 4.1.6-1~deb10u1 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
  configuration: --prefix=/usr --extra-version='1~deb10u1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --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-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
Input #0, avi, from '/var/www/nextcloud/data/__groupfolders/4/Topics/Funny/big_buck_bunny_480p_surround-fix.avi':
  Duration: 00:09:56.46, start: 0.000000, bitrate: 2957 kb/s
    Stream #0:0: Video: mpeg4 (Simple Profile) (FMP4 / 0x34504D46), yuv420p, 854x480 [SAR 1:1 DAR 427:240], 2500 kb/s, 24 fps, 24 tbr, 24 tbn, 24 tbc
    Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), fltp, 448 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg4 (native) -> vp9 (libvpx-vp9))
  Stream #0:1 -> #0:1 (ac3 (native) -> opus (libopus))
Press [q] to stop, [?] for help
[libopus @ 0x56438911a1c0] Invalid channel layout 5.1(side) for specified mapping family -1.
Error initializing output stream 0:1 -- Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!

So it appears that ffmpeg is trying to convert from ac3 to Opus and libopus can't handle 5.1 channel audio. This is a pretty significant limitation, but I don't have any options to change the audio codecs, so at this point this would be a feature request (and there's a similar one already open #12).

This ticket isn't about getting the conversion to work, it's about the fact that no error messages were displayed.

But what if we remove that 5.1 channel audio track? Would Video Converter be able to do the job then? Well, it turns out the answer is yes. Yes it can. To reproduce, manually run the command I put in #64 to remove the audio. Upload the silent video to Nextcloud, attempt to convert it to a WEBM file, and it will work just fine.

My setup:

  • Debian 10
  • NC 20.0.2 (installed from apt repo)
  • PHP 7.3.29
  • MySQL 10.3.29
  • Video Converter 1.0.2
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

1 participant