Opened 11 years ago
Closed 11 years ago
#3111 closed defect (wontfix)
mov allows random codecs
Reported by: | Elliott | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | git-master | Keywords: | mov |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
Using ffmpeg -acodec copy on MTS files from a Sony FS700 camera produces files with an unknown audio codec called HDMV, which won't play in any of my programs. I'm not sure how pcm_bluray is different than standard pcm, but at least the source files play in VLC.
How to reproduce:
Show that source audio track is recognized as pcm_bluray
$ ffprobe 00008.MTS -show_streams -select_streams a ffprobe version N-57394-gea9632b Copyright (c) 2007-2013 the FFmpeg developers built on Oct 24 2013 11:58:12 with Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn) configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-static --enable-libass --enable-libbluray --enable-libfdk-aac --enable-libmp3lame --enable-libvpx --enable-libx264 --enable-opencl --enable-libfreetype --disable-shared --enable-libopenjpeg --enable-libvorbis --enable-libtheora libavutil 52. 47.101 / 52. 47.101 libavcodec 55. 38.101 / 55. 38.101 libavformat 55. 19.104 / 55. 19.104 libavdevice 55. 5.100 / 55. 5.100 libavfilter 3. 89.100 / 3. 89.100 libswscale 2. 5.101 / 2. 5.101 libswresample 0. 17.104 / 0. 17.104 libpostproc 52. 3.100 / 52. 3.100 Input #0, mpegts, from '00008.MTS': Duration: 00:00:05.55, start: 1.000011, bitrate: 23039 kb/s Program 1 Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc Stream #0:1[0x1100]: Audio: pcm_bluray (HDMV / 0x564D4448), 48000 Hz, stereo, s16, 1536 kb/s Stream #0:2[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080 [STREAM] index=1 codec_name=pcm_bluray codec_long_name=PCM signed 16|20|24-bit big-endian for Blu-ray media profile=unknown codec_type=audio codec_time_base=1/48000 codec_tag_string=HDMV codec_tag=0x564d4448 sample_fmt=s16 sample_rate=48000 channels=2 channel_layout=stereo bits_per_sample=0 id=0x1100 r_frame_rate=0/0 avg_frame_rate=0/0 time_base=1/90000 start_pts=93754 start_time=1.041711 duration_ts=495450 duration=5.505000 bit_rate=1536000 nb_frames=N/A nb_read_frames=N/A nb_read_packets=N/A DISPOSITION:default=0 DISPOSITION:dub=0 DISPOSITION:original=0 DISPOSITION:comment=0 DISPOSITION:lyrics=0 DISPOSITION:karaoke=0 DISPOSITION:forced=0 DISPOSITION:hearing_impaired=0 DISPOSITION:visual_impaired=0 DISPOSITION:clean_effects=0 DISPOSITION:attached_pic=0 [/STREAM]
Rewrap mts to mov without transcoding
$ ffmpeg -i 00008.MTS -acodec copy -vcodec copy 00008.mov ffmpeg version N-57394-gea9632b Copyright (c) 2000-2013 the FFmpeg developers built on Oct 24 2013 11:58:12 with Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn) configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-static --enable-libass --enable-libbluray --enable-libfdk-aac --enable-libmp3lame --enable-libvpx --enable-libx264 --enable-opencl --enable-libfreetype --disable-shared --enable-libopenjpeg --enable-libvorbis --enable-libtheora libavutil 52. 47.101 / 52. 47.101 libavcodec 55. 38.101 / 55. 38.101 libavformat 55. 19.104 / 55. 19.104 libavdevice 55. 5.100 / 55. 5.100 libavfilter 3. 89.100 / 3. 89.100 libswscale 2. 5.101 / 2. 5.101 libswresample 0. 17.104 / 0. 17.104 libpostproc 52. 3.100 / 52. 3.100 Input #0, mpegts, from '00008.MTS': Duration: 00:00:05.55, start: 1.000011, bitrate: 23039 kb/s Program 1 Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc Stream #0:1[0x1100]: Audio: pcm_bluray (HDMV / 0x564D4448), 48000 Hz, stereo, s16, 1536 kb/s Stream #0:2[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080 [mov @ 0x7fdc40843200] track 1: codec frame size is not set Output #0, mov, to '00008.mov': Metadata: encoder : Lavf55.19.104 Stream #0:0: Video: h264 (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 23.98 fps, 90k tbn, 90k tbc Stream #0:1: Audio: pcm_bluray (HDMV / 0x564D4448), 48000 Hz, stereo, 1536 kb/s Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help frame= 132 fps=0.0 q=-1.0 Lsize= 14688kB time=00:00:05.55 bitrate=21673.7kbits/s video:13646kB audio:1037kB subtitle:0 global headers:0kB muxing overhead 0.030985%
Show that audio stream is unrecognized
$ ffprobe 00008.mov -show_streams -select_streams a ffprobe version N-57394-gea9632b Copyright (c) 2007-2013 the FFmpeg developers built on Oct 24 2013 11:58:12 with Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn) configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-static --enable-libass --enable-libbluray --enable-libfdk-aac --enable-libmp3lame --enable-libvpx --enable-libx264 --enable-opencl --enable-libfreetype --disable-shared --enable-libopenjpeg --enable-libvorbis --enable-libtheora libavutil 52. 47.101 / 52. 47.101 libavcodec 55. 38.101 / 55. 38.101 libavformat 55. 19.104 / 55. 19.104 libavdevice 55. 5.100 / 55. 5.100 libavfilter 3. 89.100 / 3. 89.100 libswscale 2. 5.101 / 2. 5.101 libswresample 0. 17.104 / 0. 17.104 libpostproc 52. 3.100 / 52. 3.100 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fca3b000800] Could not find codec parameters for stream 1 (Audio: none (HDMV / 0x564D4448), 48000 Hz, stereo, 1542 kb/s): unknown codec Consider increasing the value for the 'analyzeduration' and 'probesize' options Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '00008.mov': Metadata: major_brand : qt minor_version : 512 compatible_brands: qt encoder : Lavf55.19.104 Duration: 00:00:05.51, start: 0.041000, bitrate: 21833 kb/s Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 20305 kb/s, 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc (default) Metadata: handler_name : DataHandler Stream #0:1(eng): Audio: none (HDMV / 0x564D4448), 48000 Hz, stereo, 1542 kb/s (default) Metadata: handler_name : DataHandler Unsupported codec with id 0 for input stream 1 [STREAM] index=1 codec_name=unknown codec_long_name=unknown profile=unknown codec_type=audio codec_time_base=0/1 codec_tag_string=HDMV codec_tag=0x564d4448 sample_fmt=unknown sample_rate=48000 channels=2 channel_layout=stereo bits_per_sample=0 id=N/A r_frame_rate=0/0 avg_frame_rate=0/0 time_base=1/48000 start_pts=1968 start_time=0.041000 duration_ts=264481 duration=5.510021 bit_rate=1542394 nb_frames=1102 nb_read_frames=N/A nb_read_packets=N/A DISPOSITION:default=1 DISPOSITION:dub=0 DISPOSITION:original=0 DISPOSITION:comment=0 DISPOSITION:lyrics=0 DISPOSITION:karaoke=0 DISPOSITION:forced=0 DISPOSITION:hearing_impaired=0 DISPOSITION:visual_impaired=0 DISPOSITION:clean_effects=0 DISPOSITION:attached_pic=0 TAG:language=eng TAG:handler_name=DataHandler [/STREAM]
Attachments (1)
Change History (5)
by , 11 years ago
comment:1 by , 11 years ago
Keywords: | mov added |
---|---|
Summary: | "acodec copy" doesn't work on MTS files with pcm_bluray audio → mov allows random codecs |
follow-up: 3 comment:2 by , 11 years ago
The problem is that the source file has a valid audio track, and the output file does not. ffprobe calls it "unknown" and Quicktime calls it "HDMV".
I just noticed using ffmpeg -codecs that pcm_bluray is listed as a decoder only. Does that mean we're incapable of passing it through using -acodec copy? If that's the case, we should probably see an error message when trying.
$ ffmpeg -acodec pcm_bluray -i 00008.mov
I don't understand this command... it doesn't do anything.
I could use -acodec pcm_s16be but that would be slower than a passthrough, and could theoretically degrade the sound a little bit.
comment:3 by , 11 years ago
Replying to spookybathtub:
The problem is that the source file has a valid audio track, and the output file does not.
Please define "valid".
ffprobe calls it "unknown" and Quicktime calls it "HDMV".
QuickTime cannot detect it because Apple did not define pcm_bluray in mov. I showed how the file can be decoded with FFmpeg.
I just noticed using ffmpeg -codecs that pcm_bluray is listed as a decoder only. Does that mean we're incapable of passing it through using -acodec copy?
No (as you showed, I didn't know).
$ ffmpeg -acodec pcm_bluray -i 00008.movI don't understand this command... it doesn't do anything.
It shows you that the file contains a pcm_bluray stream, you can do with it whatever you want (decode it to wav, play it with ffplay, ...)
I could use -acodec pcm_s16be but that would be slower
Did you benchmark? Is it really measurable?
than a passthrough,
(Please use "remuxing".)
and could theoretically degrade the sound a little bit.
Then use pcm_s24be.
comment:4 by , 11 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
As said I don't think changes regarding this ticket are likely: The user is basically responsible what codec and container he uses -codec copy
on.
(Although I don't know what you mean with "standard pcm", for the sake of this ticket we can assume that pcm_bluray has absolutely nothing to do with it.)
If you try to put random codecs into general purpose containers there is no guarantee that the output file is playable but note that the following works fine here:
$ ffmpeg -acodec pcm_bluray -i 00008.mov
If no other comments follow, I will probably close this ticket.