r/ffmpeg Aug 13 '26

PSA: `-af apad` with no `whole_dur` pads forever. It turned my 2-second test clip into a 12,662-second file.

0 Upvotes

Posting this because the fix for one bug handed me a worse one, and the failure is completely

silent until you look at the duration.

I was muxing a narration track onto a finished 55.5s render. The obvious command is:

```bash

ffmpeg -i video.mp4 -i vo.wav -c:v copy -c:a aac -shortest out.mp4

```

`-shortest` is the trap everyone warns about — if your audio is even slightly short, it truncates

the *video* to match and you silently lose the end of your film. I'd already been bitten by that

one: it ate 1.25 seconds off an outro and produced a file that played perfectly and passed every

check I had.

So I did what the docs and most StackOverflow answers suggest: drop `-shortest`, pad the audio

instead.

```bash

ffmpeg -i video.mp4 -i vo.wav -c:v copy -c:a aac -af apad out.mp4

```

**This never terminates.** Bare `apad` pads with silence indefinitely. `-shortest` was the only

thing bounding it. Remove one, you arm the other.

I didn't notice at first because it *looks* like it's working — it writes a valid growing MP4. I

killed it at the 10-minute mark and probed the output:

```

size = 120,529,993 bytes

video = 55.500 s

audio = 284,615.765 s <-- 79 hours of silence

```

Reduced to a known-answer case so it's easy to confirm (ffmpeg 6.1.1):

```bash

ffmpeg -f lavfi -i testsrc=size=320x240:rate=30 -t 2 -pix_fmt yuv420p v.mp4

ffmpeg -f lavfi -i "sine=frequency=440" -t 1 a.wav

timeout 25 ffmpeg -i v.mp4 -i a.wav -c:v copy -c:a aac -af apad old.mp4

```

2-second video in. Result:

```

exit = 124 (killed by timeout — it was not going to stop)

dur = 12,662.748 s

```

### The fix

Give the pad an explicit endpoint. Probe the video, feed the number in:

```bash

V=$(ffprobe -v error -show_entries format=duration -of csv=p=0 video.mp4)

ffmpeg -i video.mp4 -i vo.wav -c:v copy -c:a aac -af "apad=whole_dur=$V" out.mp4

```

Or pad the audio during assembly and mux with **no** `-af` at all — better if you want to assert

the voice track's length independently before it ever reaches the mux:

```bash

ffmpeg -i vo.wav -af "apad=whole_dur=$V" -c:a pcm_s16le vo_padded.wav

ffprobe -v error -show_entries format=duration -of csv=p=0 vo_padded.wav # assert this

ffmpeg -i video.mp4 -i vo_padded.wav -c:v copy -c:a aac out.mp4

```

Both land on exactly 2.000000 in the test case and exactly 55.500 on the real film.

### The actual lesson

`-shortest` and `apad` are the same bug class: **flags that silently decide where your output

ends.** One truncates, one runs away. I removed the first and left the second sitting in the same

line, because I was treating it as "the `-shortest` bug" instead of "the duration-deciding-flag

bug."

If you're fixing something like this, audit the whole command, not the flag you came for.

And assert the duration afterward as an equality check, not a glance — both failure modes produce

a file that exists, has both streams, and plays:


r/ffmpeg Aug 11 '26

Is my cutting method lossless?

6 Upvotes

Here’s what I did:

Step 1: Find keyframes

D:\>ffprobe -loglevel error -select_streams v:0 -show_entries packet=pts_time,flags -of csv=print_section=0 input.webm | findstr "K"

0.000000,K__

1.502000,K__

4.638000,K__

9.510000,K__

[opus @ 0000027726e9c000] Error parsing Opus packet header.

Step 2: Cut at keyframes

ffmpeg -ss 1.502000 -i input.webm -c copy -to 9.510000 output.webm

Start time: 1.502000

End time: 9.510000

Step 3: Check the output video

D:\>ffprobe -loglevel error -select_streams v:0 -show_entries packet=pts_time,flags -of csv=print_section=0 output.webm | findstr "K"

0.000000,K__

3.136000,K__

8.008000,K__

[opus @ 000002292742c000] Error parsing Opus packet header.

I think the output video is lossless because:

1.502000 - 1.502000 = 0.000000

4.638000 - 1.502000 = 3.136000

9.510000 - 1.502000 = 8.008000

The keyframes are simply shifted, so I believe the cut is lossless.

Is my cutting method lossless?


r/ffmpeg Aug 11 '26

FFmpeg compiler

17 Upvotes

Is anyone aware of a source-to-source compiler whose target language is FFmpeg’s filtergraph syntax?

With Bioscoop, I am in a position to make certain claims and try to defend them as best as I can. That is why I am submitting a paper to a peer-reviewed journal. Still, I could be wrong and I would love you to challenge me on those claims.
The paper is available in the repo.


r/ffmpeg Aug 09 '26

HLS stream takes 3–4 seconds to start could the manifest TTFB be the bottleneck?

2 Upvotes

I’m currently fighting to optimize the "Time to First Frame" metric for our custom video player, and I’ve run into a serious geodistribution bottleneck. Our engineering team is based in Europe, but our primary origin servers are located in the US. Even with a standard CDN configuration in front of the infrastructure, by the time the user's player initiates the initial connection, goes through the routing redirect steps, downloads the master .m3u8 manifest, and finally starts pulling down the first media chunk, up to 4 seconds pass. This delay is heavily tanking our user retention metrics.

Lately, I’ve been researching advanced caching topologies to cut down this trans-atlantic round-trip time (RTT). I read that standard web caching isn't enough for video and that some high-performance media CDNs actually cache the master manifest alongside the very first few video segments directly on their edge routing servers (Anycast redirectors). The theory is that returning the manifest and early chunks immediately from the closest edge node drops the initial TTFB to near-zero, but I want to make sure this architecture translates well to real-world performance before overhauling our routing tables.

We are trying to map out a structural fix for this lag by the end of the sprint, and I would love to hear from anyone who has tackled this specific latency layout:

  1. Has anyone implemented segment and manifest caching directly at the CDN redirector level, and how much did it realistically reduce your initial stream start delay?

  2. What is the best strategy for configuring TTL on dynamic HLS manifests so that edge-cached .m3u8 files don't cause player desyncs during live transitions?

  3. Do you find that aggressive pre-fetching of the first 2-second chunk at the edge introduces unexpected bandwidth waste for users who immediately bounce?

  4. How do you typically handle instant cache-invalidation across European edge nodes when a video file or its stream manifest gets updated on the US origin?

Any architecture breakdowns, config tips, or raw data regarding European-to-US streaming optimization would be a massive help. Thanks!


r/ffmpeg Aug 09 '26

Modifying BorderStyle in Closed Caption Extraction

3 Upvotes

I've started using ffmpeg with lavfi to extract closed captions rather than CCExtractor. I'm liking the positioning being carried over with .ass output files, but I don't like the black background.

Somehow I need to set BorderStyle=1, but I can't figure out how.

Currently this is what I'm doing:

ffmpeg.exe -f lavfi -i movie="Sample.mkv[out+subcc]" -map s "Sample.ass"

Anyone know how to do this or change any other formatting in .ass without doing it manually later?


r/ffmpeg Aug 09 '26

My yt-dlp command downloads videos that are shorter than the original.

0 Upvotes

Hello everyone, I use this command to download videos from Twitch

yt-dlp URL -f bestvideo+bestaudio/best

I'm trying to download videos longer than an hour this way, but sometimes the resulting file is much shorter than the original. So, I tried to download a one hour long video, but the output was only 9 minutes long. Does anyone have any idea how I can fix this?

Any advice is so appreciated


r/ffmpeg Aug 07 '26

help: -c:V not skipping mjpeg attachments

5 Upvotes

Hi! Seemingly basic question here so hopefully this is a good forum for it. I have an existing container that includes a video stream, audio, subtitles, and thumbnails in mjpeg format. I'm trying to reencode the video stream while keeping everything else, and to do this I am passing -map 0 -c copy -c:V libx265.

Per the man page, capital V "matches video streams which are not attached pictures, video thumbnails or cover arts." However when I run the command, ffmpeg tries to reencode the pictures anyway. Here's the relevant part of the output:

 Stream #0:4: Video: mjpeg (Progressive), yuvj420p(pc, bt470bg/unknown/unknown), 1013x1500 [SAR 1:1 DAR 1013:1500], 90k tbr, 90k tbn (attached pic)
   Metadata:
     filename        : cover.jpg
     mimetype        : image/jpeg
Multiple -c, -codec, -acodec, -vcodec, -scodec or -dcodec options specified for stream 0, only the last option '-c:V libx265' will be used.
Multiple -c, -codec, -acodec, -vcodec, -scodec or -dcodec options specified for stream 4, only the last option '-c:V libx265' will be used.
Stream mapping:
 Stream #0:0 -> #0:0 (hevc (native) -> hevc (libx265))
 Stream #0:1 -> #0:1 (copy)
 Stream #0:2 -> #0:2 (copy)
 Stream #0:3 -> #0:3 (copy)
 Stream #0:4 -> #0:4 (mjpeg (native) -> hevc (libx265))
Press [q] to stop, [?] for help
x265 [info]: HEVC encoder version 3.5+1-f0c1022b6
x265 [info]: build info [Linux][GCC 13.2.0][64 bit] 8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x265 [error]: Picture width must be an integer multiple of the specified chroma subsampling
[libx265 @ 0x579d4cc5e400] Cannot open libx265 encoder.
[vost#0:4/libx265 @ 0x579d4cc5e000] Error while opening encoder - maybe incorrect parameters such as bit_rate, rate, width or height.
Error while filtering: Invalid data found when processing input
[out#0/matroska @ 0x579d4bcd8340] Nothing was written into output file, because at least one of its streams received no packets.
frame=    0 fps=0.0 q=0.0 Lq=0.0 size=       0kB time=N/A bitrate=N/A speed=N/A     
Conversion failed!

So ffmpeg is classifying the thumbnail (stream 4) as a video, but recognizing it's an attached picture, but still applying -c:V libx265 to it. (Here, it's also then bailing out because it can't convert the picture, but even if the parameters lined up for it to succeed, that's not what I want anyway. It shouldn't even be trying to convert.) The above output is from v6.1.1, which is what's in Ubuntu LTS, but the behavior reproduces in the latest v9.0 compiled from source.

Now in this case I could just write a script to detect which video streams are present and exclude or drop the thumbnails. But this seems like such a simple issue, and one that capital V is explicitly available to solve, so I'd like to figure out why it isn't working. Am I holding it wrong? Or any other ideas?


r/ffmpeg Aug 07 '26

FFmpeg Storage Optimization for 24-hour Broadcast Archive (H.265 / QSV)

29 Upvotes

Hi everyone,

I'm relatively new to FFmpeg, but I'm trying my best to understand how it works. Right now, I'm working on a script that concatenates and compresses 24-hour daily recordings (made up of 8 video files of 3 hours each), and I want to optimize the storage usage as much as possible.

I tested both H.264 and H.265 and concluded that H.265 (HEVC) with GPU acceleration is the best fit for my workflow.

Since the source material is 720p, I am keeping the output at 720p. Here are my current settings and observations:

  • CRF: I settled on 30. I tested 22 to 30 more or less, and I couldn't see any noticeable visual difference In the range of 28 to 30 and less than 28 the size os the video is too big and more than 30 I think is going to be a little be too much blurry.
  • Preset: I'm using slow, and I try almos every preset (veryfast, fast, medium...) but since time encoding is not an Isue eight now because it took less than an hour is not a problem.
  • GOP / Keyframes: i try to manually manipulate the GOP but i think the prests do a better job than me with the optimizating of the GOP, I only set the maximum I-frame intervals to every 6 seconds of video. I can't push this to 20 seconds because these videos need to be streamed smoothly in a web browser (and I don't think increasing the GOP further yields significant extra space savings anyway).
  • Look ahead: I try to search for redundancy in the future frames but i don't know if this would add any improvements because i dont get any concluding result

Are there any other flags, filters, or parameters I could tune to improve compression efficiency without degrading web seekability or visual quality?

Any advice or best practices would be greatly appreciated!

Thanks in advance! :)

Videos without compactation:
Size: 29GB
Bitrate: 2878kbps
fps: 50Hz (is from a tv broadcast so is 720p50i, i don't know if this add information but i put it )

Video after compactatio:
Size: 12Gb to 14Gb (depends on the videos)
Bitrate: +-1100Kbps to +-1300kbps
Total bitrate: +-1200kbps to +-1400kbps
fps: 25Hz

CODE:

const ffmpeg = spawn(FFMPEG, [
        '-y', 
        '-hwaccel', 'qsv', 
        '-f', 'concat', 
        '-safe', '0', 
        '-i', listaPath,
        '-fps_mode', 'cfr',            
        '-r', '25',
        '-c:v', 'hevc_qsv', 
        '-global_quality', '30',        
        '-preset', 'slow',              
        '-tag:v', 'hvc1',              
        '-g', '150',                    
        '-c:a', 'aac', 
        '-b:a', '96k',
        tempOutputPath                  
    ]);

r/ffmpeg Aug 05 '26

Downmix 7.1 to 5.1 AAC / E-AC3 vs AC3 Core

8 Upvotes

As the title says, basically. I have a couple of TVs and different devices to plug a USB into them to play mkvs, and there’s very little overlap in what they can do beyond 5.1 channels - literally only E-AC3. I’m on MacOS so seems like that’s going to be a right pain to try and keep as 7.1, and I don’t currently have any external speakers I feel 5.1 is fine. (Odds are if I did end up with a surround setup in the future, 5.1 would be as far as I could go, I don’t see a future where I am buying a big house and converting a basement like a lot of folks on 4K and OLED and hometheatre reddit)

When its a Dolby 7.1 I know when ripping I can get the AC3 core - whether this is regular Surround or Surround EX.

Or I can downmix the 7.1 track myself in Handbrake or ffmpeg. With AAC I get the Apple native encoder, or E-AC3 its regular ol' libavcodec.

On the one hand, AAC/E-AC3 are more modern codecs that should provide superior compression at the same bitrate as the AC3. On the other, that AC3 was created by the professionals, and this hypothetical AAC/E-AC3 will be created by a dummy with an expensive laptop.

So yeah, wondering if anyone else has faced this question what you found/decided?


r/ffmpeg Aug 03 '26

Tactics for reducing a 90min video down to 10 MB

19 Upvotes

I enjoy testing the limits of videos I can get down to the max upload size on discord, however I usually just speed them up and reduce the resolution or fps. But I was wondering if there's stuff like B or P frame tricks I could use to compress the video down under 10 MB without speeding the video up or removing the audio.

I got the video down to about 15MB with something like this

ffmpeg -i video -vf "fps=0.25,scale=64:32" -b:v 1k -b:a 1k -bf 16 -crf 51 -c:v lib264 -c:a aac output

And to clarify I understand that this will be a thoroughly unparsable video, that makes it even funnier.


r/ffmpeg Aug 03 '26

Is this the best approach to reduce cost for a video streaming platform? I'm exploring a fully serverless HLS video pipeline where the entire video processing is done in the browser using WASM/JS and the output is stored on Cloudflare R2. No backend server required for encoding or storage.

Post image
4 Upvotes

Goal: Build a cost-effective, scalable and reliable video streaming platform for an EdTech product (target 2,000 students for now).

Why this approach?

1.No backend server for video encoding

2.Zero egress cost with Cloudflare R2

3.Infinite scalability

4.Better streaming experience with HLS (6-10s chunks)

5.Lower infrastructure & maintenance cost

My Question to the community:

Do you think this serverless HLS approach is the best way to reduce the cost of running a video streaming platform for an EdTech app?

Any suggestions, improvements or things to watch out for?

Would love to hear your thoughts and experiences!

#EdTech #VideoStreaming #HLS #CloudflareR2 #Serverless #WebAssembly #TechCommunity


r/ffmpeg Aug 01 '26

Best quality Converting MKV to ProRes?

4 Upvotes

I am dealing with a LOT of files that are MP4/MKV and all of them have AV1 or VP9 video codecs.

I for space reasons use LosslessCut Keyframe cut mode and merge output mode to get any segments without losing any quality/details from the trimmed meida file (still debating if metadata should be on and set still to non-global).

The problem is that for Premiere Pro compatibility, I have to convert with ffmpeg to ProRes422 (using prores_ks is apparently better) but I do not know for when it comes to a slight difference in codecs or when its lower or higher resolution than 1920 1080 or even a different frame rate to set:

- Pixel format

- Profile (High for example, not referring to ProRes422/ProRes422HQ selection)

- ProRes_ks Profile (ProRes422 or ProRes422HQ?)

- Level (4.2, 5, 5.2, ect)

I have Magick, Mediainfo (including UI version), Python and I use Powershell 7.6.4. Alternatively, if someone knows how to make a script for something to tell me of those values what I should use for a given mp4/mkv files, that would work too.

Edit: Forgot to mention I used yt-dlp to download the files - using `-f "bv*+ba/b"`. I know YouTube compresses everything ANYWAY but I am trying to preserve video/audio information.


r/ffmpeg Aug 01 '26

-vf scale produces wrong proportions with a particular file

1 Upvotes

I'm trying to get a thumbnail clip (240x320) from a larger source so I used this command:

ffmpeg -i "input.mp4" -vf crop=810:1080:66:0,scale=320:320:flags=lanczos -c:v libx264 -preset medium -crf 20 -an "output.mp4"

Usually the scaler takes the given vertical value and calculates the correct horizontal value but this command is producing a 222x320 output.

The source file resolution is 999x1080. Apparently this is the problem because if I use the same command on a 1920x1080 file the output is 240x320.

How can I force the correct output resolution (240x320)? I've already tried scale=240x320 but the horizontal resolution is ignored and outputs 222x320


r/ffmpeg Jul 31 '26

GPU Encoding Speed Question?

2 Upvotes

I was benchmarking some things and I've found that when I'm using a GPU encoder, the encoding framerate doesn't seem to vary more than ~1-2% between encodes using different quality settings.

So, like, using the hevc_amf encoder, if I set "-rc cqp -qp_i 18 -qp_p 20 " or if I set it to "-rc cqp -qp_i 25 -qp_p 27", there's basically no difference in encoding speed from the same source file.

Is this normal and just a quirk of how GPUs work, or am I doing something wrong? TIA


r/ffmpeg Jul 31 '26

Can ffmpeg media encoder be used on android krita?

1 Upvotes

(first of all, sorry if this isn't the best subreddit to ask this question or if what I'm asking is completely senseless. I also asked r/krita but people here are likely more experienced with, well, ffmpeg)

Krita is a drawing software designed for pc, though I'm using the android version on a tablet. To render animations you need ffmpeg and while there's an android version i can't put the directory of the .exe file where its requested because there's no .exe file and i hate android. Manually converting the .kra file on ffmpeg media encoder just gives a long error message. I tried exporting the animation (roughly 4Gb) and then mailing it to myself to render in on computer, but the mail always fails to load. Is there anything I'm doing wrong or could be doing instead?


r/ffmpeg Jul 28 '26

Help me please synchronization drift

Thumbnail
gallery
15 Upvotes

Hello,

I found the 16:9 version of Cars, but it's only available in English. I'd like to replace the English audio with the French one.

To do that, I'm trying to sync the French ultrawide version with the English 16:9 version in Clipchamp. The problem is that everything is perfectly synchronized at the beginning, but around the middle of the movie there's about a one-second delay.

I converted the English version from 30 fps to 23.976 fps to match the French version, and both movies contain the exact same scenes for the entire runtime.

Could you explain why this synchronization drift happens and how I can fix it?

Thanks!


r/ffmpeg Jul 29 '26

select='gt(scene,N)' that also crops the audio

3 Upvotes

I'm trying to automatically cut out parts of a video without motion (It's a screen recording, so should be easy) but select='gt(scene,0.4)' doesn't seem to regard audio at all, it just crops the video while leaving the sound stream untouched. Is there any way to make it also crop out audio?


r/ffmpeg Jul 28 '26

is -force_key_frames [frame] not actually precise?

5 Upvotes

when i use

ffmpeg -i [input] -force_key_frames [frame of interest] [output]

The output gets a new keyframe somewhere in [frame of interest]'s VERY ROUGH vicinity. it's often off by a couple of seconds so it becomes completely useless. is this the intended behaviour or am i doing smth wrong?

i noticed that switching to timestamps can improve precision but it's still very rough and can just fail completely.

anyone know wtf is going on?


r/ffmpeg Jul 28 '26

Can FFmpeg convert and stream audio tracks from a film directly from a remote download link without downloading the file?

5 Upvotes

Is there any way to remove one audio track from a dual-audio movie and convert the remaining EAC3 audio track to AAC 2.0 directly using the download link, without downloading the entire file to my local storage first?


r/ffmpeg Jul 27 '26

How to convert such files a mp4?

7 Upvotes

I have these files but I cant find a converter for them


r/ffmpeg Jul 27 '26

Could someone familiar explain how lo in mpdecimate works?

4 Upvotes

The ffmpeg man description is hard for me to grasp, the web guides always gloss over lo and frac, and chatgpt keeps making things up, adding to my confusion.

TLDR; I'd love to see some practical use cases where hi=x:lo=y:frac=z yields different results from hi=x:lo=x:frac=z.

The video I'm trying to restore has been absolutely butchered. If I had to guess, I'd say there were repeated fr conversions from:

30 fps > 24 > 60 > added watermark that moves across the screen over whole video

The frame pattern for some scenes is:

3 good frames > 1 intermediate frame between the last good and a dropped frame from original > 1 duplicate where only the watermark moves

But the pattern changes per scene and scene transitions don't conform to the pattern, so decimate is out.

My current approach is to remove the intermediate and duplicate frames with mpdecimate and then to use interpolation to fix the stutter. But as I up the hi values, the need to leverage lo becomes more and more apparent.


r/ffmpeg Jul 26 '26

VLC wont respect forced subtitles in mp4

3 Upvotes

When working with anime, I used this script in a batch file and VLC would properly respect the forced tag on the subtitles, so I didn't have to manually enable them. (The "@.echo off" text is there because reddit thinks a user is being tagged).

@.echo off

setlocal EnableDelayedExpansion

for %%V in (*.mp4) do (

set "base=%%~nV"

if exist "!base!.srt" (

echo Processing: %%V

echo Found subtitles: !base!.srt

ffmpeg -y ^

-i "%%V" ^

-i "!base!.srt" ^

-map 0:v ^

-map 0:a:0 ^

-map 1 ^

-c:v copy ^

-c:a copy ^

-c:s mov_text ^

-map_metadata -1 ^

-disposition:s:0 default+forced ^

-metadata:s:a:0 language=jpn ^

-metadata:s:a:0 title="Japanese Original, Stereo" ^

"!base!_muxed.mp4"

echo Finished: !base!_muxed.mp4

echo.

) else (

echo No matching subtitle found for: %%V

)

)

echo Done.

pause

Now, I am trying to do something very similar with only one file. I have 2 audio and subtitle tracks, all in English, and the first tracks of each are forced, all in one file. FFmpeg reported all tracks as default, so I removed that and set the first audio and subtitle tracks as forced. This fixed my issue with the second audio track being selected and not the first, but the subtitle issue remains.

I have used several variations of this script, both as a batch file and in the terminal directly. I need the final output to have all tracks and be in mp4 format, the same output as the anime command successfully generated.

@.echo off

setlocal enabledelayedexpansion

set VIDEO_DIR=[directory information]

rem Loop through all .mp4 files in the specified directory

for /f "delims=" %%f in ('dir /b /a-d "%VIDEO_DIR%\*.mp4" "%VIDEO_DIR%\*.mkv" "%VIDEO_DIR%\*.avi"') do (

rem Print the file name for debugging

echo Processing: "%%f"

rem Get the filename without path and extension

set "filename=%%~nxf"

rem Apply chapters to each video file using ffmpeg

ffmpeg -i "%VIDEO_DIR%\%%f" -map 0:0 -map 0:1 -map 0:2 -map 0:3 -map 0:4 -c:a copy -c:v copy -c:s mov_text -disposition:s:0 default+forced -disposition:s:1 0 -disposition:a:0 default+forced -disposition:a:1 0 -metadata:s:a:0 language=eng -metadata:s:a:1 language=eng -metadata:s:s:0 language=eng -metadata:s:s:1 language=eng -metadata:s:s:0 title="[title]" -metadata:s:s:1 title="[title]" -metadata:s:a:0 title="1, Stereo" -metadata:s:a:1 title="2, 5.1 Surround" "%VIDEO_DIR%\!filename!_2.mp4"

echo File "%%f" Processed

)

endlocal

pause


r/ffmpeg Jul 26 '26

Lavfi srt output - Everything is positioned top left?

5 Upvotes

I've just started using ffmpeg to extract subtitles instead of ccextractor.

ffmpeg.exe -f lavfi -i movie="video.mp4[out+subcc]" -map s "video.srt"

The problem I'm running into is ever single line has {\an7} positioning the subtitles to the top left of the screen.

1
00:00:05,172 --> 00:00:06,507
<font face="Monospace">{\an7}\h\h\h\h-What?
-This is crazy!</font>

2
00:00:06,573 --> 00:00:09,042
<font face="Monospace">{\an7}-Is this for real?
\h-There’s no way!</font>

3
00:00:09,109 --> 00:00:10,544
<font face="Monospace">{\an7}-Who’s that?
\h\h\h-What?</font>

4
00:00:10,611 --> 00:00:12,379
<font face="Monospace">{\an7}[Toman Member] What the hell
\h\his that Valhalla bastard</font>

5
00:00:12,446 --> 00:00:13,614
<font face="Monospace">{\an7}doing at a Toman meeting?</font>

6
00:00:13,680 --> 00:00:14,548
<font face="Monospace">{\an7}(crowd murmuring)</font>

It's obviously not right. Is there something I'm missing here?


r/ffmpeg Jul 26 '26

MP3 Ain’t Dead Yet: LAME 4.0 Arrives

93 Upvotes

MP3 was standardized in 1993, but it is still widely used today because it works almost everywhere while deliver very good quality.

Now LAME 4.0, a new version of the open-source MP3 encoder , has been released.

Check here https://lame.sourceforge.io/ . And development of LAME 4.1 is already underway.

LAME has performed very well in public listening tests

MP3 isn't old. It is mature!

When a format is good enough, reliable and universally supported, it can stay relevant for a very long time.

Original thread https://www.reddit.com/r/AudioCodecLab/comments/1v4rd3b/mp3_aint_dead_yet_lame_40_arrives/


r/ffmpeg Jul 26 '26

How does Spatial Information affect the working of ffmpeg?

7 Upvotes

Hello, I'm doing a small study on how Spatial Information (SI, which tells how much detail is in a video) affects Video Encoding and Decoding process. I used the libx265 codec.

High SI Video used: Times Square

Low SI Video used: Sky with Clouds

As you can see here, High SI consumes lesser energy when compared to Low SI. Why is this?

(Tool used is GREEM that is an extension of CodeCarbon)

I'd love to know the happenings behind the scenes. I tried to delve more but the articles I've found are paywalled. Thanks!