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

2.1.7.5: Arguments for preprocessor 'ffmpeg: Re-mux TS to MKV' should be modified #483

Closed
JJKylee opened this issue Jan 30, 2021 · 12 comments

Comments

@JJKylee
Copy link
Contributor

JJKylee commented Jan 30, 2021

Describe the bug

When aac muxing mode is ADTS in the audio track of a source ts file, (pretty common for a ts file), the current preprocessor ffmpeg: Re-mux TS to MKV fails to remux the audio track into the output mkv file with the following error message (ffmpeg):

[mpegts @ 000002521d679e00] start time for stream 1 is not set in estimate_timings_from_pts
[mpegts @ 000002521d679e00] stream 1 : no TS found at start of file, duration not set
[mpegts @ 000002521d679e00] Could not find codec parameters for stream 1 (Audio: aac ([15][0][0][0] / 0x000F), 0 channels): unspecified sample format
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options

Suggested fix

Per the recommendation given by the log, the arguments of the preprocessor should be modified as follows:

-analyzeduration 100M -probesize 50M -i "%source_file%" -c copy -ignore_unknown -sn -y -hide_banner "%temp_file%.mkv"
@ghost
Copy link

ghost commented Jan 31, 2021

Although it never happened to me, i concur !

@JJKylee
Copy link
Contributor Author

JJKylee commented Jan 31, 2021

Maybe it was too short.

Reproducing this issue is simple.

Download LG New York HDR UHD 4K Demo.ts from 4kmedia.org and load it in the original non-modded version of 2.1.7.5 (with ffmpeg: Re-mux TS to MKV). You'll see this 'no audio' mkv.

StaxRip_2 1 7 5_no-audio_with_default_ffmpeg-mkv-remuxer_arguments_20210131

With -analyzeduration 100M -probesize 50M added to the arguments, ffmpeg catches audio in the output mkv file as follows:

StaxRip_2 1 7 5_audio_with_modified_ffmpeg-mkv-remuxer_arguments_20210131

Hope this helps.

@ghost
Copy link

ghost commented Jan 31, 2021

There are other issues related to audio stream identification that are solved with -analyzeduration 100M -probesize 50M.
I can't remember on what occasion I read about that (it was several months ago) but I do remember that you can safely add those: if those arguments are not necessary, then they will cause no harm.

@Dendraspis
Copy link
Collaborator

I can't remember on what occasion I read about that (it was several months ago)

The same procedure as every year, James 😜
#149

@JJKylee
Copy link
Contributor Author

JJKylee commented Feb 1, 2021

I admit I was a little mistaken in regards to the -bsf part. It isn't necessary for mkv. Unlike back then, the only thing we need for mkv conversion is the extra options in the arguments. We don't need to add another preprocessor. So the same issue was not resolved appropriately back then. 😄

@Dendraspis
Copy link
Collaborator

The question is: How high should those values be? Is 100M/50M high enough? Or maybe too high? And who else uses this piece of **** expect @JJKylee ? 🤔

Feels like an X-Files moment. 🤣

@Dendraspis
Copy link
Collaborator

Dendraspis commented Feb 1, 2021

analyzeduration 's default is 5,000,000 or 5M = 5 seconds
probesize 's default is 5,000,000 or 5M

@JJKylee
Could you verify if only setting probesize=2M would also fix the issue?

@JJKylee
Copy link
Contributor Author

JJKylee commented Feb 1, 2021

For analyzeduration, 100M means 100 seconds = 1 min 40 seconds. The value itself can be adjusted, of course. For probesize, 50M means 50 MB, and since it's the default value, we don't need to add it explicitly unlike analyzeduration.

I really don't know why no one else is talking about this matter. Maybe they don't use mkv conversion at all or they don't work on ts files with ADTS aac tracks...?

EDIT: The default value for probesize is 5M, not 50MB. (I was typing on iPad... 😓)
And I've found that just by setting -probesize 10M, the missing audio issue is gone. 😄
(I've been using both -analyzeduration 100M and -probesize 50M habitually since they don't hurt performance significantly. 😝)

@Dendraspis
Copy link
Collaborator

EDIT: The default value for probesize is 5M, not 50MB. (I was typing on iPad... 😓)

I made the same mistake. 😄
So it seems like the default values are too low to fetch the whole pattern in some ADTS-AAC-tracks.

And I've found that just by setting -probesize 10M, the missing audio issue is gone. 😄

👍

(I've been using both -analyzeduration 100M and -probesize 50M habitually since they don't hurt performance significantly. 😝)

I'll try to set the missing parameter(s) ...

@Dendraspis
Copy link
Collaborator

Dendraspis commented Feb 1, 2021

Okay, now the args looks like:
-i "%source_file%" -c copy -ignore_unknown -probesize=10M -sn -y -hide_banner "%temp_file%.mkv"

Set it manually or delete your settings to make use of it. Will be implemented in the next beta.

@JJKylee
Copy link
Contributor Author

JJKylee commented Feb 1, 2021

-probesize is an input option, so in theory, it should be placed before -i, not after.
And there should be no = b/w -probesize and 10M.

@Dendraspis
Copy link
Collaborator

ffmpeg-parameter-mode engaged

🤣 You're absolutelly right! It's fixed and looks like:
-probesize 10M -i "%source_file%" -c copy -ignore_unknown -sn -y -hide_banner "%temp_file%.mkv"
Thanks for shouting! 👍

NVEnc-subparameter-mode re-engaged 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants