Opened 13 years ago
Closed 12 years ago
#468 closed defect (fixed)
No audio tracks in QuickTime
Reported by: | Alex | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avformat |
Version: | git-master | Keywords: | mov |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | no |
Description
Description: No audio tracks in QuickTime
Version: 0.8.2 (via brew package manager)
Steps that will reproduce the problem?
- Find a video that contains more than one audio track
- ffmpeg -i _video.mkv -timestamp now -vcodec libx264 -acodec libfaac -alang eng video.m4v -acodec libfaac -alang ger -newaudio
- open -a QuickTime video.m4v
What is the expected result?
To be able to select the audio track and to hear only one track at once.
What happens instead?
No audio tracks selectable. All languages/tracks are mixed into one audio
track.
Possible workaround:
Open the file with VLC.
Any additional information:
Same issue with the latest libav version (although the parameters are a bit different). Also iTunes has the same issue und I'm sure an iOS device will have it too. But it seems to be a known issue since a long time: https://www.lscube.org/issue2534
I applied this patch but this only enables Quicktime to select an audio track - if no track is selected (default): all tracks are played all together.
Also see: http://bugzilla.libav.org/show_bug.cgi?id=44
Attachments (2)
Change History (27)
comment:1 by , 13 years ago
follow-up: 5 comment:2 by , 13 years ago
Thanks for the answer.
Please post all necessary information here, not on third party sites.
Ok - not sure which site is the best one to get this issue fixed in avconv and ffmpeg (bugzilla.libav.org, avcodec.org, roundup.libav.org, ...). I'm sure the people at libav.org will also say: "don't post on 'third party' sites" ;)
Is this not reproducible with current git head?
I'm sure it is - but I've not cloned the sources, yet. Just compiling it right now and I'll update the ticket in case that its fixed in that version.
Did you write the patch?
No.
I believe Baptiste already reviewed the patch, can you answer his questions?
No, unfortunately.
follow-up: 4 comment:3 by , 13 years ago
Well, doesn't compile on my machine ("Undefined symbols for architecture x86_64") but the code in questions is still the same.
follow-up: 8 comment:4 by , 13 years ago
Replying to Alex__:
Well, doesn't compile on my machine ("Undefined symbols for architecture x86_64") but the code in questions is still the same.
Since this is an important issue, please provide the necessary details and confirm that you ran make distclean && ./configure && make && make V=1 and post the complete, uncut output of the second call to make (please do not post the complete, uncut output of the first call to make).
follow-up: 7 comment:5 by , 13 years ago
Replying to Alex__:
Thanks for the answer.
Please post all necessary information here, not on third party sites.
Ok - not sure which site is the best one to get this issue fixed in avconv and ffmpeg (bugzilla.libav.org, avcodec.org, roundup.libav.org, ...). I'm sure the people at libav.org will also say: "don't post on 'third party' sites" ;)
If you have a patch to provide to FFmpeg, post it on ffmpeg-devel. If you want to report a problem, please report it here adding a command line to reproduce, complete, uncut output and point to a sample on samples.mplayerhq.hu that can be used to reproduce the problem.
[...]
Did you write the patch?
No.
I consider it a rather serious issue that you posted a patch without mentioning you did not write it.
comment:6 by , 13 years ago
Thank you for your response. I'll explain the situation a bit:
- I experienced an issue with ffmpeg (from the brew repository)
- Then I tested libav (compiled from scratch, since there is no package in the brew repository)
- Finally, I found a patch for ffmpeg: https://www.lscube.org/issue2534
- Applied the patch to libav by changing it
- Searched for a libav bug report
- Created a new libav bug report and added the references for the patch: http://bugzilla.libav.org/show_bug.cgi?id=44
- Sent the information to the libav-devel list
- Searched for an ffmpeg bug report
- Created a new ffmpeg bug report: https://avcodec.org/trac/ffmpeg/ticket/468
If you have a patch to provide to FFmpeg, post it on ffmpeg-devel
The existing patch doesn't solve the issue completely, I've not written a patch and it is already known.
If you want to report a problem, please report it here adding a command line to reproduce
I did. Therefore, I created this ticket.
complete, uncut output and point to a sample on samples.mplayerhq.hu that can be used to reproduce the problem.
I'll have a look at that.
I consider it a rather serious issue that you posted a patch without mentioning you did not write it.
I understand, but I've not posted a patch here, I never wrote or implied at the other bug tracker that I'm the author of the patch. Contrary, I explicitly mentioned the URL were I copied the file from. I then modified the patch and wrote that I *applied* (not written, created, coded, ...) the patch against libav trunk: "The attached patch is borrowed from this bug report and is updated for the latest trunk".
comment:7 by , 13 years ago
Replying to cehoyos:
adding a command line to reproduce, ... and point to a sample on samples.mplayerhq.hu that can be used to reproduce the problem.
Done. "ffmpeg -i multitrack.mov -vcodec libx264 -acodec libfaac -ar 48000 multitrack.m4v -acodec libfaac -ar 48000 -newaudio"
comment:8 by , 13 years ago
Replying to cehoyos:
Since this is an important issue, please provide the necessary details and confirm that you ran make distclean && ./configure && make && make V=1 and post the complete, uncut output of the second call to make (please do not post the complete, uncut output of the first call to make).
Created an other ticket for this: #469
comment:9 by , 13 years ago
It would be interresting to have a working m4v file created by some official software as reference
maybe simply comparing the header values between that and ours would give a hint toward what in addition is wrong
comment:10 by , 13 years ago
- Example with defect headers using a patched ffmpeg/libav (both tracks are started in parallel using quicktime): http://dl.dropbox.com/u/1358485/bugs/ffmpeg/468/multitrack.m4v
- Example with correct headers (only a partial file): http://dl.dropbox.com/u/1358485/bugs/ffmpeg/468/test.m4v
comment:11 by , 13 years ago
Finally, I found a way to give you an example of a file with correct headers:
- curl -O http://samples.mplayerhq.hu/mov/multitrack/multitrack.mov
- ffmpeg -i multitrack.mov -vcodec libx264 -acodec libfaac -ar 48000 -alang eng multitrack.m4v -acodec libfaac -ar 48000 -alang deu -newaudio
- cp multitrack.m4v multitrack-fixed.m4v
- open -a Subler multitrack-fixed.m4v
- Disabled the third checkbox (second audio stream) and save the file
This file works fine also on an iPhone 4.
Here is the output:
comment:12 by , 13 years ago
Furthermore, here the same examples using an unpatched ffmpeg version:
- http://dl.dropbox.com/u/1358485/bugs/ffmpeg/468/multitrack-unpatched.m4v
- http://dl.dropbox.com/u/1358485/bugs/ffmpeg/468/multitrack-unpatched-fixed.m4v
You can't select the audio track here, but the second file at least only plays a single audio track.
by , 13 years ago
Attachment: | 0002-movenc-set-alternative-group-for-audio-and-subtitles.patch added |
---|
Untested patch
comment:13 by , 13 years ago
maybe someone who has QT or an iphone could test the patch?
if it doesnt work then changing language codes in addition is worth a try
comment:14 by , 13 years ago
Nice. Works for me. Tested it with QuickTime Player X Version 10.1 (501) / OS X 10.7.2 and iOS 4.3.5. Thank you!
With the latest trunk I'd to change the parameters a bit: will you re-add the "alang" parameter again? The current example (multitrack.mov) has two audio tracks marked as "eng", but the second one is German.
comment:15 by , 13 years ago
Seems not to be fixed completely. I applied your patch to the latest git trunk:
Steps that will reproduce the problem?
- Download the latest trunk
- Apply the above mentioned patch
- Convert the below mentioned example with the below mentioned parameters
- Open the output file with QuickTime Player X using OS X Lion 10.7.1
What is the expected result?
To be able to select the audio track.
What happens instead?
No track shown (even not "Default").
Possible workaround:
Usually I can fix this kind of broken files with "Subler". But it exists with "Error: ReadProperties: atom 'text' is too small; overrun at property: displayFlags (../src/mp4atom.cpp,387)".
Furthermore it's not possible to convert the sub titles.
Any additional information:
- Input: http://dl.dropbox.com/u/1358485/bugs/ffmpeg/468/multi-lang-example-small-issue-468.mkv
- Output: http://dl.dropbox.com/u/1358485/bugs/ffmpeg/468/multi-lang-example-small-issue-468.m4v
- Command:
$ ffmpeg -y -i multi-lang-example-small-issue-468.mkv -vcodec copy -map 0 -map -0:s multi-lang-example-small-issue-468.m4v ffmpeg version N-30044-g9209249, Copyright (c) 2000-2011 the FFmpeg developers built on Sep 18 2011 16:52:05 with clang 2.1 (tags/Apple/clang-163.7.1) configuration: --enable-libfaac --enable-libx264 --enable-gpl --enable-nonfree --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libxvid --cc=clang libavutil 51. 16. 0 / 51. 16. 0 libavcodec 53. 16. 0 / 53. 16. 0 libavformat 53. 12. 0 / 53. 12. 0 libavdevice 53. 4. 0 / 53. 4. 0 libavfilter 2. 43. 2 / 2. 43. 2 libswscale 2. 1. 0 / 2. 1. 0 libpostproc 51. 2. 0 / 51. 2. 0 Seems stream 0 codec frame rate differs from container frame rate: 47.95 (5000000/104271) -> 23.98 (24000/1001) Input #0, matroska,webm, from 'multi-lang-example-small.mkv': Metadata: title : #9 Duration: 01:19:24.26, start: 0.000000, bitrate: 3 kb/s Chapter #0.0: start 0.000000, end 246.913000 Metadata: title : 00:00:00.000 Chapter #0.1: start 246.913000, end 591.174000 Metadata: title : 00:04:06.913 Chapter #0.2: start 591.174000, end 728.436000 Metadata: title : 00:09:51.174 Chapter #0.3: start 728.436000, end 948.072000 Metadata: title : 00:12:08.436 Chapter #0.4: start 948.072000, end 1056.889000 Metadata: title : 00:15:48.072 Chapter #0.5: start 1056.889000, end 1238.154000 Metadata: title : 00:17:36.889 Chapter #0.6: start 1238.154000, end 1460.000000 Metadata: title : 00:20:38.154 Chapter #0.7: start 1460.000000, end 1747.746000 Metadata: title : 00:24:20.000 Chapter #0.8: start 1747.746000, end 2018.683000 Metadata: title : 00:29:07.746 Chapter #0.9: start 2018.683000, end 2148.563000 Metadata: title : 00:33:38.683 Chapter #0.10: start 2148.563000, end 2403.860000 Metadata: title : 00:35:48.563 Chapter #0.11: start 2403.860000, end 2686.183000 Metadata: title : 00:40:03.860 Chapter #0.12: start 2686.183000, end 2885.382000 Metadata: title : 00:44:46.183 Chapter #0.13: start 2885.382000, end 3169.833000 Metadata: title : 00:48:05.382 Chapter #0.14: start 3169.833000, end 3305.427000 Metadata: title : 00:52:49.833 Chapter #0.15: start 3305.427000, end 3583.997000 Metadata: title : 00:55:05.427 Chapter #0.16: start 3583.997000, end 3820.066000 Metadata: title : 00:59:43.997 Chapter #0.17: start 3820.066000, end 4106.936000 Metadata: title : 01:03:40.066 Chapter #0.18: start 4106.936000, end 4336.332000 Metadata: title : 01:08:26.936 Chapter #0.19: start 4336.332000, end 4764.267000 Metadata: title : 01:12:16.332 Stream #0.0: Video: h264 (High), yuv420p, 1920x1040, SAR 1:1 DAR 24:13, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default) Metadata: title : #9 Stream #0.1(ger): Audio: dts (DTS), 48000 Hz, 5.1(side), s16, 768 kb/s (default) Metadata: title : DTS Stream #0.2(eng): Audio: dts (DTS), 48000 Hz, 5.1(side), s16, 1536 kb/s Metadata: title : DTS Stream #0.3(ger): Subtitle: text (default) Metadata: title : Forced subs Output #0, ipod, to 'multi-lang-example-small.m4v': Metadata: title : #9 encoder : Lavf53.12.0 Chapter #0.0: start 0.000000, end 246.913000 Metadata: title : 00:00:00.000 Chapter #0.1: start 246.913000, end 591.174000 Metadata: title : 00:04:06.913 Chapter #0.2: start 591.174000, end 728.436000 Metadata: title : 00:09:51.174 Chapter #0.3: start 728.436000, end 948.072000 Metadata: title : 00:12:08.436 Chapter #0.4: start 948.072000, end 1056.889000 Metadata: title : 00:15:48.072 Chapter #0.5: start 1056.889000, end 1238.154000 Metadata: title : 00:17:36.889 Chapter #0.6: start 1238.154000, end 1460.000000 Metadata: title : 00:20:38.154 Chapter #0.7: start 1460.000000, end 1747.746000 Metadata: title : 00:24:20.000 Chapter #0.8: start 1747.746000, end 2018.683000 Metadata: title : 00:29:07.746 Chapter #0.9: start 2018.683000, end 2148.563000 Metadata: title : 00:33:38.683 Chapter #0.10: start 2148.563000, end 2403.860000 Metadata: title : 00:35:48.563 Chapter #0.11: start 2403.860000, end 2686.183000 Metadata: title : 00:40:03.860 Chapter #0.12: start 2686.183000, end 2885.382000 Metadata: title : 00:44:46.183 Chapter #0.13: start 2885.382000, end 3169.833000 Metadata: title : 00:48:05.382 Chapter #0.14: start 3169.833000, end 3305.427000 Metadata: title : 00:52:49.833 Chapter #0.15: start 3305.427000, end 3583.997000 Metadata: title : 00:55:05.427 Chapter #0.16: start 3583.997000, end 3820.066000 Metadata: title : 00:59:43.997 Chapter #0.17: start 3820.066000, end 4106.936000 Metadata: title : 01:03:40.066 Chapter #0.18: start 4106.936000, end 4336.332000 Metadata: title : 01:08:26.936 Chapter #0.19: start 4336.332000, end 4764.267000 Metadata: title : 01:12:16.332 Stream #0.0: Video: h264 (avc1 / 0x31637661), yuv420p, 1920x1040 [SAR 1:1 DAR 24:13], q=2-31, 2500k tbn, 23.98 tbc (default) Metadata: title : #9 Stream #0.1(ger): Audio: aac (mp4a / 0x6134706D), 48000 Hz, 5.1(side), s16, 128 kb/s (default) Metadata: title : DTS Stream #0.2(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, 5.1(side), s16, 128 kb/s Metadata: title : DTS Stream mapping: Stream #0.0 -> #0.0 (copy) Stream #0.1 -> #0.1 (dca -> libfaac) Stream #0.2 -> #0.2 (dca -> libfaac) Press [q] to stop, [?] for help [matroska,webm @ 0x7fd00203d800] Read error frame= 96 fps= 0 q=-1.0 Lsize= 244kB time=00:00:03.92 bitrate= 508.8kbits/s video:204kB audio:32kB global headers:0kB muxing overhead 3.257840%
comment:16 by , 13 years ago
Just to give an update: I applied this patch to the latest trunk and all my files are converted correctly. Except one (see the example file in my last comment).
comment:17 by , 13 years ago
Found a workaround:
ffmpeg -i multi-lang-example-small-issue-468.mkv -vcodec copy -map 0 -map -0:s -metadata:s:1 language=eng -metadata:s:2 language=deu multi-lang-example-small-issue-468-workaround.m4v
The according output plays well in QuickTime Player X, but still doesn't work with Subler:
comment:18 by , 13 years ago
Last comment on this issue from my side (another example that can be fixed using Subler):
comment:21 by , 13 years ago
I assume it is but the ticket says: "Version: 0.8.2". So it might be changed to "Version: git-master".
I'm just converting a bunch of files again and this ticket together with #502 popped up again a couple of times.
comment:22 by , 12 years ago
Using Git builds, I *think* I'm getting the same problems here every time I convert to m4v.
After playing the coverted m4v files in my (iPhone iOS v5.1), I found that:
1- All audio tracks play simultaneously at the same time.
2- When I press the menu that shows available audio tracks and subtitles, I see no audio track get selected by default. hence all track play simultaneously.
3- Something is wrong with languages' display names. For example, 'ara' and 'eng' in ffmpeg translate to 'Arabic' and 'English' on iPhone, however 'fre' and 'ger' translate to just 'fre' and 'ger' in iPhone.
Using handbrake to convert, I don't get any of the above problems.
FFmpeg (problematic):
http://uploading.com/files/get/4a4ae7f3/FFmpeg%2B08-09_07-48-55_EuroNews%2B%2528ara%2529_.m4v
HandBrake (O.K.):
http://uploading.com/files/get/4mb1a744/HandBrake%2B08-09_07-48-55_EuroNews%2B%2528ara%2529_.m4v
comment:23 by , 12 years ago
Hi, I have been having similar problems with ffmpeg and I found out some extra information that might be of use:
(these observations have been made using the files published by AmshTemp)
- QuickTime 7, iTunes and iOS (iPhone/iPod/iPad etc.) play both files correctly (just one sound at a time)
- QuickTime X behaves a bit weird; the ffmpeg file plays all audio tracks at once, the handbrake file plays the first audio track (which is Arabic, even if Arabic is not your preferred language). QuickTime 7 picks English in both files, which is my preferred language. Also iTunes picks the preferred language.
- The languages French, German and Persian are not displayed correctly with the FFmpeg file; this is because of the incorrect language codes used. I am not sure whether this is an FFmpeg bug or a mistake made by the person who encoded the file (fra/fre, ger/deu, per/fas). I don't know either whether this is an error in Apple software since it's swe for swedish and not sve (svensk). Handbrake does use the terms used by Apple software.
- The audio tracks in Handbrake are named "Stereo". In my Handbrake generated file my two tracks are named "Stereo" and "Surround". These names cannot be observed within ffmpeg and I did not manage to use ffmpeg to set these stream/channel names (whatever the correct term may be). It would be nice to have the possibility to name streams as well in ffmpeg. Maybe I'll make a seperate ticket for that. When you open the HandBrake file using a hex editor, you'll see the string "nameStereo" occurring 10 times, in the ffmpeg file this is 0 times. Incidently, there are also 10 audio streams in the file.
I did not see any case where iTunes 11 shows different behaviour from iOS.
by , 12 years ago
Attachment: | patchiaudio.diff added |
---|
comment:24 by , 12 years ago
Keywords: | mov added |
---|---|
Reproduced by developer: | set |
Status: | new → open |
Version: | 0.8.2 → git-master |
Updated patch (tested) attached, following command line allows to reproduce the original problem:
$ ffmpeg -i fate-suite/svq3/Vertical400kbit.sorenson3.mov -i fate-suite/aac/al_sbr_cm_48_5.1.mp4 -map 0:0 -map 0:1 -map 1:0 -acodec aac -strict -2 -vcodec mpeg4 -qscale 5 out.m4v ffmpeg version N-50389-ge20f2dc Copyright (c) 2000-2013 the FFmpeg developers built on Mar 1 2013 09:20:03 with gcc 4.7 (SUSE Linux) configuration: --enable-gpl --disable-indev=jack libavutil 52. 17.103 / 52. 17.103 libavcodec 54. 92.100 / 54. 92.100 libavformat 54. 63.102 / 54. 63.102 libavdevice 54. 3.103 / 54. 3.103 libavfilter 3. 41.100 / 3. 41.100 libswscale 2. 2.100 / 2. 2.100 libswresample 0. 17.102 / 0. 17.102 libpostproc 52. 2.100 / 52. 2.100 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x1e616a0] max_analyze_duration 5000000 reached at 5000998 microseconds Guessed Channel Layout for Input Stream #0.1 : mono Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'fate-suite/svq3/Vertical400kbit.sorenson3.mov': Metadata: creation_time : 2001-03-20 16:17:18 title : Vertical Online SV3 Demo title-eng : Vertical Online SV3 Demo artist : Logan Kelsey artist-eng : Logan Kelsey copyright : © Vertical Online 2001 copyright-eng : © Vertical Online 2001 encoder : Sorenson Video 3 encoder-eng : Sorenson Video 3 Duration: 00:00:43.58, start: 0.000000, bitrate: 580 kb/s Stream #0:0(eng): Video: svq3 (SVQ3 / 0x33515653), yuvj420p, 320x240, 391 kb/s, 30.02 fps, 30 tbr, 600 tbn, 600 tbc Metadata: creation_time : 2001-03-20 16:17:18 handler_name : Apple Alias Data Handler Stream #0:1(eng): Audio: adpcm_ima_qt (ima4 / 0x34616D69), 44100 Hz, mono, s16p, 176 kb/s Metadata: creation_time : 2001-03-20 16:17:18 handler_name : Apple Alias Data Handler Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'fate-suite/aac/al_sbr_cm_48_5.1.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: mp42isom creation_time : 2008-01-22 11:26:59 Duration: 00:00:32.17, start: 0.000000, bitrate: 129 kb/s Stream #1:0(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, 6 channels (FL+FR+FC+LFE+FLC+FRC), fltp, 128 kb/s Metadata: creation_time : 2008-01-22 11:26:59 handler_name : soun Please use -q:a or -q:v, -qscale is ambiguous Output #0, ipod, to 'out.m4v': Metadata: encoder-eng : Sorenson Video 3 title : Vertical Online SV3 Demo title-eng : Vertical Online SV3 Demo artist : Logan Kelsey artist-eng : Logan Kelsey copyright : © Vertical Online 2001 copyright-eng : © Vertical Online 2001 encoder : Lavf54.63.102 Stream #0:0(eng): Video: mpeg4 (mp4v / 0x7634706D), yuv420p, 320x240, q=2-31, 200 kb/s, 15360 tbn, 30 tbc Metadata: creation_time : 2001-03-20 16:17:18 handler_name : Apple Alias Data Handler Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 128 kb/s Metadata: creation_time : 2001-03-20 16:17:18 handler_name : Apple Alias Data Handler Stream #0:2(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, 6 channels (FL+FR+FC+LFE+FLC+FRC), fltp, 128 kb/s Metadata: creation_time : 2008-01-22 11:26:59 handler_name : soun Stream mapping: Stream #0:0 -> #0:0 (svq3 -> mpeg4) Stream #0:1 -> #0:1 (adpcm_ima_qt -> aac) Stream #1:0 -> #0:2 (aac -> aac) Press [q] to stop, [?] for help Multiple frames in a packet from stream 1 frame= 1308 fps=476 q=5.0 Lsize= 2935kB time=00:00:43.60 bitrate= 551.4kbits/s video:1953kB audio:939kB subtitle:0 global headers:0kB muxing overhead 1.477469%
comment:25 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | open → closed |
Should be fixed in latest git head, sorry for the delay.
Please post all necessary information here, not on third party sites.
Is this not reproducible with current git head?
Did you write the patch?
I believe Baptiste already reviewed the patch, can you answer his questions?
http://roundup.libav.org/msg13368