[FFmpeg-user] -qscale:a and -write_xing 0 can't be used at same time?
桃源老師
xanadu6291 at dream.jp
Fri Jan 27 23:56:53 EET 2017
Hello Moritz-san,
Thanks for your replay:
> 2017/01/28 2:56 A.M. Moritz Barsnick <barsnick <at> gmx.net <http://gmx.net/>> wrote:
>
> On Fri, Jan 27, 2017 at 00:53:43 +0900, 桃源老師 wrote:
>
>> I found that the result mp3 shows twice long duration in macOS Finder
>> and iTunes. I googled and found that adding "-write_xing 0" fixes
>> this wrong duration.
>
> It would be interesting to see the different interpretations of
> durations in various tools. But I guess you've already come to the
> obvious conclusion that Mac/iTunes can't cope well with Xing headers.
> ;-)
I made a small study about Xing headers. It's for mp3's VBR duration calculation. Please don't say "You are at there!" ;-)
My understanding for ffmpeg's option "-write_xing 0" is to instruct not to write Xing header to result file(s). If it is correct, I wonder why ffmpeg's default CBR file's duration can be fixed in Mac/iTunes.
Also, I feel doubt for your comment Mac/iTunes can't cope well with Xing headers. The reason is below...
>> But if I try to use "-write_xing 0" with "-qscale:a 2" at same time, the resulting mp3 shows very wrong duration on macOS Finder and iTunes.
>>
>> Is -qscale:a and -write_xing 0 can't used at same time?
>
> I checked the code, and did some experiments, and both *can* be used at
> the same time. The write_xing option does make a difference to the
> files I created.
>
> What does change, is that "-qscale:a" instructs libmp3lame to use VBR
> encoding, instead of ffmpeg's 128k CBR. I believe Mac/iTunes is going crazy
> and getting confused by VBR. Hey, we're in the 21st century. The last
> programs I saw which didn't handle VBR nicely were in the early 90s.
> :-P
>
> But that's what the Xing header is for, I guess: Not having to estimate
> the duration, but being able to calculate it from the bitrate? Question
> is why that also confuses Mac. OMG, what do other users do? Do files
> not created by ffmpeg work for you in the finder?
I didn't understand "what Xing header is" before receiving your replay...
So I thought that the magic word "-write_xing 0" is required in anyway...
But now I understand that my ffmpeg's option "-qscale:a" and "-write_xing 0" means create a mp3 file with VBR and not to write Xing header...
It might be very hard to calculate duration for *any* kind of program.
I now understand "-qscale:a" and "-write_xing 0" should not be used at the same time. And confirmed that Mac/iTunes understand duration correctly with "-qscale:a" only...
I think this means that Mac/iTunes can handle Xing header, doesn't it?
Best Regards,
// Miya aka. TougenRoushi
// みや aka. 桃源老師
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2370 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20170128/41b360c3/attachment.bin>
More information about the ffmpeg-user
mailing list