question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Looking for validation of config file

See original GitHub issue

Hi, I’m currently looking to verify if following things can be achieved using SMA

Question 1: After qBitt has downloaded the video, it will call SMA on the file (Changed settings in qBitt as described in wiki) SMA has to convert the video(any codec format) to H264 8bit codec (Ignore if it’s already in this format) and replace the old file SMA will finish transcoding and hand back control to qBitt, which will hand back the new transcoded file to *arr

Is this what’s happening under the hood?

Question 2: I want SMA to transcode the video using my custom ffmpeg with h264_v4l2m2m encoder/decoder only (H/W accl is possible using h264_v4l2m2m on raspberry pi 4 for 64bit OS’es) Example on how SMA should call ffmpeg: ffmpeg -c:v h264_v4l2m2m -b:v 8M -c:a copy -i input.* output.mp4

Does the config file below suit the above behaviour?

pi@rpi4:~/sickbeard_mp4_automator/setup $ cat autoProcess.ini.sample
[Converter]
ffmpeg = /home/pi/bin/ffmpeg
ffprobe = /home/pi/bin/ffprobe
threads = 4
hwaccels = h264_v4l2m2m
hwaccel-decoders = h264_v4l2m2m
hwdevices = h264_v4l2m2m:/dev/video10,h264_v4l2m2m:/dev/video11
hwaccel-output-format = h264_v4l2m2m:h264_v4l2m2m
output-directory =
output-format = mp4
output-extension = mp4
temp-extension =
minimum-size = 0
ignored-extensions = nfo, ds_store
copy-to =
move-to =
delete-original = True
sort-streams = True
process-same-extensions = False
bypass-if-copying-all = False
force-convert = False
post-process = False
wait-post-process = False
detailed-progress = False
opts-separator = ,
preopts =
postopts =
regex-directory-replace = [^\w\-_\. ]


[Permissions]
chmod = 0644
uid = -1
gid = -1

[Metadata]
relocate-moov = True
full-path-guess = True
tag = True
tag-language = eng
download-artwork = poster
sanitize-disposition =
strip-metadata = False
keep-titles = False

[Video]
codec = h264, x264
max-bitrate = 0
bitrate-ratio =
crf = -1
crf-profiles =
preset =
codec-parameters =
dynamic-parameters = False
max-width = 0
profile =
max-level = 0.0
pix-fmt =
prioritize-source-pix-fmt = True
filter =
force-filter = False

[HDR]
codec =
pix-fmt =
space = bt2020nc
transfer = smpte2084
primaries = bt2020
preset =
codec-parameters =
filter =
force-filter = False
profile =

[Audio]
codec = ac3
languages =
default-language =
first-stream-of-language = False
allow-language-relax = True
channel-bitrate = 128
variable-bitrate = 0
max-bitrate = 0
max-channels = 0
prefer-more-channels = True
default-more-channels = True
profile =
filter =
force-filter = False
sample-rates =
sample-format =
copy-original = False
copy-original-before = False
aac-adtstoasc = False
ignore-truehd = mp4, m4v
ignored-dispositions =
unique-dispositions = False

[Universal Audio]
codec = aac
channel-bitrate = 128
variable-bitrate = 0
first-stream-only = False
move-after = False
profile =
filter =
force-filter = False

[Audio.ChannelFilters]
6-2 = pan=stereo|FL=0.5*FC+0.707*FL+0.707*BL+0.5*LFE|FR=0.5*FC+0.707*FR+0.707*BR+0.5*LFE

[Subtitle]
codec = mov_text
codec-image-based =
languages =
default-language =
first-stream-of-language = False
encoding =
burn-subtitles = False
burn-dispositions =
embed-subs = True
embed-image-subs = False
embed-only-internal-subs = False
filename-dispositions = forced
ignore-embedded-subs = False
ignored-dispositions =
unique-dispositions = False
attachment-codec =

h264_v4l2m2m supports both encoding & decoding

pi@rpi4:~ $ ffmpeg -codecs | grep -i h264
ffmpeg version N-105691-gc439c6b191 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 10 (Debian 10.2.1-6)
  configuration: --prefix=/home/pi/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/pi/ffmpeg_build/include --extra-ldflags=-L/home/pi/ffmpeg_build/lib --extra-libs='-lpthread -lm' --ld=g++ --bindir=/home/pi/bin --arch=aarch64 --enable-gpl --enable-gnutls --enable-libaom --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libwebp --enable-libdrm --enable-libsvtav1 --enable-libdav1d --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxml2 --enable-nonfree
  libavutil      57. 21.100 / 57. 21.100
  libavcodec     59. 21.100 / 59. 21.100
  libavformat    59. 17.102 / 59. 17.102
  libavdevice    59.  5.100 / 59.  5.100
  libavfilter     8. 27.100 /  8. 27.100
  libswscale      6.  5.100 /  6.  5.100
  libswresample   4.  4.100 /  4.  4.100
  libpostproc    56.  4.100 / 56.  4.100

Codecs:
 D..... = Decoding supported
 .E.... = Encoding supported
 ..V... = Video codec
 ..A... = Audio codec
 ..S... = Subtitle codec
 ...I.. = Intra frame-only codec
 ....L. = Lossy compression
 .....S = Lossless compression
---------
 DEV.LS h264                 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_v4l2m2m ) (encoders: libx264 libx264rgb h264_v4l2m2m h264_vaapi )

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
skyfall01commented, Feb 26, 2022

Thanks man! I shall setup SMA in my Pi right away!

0reactions
mdhigginscommented, Feb 26, 2022

Got it, this can technically be solved by setting the pix-fmt option in autoProcess but I went ahead and just hard-coded it for the h264_v4l2m2m class

37c9bfa0e6279497ba98a76a5c67f52f31acbeda

Read more comments on GitHub >

github_iconTop Results From Across the Web

Validate Configuration Files - IBM
Validate Configuration Files ; -f filename.cfg. Specifies a configuration file name to validate, where filename is the name of one of the configuration...
Read more >
Web.Config Validator - Free checker for all .NET versions
Validate your web.config for invalid configuration using the only web.config validator available. Did we forget to tell you that it is completely free?...
Read more >
Validate config file settings with nrdiag
How to validate your config file settings when using New Relic Diagnostics (nrdiag); for example, with deployments.
Read more >
Keeping your config files valid with Python - Matt's Dev Blog
You can use this tool to validate all of your loaded config at the start of your program: giving early feedback to the...
Read more >
How to validate a configuration file - Dhall Documentation
This guide illustrates how you can valid a configuration file's value (as opposed to only validating the type) through the use of the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found