[libav-tools] AVI(ac3): Broken sound after copy

Luca Barbato lu_zero at gentoo.org
Tue Apr 7 17:49:15 CEST 2015


On 07/04/15 10:26, Mathieu Malaterre wrote:
> On Mon, Apr 6, 2015 at 2:02 PM, Mathieu Malaterre
> <mathieu.malaterre at gmail.com> wrote:
>> On Sat, Apr 4, 2015 at 6:48 PM, Luca Barbato <lu_zero at gentoo.org> wrote:
>>> On 04/04/15 15:23, Mathieu Malaterre wrote:
>>>> Hi,
>>>>
>>>> I am trying to understand why avconv is breaking sound on a working
>>>> AVI input. I can play a video on my FreeBox V5 just fine. However
>>>> after copy:
>>>>
>>>> $ avconv -i input.avi -codec copy output.avi
>>>>
>>>> The generated `output.avi` appears as non working on my FreeBox V5
>>>> player. If I compare (avprobe -show_streams) here is what I see:
>>>>
>>>> $ avprobe -show_streams input.avi > /tmp/1
>>>> $ avprobe -show_streams output.avi > /tmp/2
>>>> $ diff -u /tmp/1 /tmp/2
>>>> --- /tmp/1 2015-04-04 15:13:53.222288651 +0200
>>>> +++ /tmp/2 2015-04-04 15:19:19.898275904 +0200
>>>> @@ -26,15 +26,15 @@
>>>>   codec_long_name=ATSC A/52A (AC-3)
>>>>   codec_type=audio
>>>>   codec_time_base=1/48000
>>>> -codec_tag_string=[0] [0][0]
>>>> -codec_tag=0x2000
>>>> +codec_tag_string=[254][255][0][0]
>>>> +codec_tag=0xfffe
>>>>   sample_rate=48000.000000
>>>>   channels=6
>>>>   bits_per_sample=0
>>>>   r_frame_rate=0/0
>>>> -avg_frame_rate=125/4
>>>> -time_base=1/56000
>>>> +avg_frame_rate=0/0
>>>> +time_base=4/125
>>>>   start_time=0.000000
>>>>   duration=N/A
>>>> -nb_frames=127391040
>>>> +nb_frames=33174
>>>>   [/STREAM]
>>>>
>>>> Does the `codec_tag_string` value have any influence here ?
>>>
>>> I think so, if you add -tag:a 0x2000 does it work?
>>
>> Now I have:
>>
>> $ diff -u /tmp/1 /tmp/2
>> --- /tmp/1 2015-04-06 13:50:25.906181310 +0200
>> +++ /tmp/2 2015-04-06 13:55:36.833418214 +0200
>> @@ -35,7 +35,7 @@
>>   bits_per_sample=0
>>   avg_frame_rate=0/0
>>   bit_rate=448000.000000
>> -time_base=1/56000
>> +time_base=4/125
>>   start_time=0.000000
>>   duration=N/A
>>   nb_frames=127391040
>>
>> However I can still not hear a thing on the generated file...
>>
>> In summary, none of the following generates a file with working sound
>> (while input.avi is ok):
>>
>> $ avconv -i input.avi -codec copy test_copy.avi
>> $ avconv -i input.avi -codec copy -tag:a 0x2000 test_copy.avi
>
> I can generate AVI with working sound using only 2 channels:
>
> $ avconv -i input.avi -vcodec copy -acodec ac3 -ac 2 test_copy.avi
>
> In order to keep all Channels (dolby 5.1 ac3 input), I need to use mkv
> container with h264 video stream:
>
> $ avconv -i input.avi -vcodec h264 -preset slow -tune animation -crf
> 18 -acodec copy test_copy.mkv
>
> Tests were conducted on FreeBox V5 (Firmware 1.5.20)
>

Ok, so the problem is in the avi muxer, can you please provide a sample 
file working on the freebox? I'm not sure when I'll have the time to fix 
the issue but it is worth some investigation.

lu



More information about the libav-tools mailing list