Fraunhofer FDK AAC vs professional NLE AAC encoders?
The consensus is that libfdk_aac is the best AAC encoder in FFmpeg; I’d like to know how it compares to, for example, the encoder used by DaVinci Resolve. Thanks :)
The consensus is that libfdk_aac is the best AAC encoder in FFmpeg; I’d like to know how it compares to, for example, the encoder used by DaVinci Resolve. Thanks :)
If you've made an app or web service which utilizes FFmpeg for significant parts for its functionality, then you can list your project in a comment here (and only here).
Format your comment like below:
Title: <your project or app name>
Launched: <date of first release>
Link: <URL>
Type: < app / script / library / web app / web API ..etc >
Description: <a short-ish description (< 200 words)>
Showcase: <links to screenshots or videos>
FFmpeg details: <some technical details about how ffmpeg is utilized>
License: < for OSS apps/scripts, details of license, else 'commercial' >
Pricing model: < i.e. subscription / per-use / free ...etc >
Organization: <name and URL of who's behind this>
Incomplete, misleading or improperly formatted posts are liable to be removed. If you're unsure of the suitability or formatting of your post, message the mods with your draft before posting.
(I think Lagarith is pretty well-known you don't know what YULS is: https://www.yuvsoft.com/2d-technologies/lossless-video-codec/ )
If this is possible how would I go about doing this? (I've never made a custom build before, please keep that in mind, I have NO CLUE what the heck I am doing!!)
Hello, I would love some feedback.
I have made a Bash script using to convert a bunch of .mp4 files to a newer, less space hungry codec (H.265) without a drop in quality.
It only scan for .mp4 files but can be changed quite easily.
After converting, it append "_cc" to the end of the filename, it will also not convert files who already have that substring.
It will delete the original at the end, but can be changed also if needed, then give you info about the total space saved and how long the script was running
https://github.com/PassPhoenix/ffmpeg_converter_H265/blob/main/ffmpeg_h265_converter_mp4.sh
Is there a better way to go about the wall of "echo -n" I did? The code in general?
It's a very simple script and I am learning
Or here for the code:
#! /usr/bin/bash
input_format="mp4"
datasaved=0
SECONDS=0
number_files_converted=0
for file in *."$input_format"; do
base_name=$(basename "$file" .$input_format)
output_file="${base_name}_cc.${input_format}"
if [[ $base_name == *"_cc"* ]]; then
continue
fi
size_vid=$(stat --format "%s" "$file")
echo "Converting file: $file"
ffmpeg -hide_banner -loglevel error -i "$file" -c:v libx265 -x265-params log-level=none -crf 28 -c:a copy "$output_file"
size_vid_after=$(stat --format "%s" "$output_file")
echo -n "Converted $file ("
echo -n "$size_vid"| numfmt --to iec
echo -n ") to $output_file ("
echo -n "$size_vid_after" | numfmt --to iec
echo -n ") Reduced by -"
echo -n $((size_vid - size_vid_after)) | numfmt --to iec
echo "."
((datasaved+= size_vid - size_vid_after))
echo -n "Size saved so far: "
echo $datasaved | numfmt --to iec
printf "\n"
rm "$file"
((number_files_converted++))
done
echo -n "Total saved is "
echo $datasaved | numfmt --to iec
duration=$SECONDS
echo "$((duration / 60)) minutes and $((duration % 60)) seconds elapsed for $number_files_converted files converted."
Hi, I would like to know how do you pipe ffmpeg into exhale?
This isn't working
ffmpeg -i test.flac -f wav | exhale 1 output.m4a
exhale error message:
ERROR while trying to open WAVE file: invalid or unsupported audio format!
Working on a desktop subtitle editor called Flixlar.
Recently added support for embedding multiple mov_text subtitle tracks directly into MP4 exports.
Current test:
- English
- French
- German
- Italian
- Spanish
Verified in:
- QuickTime Player
- VLC
Using FFmpeg under the hood.
Still improving the workflow/UI, but pretty happy seeing native subtitle track switching working in QuickTime 🙂
I want to thank those how have helped me over the last couple of years with ffmpeg.
I have produced several videos with ffmpeg and posted a couple of 4K SDR timelapses on youtube. They worked great.
I also want to put 4K HDR 10-bit/channel video on youtube and have struggled to find the right settings.
The videos below were produced entirely with ffmpeg (with some pre-work in audacity editing the 5.1 surround sound).
I first made the complete video in prores yuv422p10le
Then I converted the video to 420 with -pix_fmt yuv420p10le -crf 17 -c:v hevc -x265-params colorprim=bt2020:transfer=smpte2084:colormatrix=bt2020nc
and played it on an LG OLED TV via a USB stick. The TV shows that is it HDR and the video looks great (to me).
Ffmpeg shows it as:
hevc (hev1 / 0x31766568), yuv420p10le(tv, bt2020nc/bt2020/smpte2084, progressive), 3840x2160, q=2-31, 59.94 fps
I converted for youtube with the following
ffmpeg -probesize 100M -i input-prores-422.mkv -crf 17 -preset slow -c:a aac -c:v hevc -pix_fmt yuv420p10le -x265-params colorprim=bt2020:transfer=smpte2084:colormatrix=bt2020nc -movflags +faststart output-youtube.mp4
Ffmpeg also shows the result as yuv420p10le as above.
I uploaded to youtube and the uploaded file is here (I hope this is OK to post here):
https://www.youtube.com/watch?v=VWR1nlZn22U
When played youtube on my LG OLED TV, the TV does not report it as HDR, and there are posterization artifacts typical of that when I played my video (before youtube) on an SDR display.
So what can I do to get youtube to play 4K HDR?
Hey,
I am looking for a GUI on Bazzite Linux
Or as this might be blasphemous here, instructions to get FFMPEG built on Bazzite
Thx
Edit, removed useless attempts at an app.
1st one is normal video colors. I'm aiming instead at getting colors like the 2nd picture, it's the same style of inversion found in samsung phones and iphones: black and white are inverted, light blue becomes dark blue, dark red becomes light red and so on. 3rd picture is instead what I'm getting, it's the classic color inversion: black becomes white, red becomes light blue, green becomes magenta...
Hi! I'm trying to figure out what FFmpeg command line YTD Video Downloader uses to convert video. On their offical site https://www.ytddownloader.com/help.html they listed the command lines to convert video to MP3 specifying high (256kbps), optimal (192kbps), medium (128k), & low (96kbps)
MPEG Audio Layer 3 (MP3)
ffmpeg -i %1 -vn -ar 22050 -ab 96k -ac 2 %1.mp3
ffmpeg -i %1 -vn -ar 44100 -ab 128k -ac 2 %1.mp3
ffmpeg -i %1 -vn -ar 48000 -ab 192k -ac 2 %1.mp3
ffmpeg -i %1 -vn -ar 48000 -ab 256k -ac 2 %1.mp3
However there is an option that I have always used, "same as original", which automatically keeps the same kbps as the video files, what command line is that?
I need to know this so I can directly use FFmpeg to batch cut multiple video into audio at different timestamps, which cannot be done on YTD Video Downloader (no batch option for different timestamps, but FFmpeg can run a .bat containing different command lines making it work)
Thank you!
I want to convert Yuv (or is it really YCbCr?) to Lab. Is there a built in way to do this or to maybe specify an arbitrary color transform through a matrix or something?
I have used a DVD recorder to copy my old Hi8 videos to DVD's. Now I want to de-interlace them without losing any quality (probably converting to 60fps) and then converting to a compressed .mkv with x265. No matter what I do, the sound comes out out of sync and since some of these are 2 hour videos I have to CTRL-C them after about 20 - 30 seconds to check for sync issues before letting the systme run for hours converting a 2 hour video. I don't care if this is done in one, two, or three steps. I'm looking for a tried and true script(s) that someone has used successfully. Can anyone help?
PS. this will be run on either a mac pro with an i9 or an HP Envy with an i7-8550U with an Nvidia MX-150 so in either case, it needs to keep the laptop from going to sleep.
I was working on video transcoding pipeline and I found a problem that keep coming again and again.
Some videos don’t have standard resolution (like 1920x1080 or 1280x720).
They can come from phones, screen record, user uploads, etc.
This causes problems like:
I tried to solve this in a simple and practical way using FFmpeg.
I wrote everything here with examples and explanation:
Maybe it can help someone working on video pipeline or streaming.
If anyone here already handled this in a better way, I’m curious to know.
This:
ffmpeg -i 'house_construction_birds_eye_view_child_day_1.avi' -vf "select='not(mod(n,2))',setpts=N*2/FRAME_RATE/TB" -c:v libaom-av1 -crf 0 -c:a copy house_construction_birds_eye_view_child_day_1_av1_crt.mkv
...yeilds this:
[vost#0:0 @ 0x7f99dfa06140] Unknown encoder 'libaom-av1'
[vost#0:0 @ 0x7f99dfa06140] Error selecting an encoder
Error opening output file house_construction_birds_eye_view_child_day_1_av1_crt.mkv.
Error opening output files: Encoder not found
What do I do?
which one?
my rig is a custom 3900x cpu , rx 6750xt , 64gb ram with
twin 1tb nvme drives (main os drive & 2nd for renders & other)
with tuxedo os linux an 9tb nas
________________________________________________________________________________
__
up-till now the the script download link work as intended up-scaling an
compressing my blu-ray collection
i was able to take my 12monkey blu-ray 4 seasons of about 320gb with avg file
size of 8.5gb
slightly reduced from the 11gb og from the make-mkv disc rips
to an avg file size of 1.6gb for a new avg total of 56gb
for all with a nice and clean upscale to 1440p this took only 2hr 5min not bad
______________________________________________________________
but this script has fail further use wit to many crashes i tried as a nood to
build myself and even repair and build assist with chat gpt 5 so can someone
here fix my build to work as intended below
║ 🎬 VAAPI RENDER ENGINE
INPUT_DIR="/mnt/nas/TV/RENDERS"
OUTPUT_DIR="/media/xxxxxxxx/xxxxxx/rendered vids"
THREADS=6 # CPU threads per encode
VIDEO_JOBS=2 # VAAPI parallel encodes (GPU safe limit)
TEMP_DIR="/tmp/temp_render_encodes" # Temporary directory for intermediate
encoding files
mkdir -p "$OUTPUT_DIR"
mkdir -p "$TEMP_DIR" # Ensure /tmp/temp_render_encodes directory exists
id prefer this if possible this config
________________________________
if [[ "$VCODEC" == "h264_vaapi" ]]; then
# QP table for H.264 encoding (h264_vaapi)
if (( height <= 1200 )); then
case "$QUALITY" in
fast) QP=26 ;;
balanced) QP=23 ;;
heavy) QP=20 ;;
esac
else
case "$QUALITY" in
fast) QP=26 ;;
balanced) QP=22 ;;
heavy) QP=21 ;;
esac
fi
elif [[ "$VCODEC" == "hevc_vaapi" ]]; then
# QP table for HEVC encoding (hevc_vaapi)
if (( height <= 1200 )); then
case "$QUALITY" in
fast) QP=28 ;;
balanced) QP=24 ;;
heavy) QP=21 ;;
esac
else
case "$QUALITY" in
fast) QP=28 ;;
balanced) QP=22 ;;
heavy) QP=21 ;;
_____________________________________________________
with this config
#### 4. **Bitrate Control and Buffer Settings (Only for Upscaling):**
- **For 720p → 1080p Upscaling**:
- **Max Bitrate (`-maxrate`)**: `4096k`
- **Min Bitrate (`-minrate`)**: `2048k`
- **Buffer Size (`-bufsize`)**: `285696k` (calculated as 25% extra buffer
size)
- **QP Range**: The **QP** value is constrained between **21** (minimum
quality) and **25** (maximum quality).
- **For 1080p → 1440p Upscaling**:
- **Max Bitrate (`-maxrate`)**: `5120k`
- **Min Bitrate (`-minrate`)**: `3072k`
- **Buffer Size (`-bufsize`)**: `204800k` (calculated as 25% extra buffer
size)
- **QP Range**: The **QP** value is constrained between **21** (minimum
quality) and **27** (maximum quality).
_________________________________________________________________
if qp mode cant be done this way go with instead
vbr mode with the same min & max bit-rates and buffer
amounts
for either id like a per job memory allocation to be 2048MB as iv got 64GB
so more the enough
_________________________________________________________________________
and make the user interface for after running the shell command to layout as
manual toggle select codecs . present mode , audio copy or convert , & upmix &
convert like this
_________________________________________________________
1 Select codec:
h264
hevc
2 Select mode:
fast (cpu/gpu 20%/50^ ish use)
balanced (cpu/gpu 50%/50^ ish use)
heavy (cpu/gpu 70%/85^ ish use)
3 select mode:
copy
convert to alac 24bit 5.1 wt 3db audio boost
4 Enable stereo →
alac 24bit wt-3db auio boost to 5.1 upmix? (y/n)
(option 4 needs to for Audio Up-mixing
____________________________________________________
for the Audio up-mix Filter the needs script apply
a **5.1 surround sound upmixing filter when enabled by the user.
- Stereo audio is upmixed to a **5.1 surround sound** layout with the
following filter:
- `pan=5.1|FL=FL|FR=FR|FC=0.5*FL+0.5*FR|LFE=0.3*FL+0.3*FR|BL=FL|BR=FR`)
____________________________________________________________________
option 2 needs to fail under these parameters
#### 4. **Bitrate Control and Buffer Settings (Only for Upscaling):**
- **For 720p → 1080p Upscaling**:
- **Max Bitrate (`-maxrate`)**: `4096k`
- **Min Bitrate (`-minrate`)**: `2048k`
- **Buffer Size (`-bufsize`)**: `432000k`
- **QP Range**: The **QP** value is constrained between **21** (minimum
quality) and **25** (maximum quality).
- **For 1080p → 1440p Upscaling**:
- **Max Bitrate (`-maxrate`)**: `5120k`
- **Min Bitrate (`-minrate`)**: `3072k`
- **Buffer Size (`-bufsize`)**: `648000k`
- **QP Range**: The **QP** value is constrained between **21** (minimum
quality) and **27** (maximum quality).
__________________________________________________________
#### 5. **Resolution Handling (Upscaling):**
The script forces **upscaling** to higher resolutions:
- **720p → 1080p**: For videos with an original resolution of 720p.
- **1080p → 1440p**: For videos with an original resolution of 1080p.
- Upscaling ensures the output video is encoded at a higher resolution than the
original, improving viewing quality on larger displays.
___________________________________________________________________
#### 6. **Parallel Execution:**
- The script is set to run **2 parallel encoding jobs** at a time, allowing for
concurrent encoding of multiple files.
- A **1-minute delay** is introduced between sets of encoding jobs to prevent
system overload.
---
#### 7. **Threading and CPU Usage:**
- **CPU Thread Count**: The script uses **6 CPU threads** per encode, which
maximizes multi-core processing capabilities for faster encoding times.
________________________________________________________________________
#### 8. **File Handling and Output:**
- **File Formats**: The script scans for the following video file types in the
source folder:
- `.mkv`
- `.mp4`
- `.avi`
- `.mov`
_______________________________________________________________
- **File Organization**:
- Output files are stored in a specified output directory.
- Files are organized into subfolders based on the season (if applicable).
season 1 epi's in season 1 folder in target output folder for renders
- **File Extension**: Output files are saved with the `.m4v` extension.
_________________________________________________________________
#### 9. **Quality Control (QP and Buffer Management):**
- Quantization Parameters (QP)**: The QP
value is dynamically set based on the
- resolution and mode chosen.
- For **720p → 1080p**: The QP range is **21–25**.
- For **1080p → 1440p**: The QP range is **22–27**.
**Removed Options:**
- The **faststart** option has been **removed** from the encoding command, which
means that video files will not have the `moov` atom moved to the beginning of
the file.
________________________________________________________________________
### **Script Behavior Summary:**
- This script **upscales videos**
(600p to 720 → 1080p, 800p to 1088p→ 1440p)
for encoding**.
I have ffmpeg and also have the commercial E-AC3 encoder on a 90 day license from Dolby. What bitrate would basically give me transparent audio? I'm curious to try it out but want to keep all the fidelity I can. I'm have a large amount of TrueHD, DTS-HD, etc and I want to compress it without a loss in quality my ears can tell. At my home I use a Bose soundbar/sub system which works great with opus but my Onkyo TX-NR7100 9.2-Channel AVR doesn't like it. It will pass through to my AppleTV/GoogleTV Streamer but it's constantly doing this "click" every few seconds that sounds mechanical and based on all the forums it's just something it does with opus. I basically have been wanting my library to be more universal and Opus doesn't seem to like AVRs as much. Being able to get E-AC3 through my company for a bit to play with does have me excited.
My library is also out of space. While I know Opus is more efficient it's not my only goal so it's more of a compatibility+compression. I want to save the space I can but not at the expense of audio quality. I'll buy replacement hard drives as well. However even at max bitrate there's a substantial amount of disk savings to be had.
My question isn't about which codec to use but what bitrate to use. I'm going to do 2 pass VBR using Dolby's Encoding Engine. What bitrate for 5.1 and 7.1 is considered transparent? I don't have a 5.1 or 7.1 system. My home has the Bose Soundbar 700 w sub so that's 3.1 and our family bayhome has a polk audio 3.2 setup. I wanted to keep the channels all matching and try to preserve as much as possible for others using it with their systems. I also watch a ton on my macbook pro as well using headphones and am currently building out a man cave with a 13ftx9ft theater screen so no telling where that project is going to end up lol.
Even if it's just for compatibility it's better I go with E-AC3. So what bitrates for 5.1 and 7.1?
Hi,
When ripping DVD/BluRay to mkv files, or when downloading too large movie files from "various sources", I used to reencode 5.1 tracks (most of time AC3 or EAC3) to AAC (keeping the 5+1 channels, and using 256 or 320 kb/s overall).
My home setup is:
So basically I only need 2.0 tracks, but I keep the 5+1 channels just in case I can play them in the future, or for people I share the files with and who have 5.1 setups.
Custom downmixing to 2.0
But often I was facing the "buried dialogs" issue, that is dialogs that sound too weak compared to the music and various sounds. And also a too large dynamic range, forcing to constantly adjust the volume between quiet and noisy sequences.
So at some point I decided to generate 2.0 tracks in addition to the transcoded 5.1 tracks. For this I am using a custom downmix to reinforce the central channel with the voices and attenuate (not suppress) the surround channels in the mix, and a custom dynamic compression:
`-filter:a pan=stereo|c0=c0+0.707*c2+0.5*c4+0.5*c6+0.5*c3|c1=c1+0.707*c2+0.5*c5+0.5*c7+0.5*c3,compand=attacks=0.3:decays=0.8:points=-96/-78|-24/-24|0/-6|24/12:delay=0.2`
Works pretty well actually, at least I am satisfied with the results.
Transcoding to 5.1 AAC, a very bad idea ?
The question now is about what to do with the 5.1 transcoding to AAC ? I recently understood (never too late...) that AC3 has a bunch of metadata to instruct the decoders how to play the tracks: how to downmix to 2.0, how to apply a dynamic compression if desired...
So I wonder if I was simply not doing things completely wrong from the beginning : if the decoder is receiving the original AC3 tracks it can properly use all the metadata to properly downmix, apply dynamic compression... But by converting to 5.1 AAC wasn't I just depriving the A/V amplifier of these informations, hence the burried dialogs etc,... ?
Solutions ?
keeping the original AC3 tracks, and rely on the decoders to properly do their job even on a 2.0 setup? Drawback: AC3 tracks are up to 640 kb/s, and this is even worse with EAC3 and various DTS tracks, which can sometimes raise to 1500 kb/s. Makes no sense to keep such bitrates when asking ffmpeg to work hard to compress the video track to x265 2500 kb/s (all the more than I often keep at least 2 audio tracks, the native + a dubbed one).
reencoding AC3 to AC3 with lower bitrates, and keeping all the AC3 metadata. But I'm not how to preserve the metadata, and I've read that the AC3 ffmpeg encoder is not very good (maybe not even decent).
transcoding to 5.1 AAC tracks, but also applying custom remix (reinforcing the central channel for instance) and dynamic compression rules. This wouldn't render the same as the original AC3 track on a 5.1 setup, but it would be better on a 2.0 setup. Kind of tradeoff, then.
What are your thoughts ?
I'm trying to convert a bunch of audio files to a lower quality audio with this command
ffmpeg -i *.mp3 -c:a libopus -b:a 64k -sample_fmt s16 -ar 48000 *.opus
but i just don't know how i would automate the process
I'm on Linux if that helps
I really need to get some of my artwork back because I wrote over the original work by mistake. I was able to find my old saves but they are a filetype called ".file" that doesnt seem supported by anything? I usually use ffmpeg with yt-dlp so I have no clue here but was hoping it's possible. Could there be a way to convert my .file to .kra or even .png/.jpeg?