Opened 4 years ago

Last modified 3 years ago

#3009 open enhancement

Support mvc

Reported by: skifreak Owned by:
Priority: wish Component: avcodec
Version: git-master Keywords: h264 mvc mpegts
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: yes

Description

Summary of the bug:Trying to analyze the AVC_codec_not_recognized_right_video_sample.m2ts. ffmpeg does not recognize the AVC codec in the m2ts file.

Was using the command
$ ffmpeg -probesize 10240 -analyzeduration 1000 -i AVC_codec_not_recognized_right_video_sample.m2ts
ffmpeg -probesize 10240 -analyzeduration 1000 -i right_video_sample.m2ts
ffmpeg version N-56704-g3e0c78b Copyright (c) 2000-2013 the FFmpeg developers

built on Sep 27 2013 16:48:11 with gcc 4.7.3 (Gentoo 4.7.3 p1.2, pie-0.5.5)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar --optflags='-march=native -O2 -pipe -g' --extra-cflags='-march=native -O2 -pipe -g' --extra-cxxflags='-march=native -O2 -pipe -g' --disable-static --enable-gpl --enable-postproc --enable-avfilter --enable-avresample --disable-stripping --enable-version3 --disable-indev=oss --disable-indev=jack --disable-outdev=oss --enable-version3 --enable-bzlib --disable-runtime-cpudetect --disable-debug --disable-doc --disable-gnutls --enable-hardcoded-tables --enable-iconv --disable-network --disable-openssl --enable-ffplay --disable-vaapi --disable-vdpau --enable-zlib --enable-libvo-aacenc --disable-libvo-amrwbenc --enable-libmp3lame --disable-libfdk-aac --disable-libaacplus --disable-libfaac --enable-libtheora --disable-libtwolame --disable-libwavpack --enable-libx264 --enable-libxvid --disable-libcdio --disable-libiec61883 --enable-libdc1394 --disable-libcaca --enable-openal --disable-libv4l2 --disable-libpulse --enable-x11grab --disable-libflite --disable-frei0r --disable-fontconfig --disable-libass --enable-libfreetype --disable-libsoxr --enable-pthreads --enable-libopencore-amrwb --enable-libopencore-amrnb --enable-libopenjpeg --disable-libbluray --disable-libcelt --disable-libgme --disable-libgsm --disable-libmodplug --disable-libopus --disable-libquvi --disable-librtmp --disable-libschroedinger --disable-libspeex --enable-libvorbis --disable-libvpx --disable-amd3dnow --disable-amd3dnowext --disable-altivec --disable-vis --disable-neon --cpu=host
libavutil 52. 46.100 / 52. 46.100
libavcodec 55. 33.101 / 55. 33.101
libavformat 55. 18.104 / 55. 18.104
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 87.100 / 3. 87.100
libavresample 1. 1. 0 / 1. 1. 0
libswscale 2. 5.100 / 2. 5.100
libswresample 0. 17.103 / 0. 17.103
libpostproc 52. 3.100 / 52. 3.100

[mpegts @ 0x220a320] probed stream 0 failed
[mpegts @ 0x220a320] Could not find codec parameters for stream 0 (Unknown: none (HDMV / 0x564D4448)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
right_video_sample.m2ts: could not find codec parameters

mediainfo is able to recognize the AVC codec
$ mediainfo AVC_codec_not_recognized_right_video_sample.m2ts
General
ID : 0 (0x0)
Complete name : right_video_sample.m2ts
Format : BDAV
Format/Info? : Blu-ray Video
File size : 9.77 MiB
Duration : 4s 593ms
Overall bit rate mode : Variable
Overall bit rate : 17.7 Mbps
Maximum Overall bit rate : 48.0 Mbps

Video
ID : 4114 (0x1012)
Menu ID : 1 (0x1)
Format : AVC
Format/Info? : Advanced Video Codec
Format profile : Stereo High@L4.1
MultiView_Count : 2
Format settings, CABAC : Yes
Format settings, ReFrames? : 4 frames
Codec ID : 32
Duration : 4s 296ms
Bit rate mode : Variable
Bit rate : 17.0 Mbps
Maximum bit rate : 22.6 Mbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 23.976 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.341
Stream size : 8.68 MiB (89%)

The output of
$ ffmpeg -v 9 -loglevel 99 -i AVC_codec_not_recognized_right_video_sample.m2ts
is show below

In comparison, the left video file from the same 3D source, is recognized

$ ffmpeg -i AVC_codec_recognized_left_video_sample.m2ts
ffmpeg version N-56704-g3e0c78b Copyright (c) 2000-2013 the FFmpeg developers

built on Sep 27 2013 16:48:11 with gcc 4.7.3 (Gentoo 4.7.3 p1.2, pie-0.5.5)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar --optflags='-march=native -O2 -pipe -g' --extra-cflags='-march=native -O2 -pipe -g' --extra-cxxflags='-march=native -O2 -pipe -g' --disable-static --enable-gpl --enable-postproc --enable-avfilter --enable-avresample --disable-stripping --enable-version3 --disable-indev=oss --disable-indev=jack --disable-outdev=oss --enable-version3 --enable-bzlib --disable-runtime-cpudetect --disable-debug --disable-doc --disable-gnutls --enable-hardcoded-tables --enable-iconv --disable-network --disable-openssl --enable-ffplay --disable-vaapi --disable-vdpau --enable-zlib --enable-libvo-aacenc --disable-libvo-amrwbenc --enable-libmp3lame --disable-libfdk-aac --disable-libaacplus --disable-libfaac --enable-libtheora --disable-libtwolame --disable-libwavpack --enable-libx264 --enable-libxvid --disable-libcdio --disable-libiec61883 --enable-libdc1394 --disable-libcaca --enable-openal --disable-libv4l2 --disable-libpulse --enable-x11grab --disable-libflite --disable-frei0r --disable-fontconfig --disable-libass --enable-libfreetype --disable-libsoxr --enable-pthreads --enable-libopencore-amrwb --enable-libopencore-amrnb --enable-libopenjpeg --disable-libbluray --disable-libcelt --disable-libgme --disable-libgsm --disable-libmodplug --disable-libopus --disable-libquvi --disable-librtmp --disable-libschroedinger --disable-libspeex --enable-libvorbis --disable-libvpx --disable-amd3dnow --disable-amd3dnowext --disable-altivec --disable-vis --disable-neon --cpu=host
libavutil 52. 46.100 / 52. 46.100
libavcodec 55. 33.101 / 55. 33.101
libavformat 55. 18.104 / 55. 18.104
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 87.100 / 3. 87.100
libavresample 1. 1. 0 / 1. 1. 0
libswscale 2. 5.100 / 2. 5.100
libswresample 0. 17.103 / 0. 17.103
libpostproc 52. 3.100 / 52. 3.100

[mpegts @ 0x244e0a0] Stream #2: not enough frames to estimate rate; consider increasing probesize
[NULL @ 0x2453540] start time is not set in estimate_timings_from_pts
[mpegts @ 0x244e0a0] PES packet size mismatch
[mpegts @ 0x244e0a0] Could not find codec parameters for stream 2 (Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpegts, from 'AVC_codec_recognized_left_video_sample.m2ts':

Duration: 00:00:02.88, start: 11.608967, bitrate: 28465 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: dts (DTS-HD MA) ([134][0][0][0] / 0x0086), 48000 Hz, 5.1(side), fltp, 1536 kb/s
Stream #0:2[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)

$ mediainfo AVC_codec_recognized_left_video_sample.m2ts
General
ID : 0 (0x0)
Complete name : AVC_codec_recognized_left_video_sample.m2ts
Format : BDAV
Format/Info? : Blu-ray Video
File size : 9.77 MiB
Duration : 2s 791ms
Overall bit rate mode : Variable
Overall bit rate : 28.8 Mbps
Maximum Overall bit rate : 48.0 Mbps

Video
ID : 4113 (0x1011)
Menu ID : 1 (0x1)
Format : AVC
Format/Info? : Advanced Video Codec
Format profile : High@L4.1
Format settings, CABAC : Yes
Format settings, ReFrames? : 4 frames
Codec ID : 27
Duration : 2s 878ms
Bit rate mode : Variable
Maximum bit rate : 33.9 Mbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 23.976 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive

Audio
ID : 4352 (0x1100)
Menu ID : 1 (0x1)
Format : DTS
Format/Info? : Digital Theater Systems
Format profile : MA / Core
Mode : 16
Format settings, Endianness : Big
Muxing mode : Stream extension
Codec ID : 134
Duration : 2s 763ms
Bit rate mode : Variable
Bit rate : Unknown / 1 509 Kbps
Channel count : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 KHz
Bit depth : 24 bits
Compression mode : Lossless / Lossy

Text
ID : 4608 (0x1200)
Menu ID : 1 (0x1)
Format : PGS
Codec ID : 144

All files have been submitted to the ftp server in incoming/AVC_codec_in_m2ts_not_recognized

How to reproduce:

Run 
$ ffmpeg -i AVC_codec_not_recognized_right_video_sample.m2ts

$ ffmpeg -v 9 -loglevel 99 -i AVC_codec_not_recognized_right_video_sample.m2ts 
ffmpeg version N-56704-g3e0c78b Copyright (c) 2000-2013 the FFmpeg developers
  built on Sep 27 2013 16:48:11 with gcc 4.7.3 (Gentoo 4.7.3 p1.2, pie-0.5.5)
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar --optflags='-march=native -O2 -pipe -g' --extra-cflags='-march=native -O2 -pipe -g' --extra-cxxflags='-march=native -O2 -pipe -g' --disable-static --enable-gpl --enable-postproc --enable-avfilter --enable-avresample --disable-stripping --enable-version3 --disable-indev=oss --disable-indev=jack --disable-outdev=oss --enable-version3 --enable-bzlib --disable-runtime-cpudetect --disable-debug --disable-doc --disable-gnutls --enable-hardcoded-tables --enable-iconv --disable-network --disable-openssl --enable-ffplay --disable-vaapi --disable-vdpau --enable-zlib --enable-libvo-aacenc --disable-libvo-amrwbenc --enable-libmp3lame --disable-libfdk-aac --disable-libaacplus --disable-libfaac --enable-libtheora --disable-libtwolame --disable-libwavpack --enable-libx264 --enable-libxvid --disable-libcdio --disable-libiec61883 --enable-libdc1394 --disable-libcaca --enable-openal --disable-libv4l2 --disable-libpulse --enable-x11grab --disable-libflite --disable-frei0r --disable-fontconfig --disable-libass --enable-libfreetype --disable-libsoxr --enable-pthreads --enable-libopencore-amrwb --enable-libopencore-amrnb --enable-libopenjpeg --disable-libbluray --disable-libcelt --disable-libgme --disable-libgsm --disable-libmodplug --disable-libopus --disable-libquvi --disable-librtmp --disable-libschroedinger --disable-libspeex --enable-libvorbis --disable-libvpx --disable-amd3dnow --disable-amd3dnowext --disable-altivec --disable-vis --disable-neon --cpu=host
  libavutil      52. 46.100 / 52. 46.100
  libavcodec     55. 33.101 / 55. 33.101
  libavformat    55. 18.104 / 55. 18.104
  libavdevice    55.  3.100 / 55.  3.100
  libavfilter     3. 87.100 /  3. 87.100
  libavresample   1.  1.  0 /  1.  1.  0
  libswscale      2.  5.100 /  2.  5.100
  libswresample   0. 17.103 /  0. 17.103
  libpostproc    52.  3.100 / 52.  3.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument '9'.                                               
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '99'.                                
Reading option '-i' ... matched as input file with argument 'right_video_sample.m2ts'.                                             
Finished splitting the commandline.                                                                                                
Parsing a group of options: global .                                                                                               
Applying option v (set logging level) with argument 9.                                                                             
Successfully parsed a group of options.                                                                                            
Parsing a group of options: input file right_video_sample.m2ts.                                                                    
Successfully parsed a group of options.                                                                                            
Opening an input file: right_video_sample.m2ts.                                                                                    
[mpegts @ 0xffe0e0] Format mpegts probed with size=2048 and score=100                                                              
[mpegts @ 0xffe0e0] stream=0 stream_type=20 pid=1012 prog_reg_desc=HDMV                                                            
[mpegts @ 0xffe0e0] File position before avformat_find_stream_info() is 0
[mpegts @ 0xffe0e0] parser not found for codec none, packets or times may be invalid.
[mpegts @ 0xffe0e0] probing stream 0 pp:2500
[mpegts @ 0xffe0e0] probing stream 0 pp:2499
[mpegts @ 0xffe0e0] probing stream 0 pp:2498
[mpegts @ 0xffe0e0] probing stream 0 pp:2497
[mpegts @ 0xffe0e0] probing stream 0 pp:2496
[mpegts @ 0xffe0e0] probing stream 0 pp:2495
[mpegts @ 0xffe0e0] probing stream 0 pp:2494
[mpegts @ 0xffe0e0] probing stream 0 pp:2493
[mpegts @ 0xffe0e0] probing stream 0 pp:2492
[mpegts @ 0xffe0e0] probing stream 0 pp:2491
[mpegts @ 0xffe0e0] probing stream 0 pp:2490
[mpegts @ 0xffe0e0] probing stream 0 pp:2489
[mpegts @ 0xffe0e0] probing stream 0 pp:2488
[mpegts @ 0xffe0e0] probing stream 0 pp:2487
[mpegts @ 0xffe0e0] probing stream 0 pp:2486
[mpegts @ 0xffe0e0] probing stream 0 pp:2485
[mpegts @ 0xffe0e0] probing stream 0 pp:2484
[mpegts @ 0xffe0e0] probing stream 0 pp:2483
[mpegts @ 0xffe0e0] probing stream 0 pp:2482
[mpegts @ 0xffe0e0] probing stream 0 pp:2481
[mpegts @ 0xffe0e0] probing stream 0 pp:2480
[mpegts @ 0xffe0e0] probing stream 0 pp:2479
[mpegts @ 0xffe0e0] probing stream 0 pp:2478
[mpegts @ 0xffe0e0] probing stream 0 pp:2477
[mpegts @ 0xffe0e0] probing stream 0 pp:2476
[mpegts @ 0xffe0e0] probing stream 0 pp:2475
[mpegts @ 0xffe0e0] probing stream 0 pp:2474
[mpegts @ 0xffe0e0] probing stream 0 pp:2473
[mpegts @ 0xffe0e0] probing stream 0 pp:2472
[mpegts @ 0xffe0e0] probing stream 0 pp:2471
[mpegts @ 0xffe0e0] probing stream 0 pp:2470
[mpegts @ 0xffe0e0] probing stream 0 pp:2469
[mpegts @ 0xffe0e0] probing stream 0 pp:2468
[mpegts @ 0xffe0e0] probing stream 0 pp:2467
[mpegts @ 0xffe0e0] probing stream 0 pp:2466
[mpegts @ 0xffe0e0] probing stream 0 pp:2465
[mpegts @ 0xffe0e0] probing stream 0 pp:2464
[mpegts @ 0xffe0e0] probing stream 0 pp:2463
[mpegts @ 0xffe0e0] probing stream 0 pp:2462
[mpegts @ 0xffe0e0] probing stream 0 pp:2461
[mpegts @ 0xffe0e0] probing stream 0 pp:2460
[mpegts @ 0xffe0e0] probing stream 0 pp:2459
[mpegts @ 0xffe0e0] probed stream 0 failed
[mpegts @ 0xffe0e0] parser not found for codec none, packets or times may be invalid.
[mpegts @ 0xffe0e0] Probe buffer size limit of 5000000 bytes reached
[mpegts @ 0xffe0e0] Could not find codec parameters for stream 0 (Unknown: none (HDMV / 0x564D4448)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0xffe0e0] File position after avformat_find_stream_info() is 0
right_video_sample.m2ts: could not find codec parameters
[AVIOContext @ 0x10067a0] Statistics: 5558420 bytes read, 3 seeks

Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.

Change History (6)

comment:1 follow-up: Changed 4 years ago by cehoyos

  • Component changed from FFmpeg to avcodec
  • Keywords h264 mvc mpegts added; AVC m2ts removed
  • Priority changed from normal to wish
  • Reproduced by developer set
  • Status changed from new to open
  • Summary changed from AVC codec in m2ts file not recognized by ffmpeg to Support mvc
  • Type changed from defect to enhancement
  • Version changed from 2.0.1 to git-master

Please explain how the samples were created (did you use software to separate the two streams or do you have a device that produces two separate streams) and please provide both samples.

comment:2 in reply to: ↑ 1 Changed 4 years ago by skifreak

Replying to cehoyos:

Please explain how the samples were created (did you use software to separate the two streams or do you have a device that produces two separate streams) and please provide both samples.

I obtained the samples through a passthrough bluray rip using DVDFab from a 3D bluray. These streams have not been altered from the bluray in any way. I provided both samples, as stated in the bug report, under incoming/AVC_codec_in_m2ts_not_recognized/. Inside there are three files:

AVC_codec_not_recognized_README.txt
AVC_codec_not_recognized_right_video_sample.m2ts
AVC_codec_recognized_left_video_sample.m2ts

As stated before, AVC_codec_recognized_left_video_sample.m2ts's codec is recognized with ffmpeg and playable with mplayer, while AVC_codec_not_recognized_right_video_sample.m2ts 's (same AVC) codec

is not recognized by ffmpeg. mediainfo is able to recognize the codec in both files.

Please let me know if I can provide any more information. I greatly appreciate all of your assistance and help in this matter.

comment:3 follow-up: Changed 4 years ago by cehoyos

(Sorry that I missed the uploaded files)

Am I correct that the original files on the Bluray are named 00001.MTS, 00002.MTS, ... and that they contain two video streams (the "left" and the "right" one) in one file and that DVDFab created the files you uploaded by separating the video streams? Or do I misunderstand? (Sorry, I don't have a bluray player.)

comment:4 in reply to: ↑ 3 Changed 4 years ago by skifreak

Replying to cehoyos:

(Sorry that I missed the uploaded files)

Am I correct that the original files on the Bluray are named 00001.MTS, 00002.MTS, ... and that they contain two video streams (the "left" and the "right" one) in one file and that DVDFab created the files you uploaded by separating the video streams? Or do I misunderstand? (Sorry, I don't have a bluray player.)

The (full, not sample) files are named 0014.m2ts (left I believe) and 0015.m2ts (right I believe). Each contains one video stream, the left containing sound and subtitle, the right containing neither. I'm not certain how the files are exactly contained on the disk, if separation was involved or not when they were created. From my past experience in passthrough with the software though, it would seem the files are exact duplicates of the contents on the disk. (There isn't a way I know of to check this for certain, since the disc needs to be decrypted to be viewed and DVDFab will not let me look at exactly which m2ts file(s) represent each stream.) You understand correctly, from what I can gather. (I don't have a bluray "player" in the sense either, just a bluray sata drive.) Thanks again for all of your work, I greatly appreciate your and all of the developers' help. ffmpeg has, and always will be, my one stop software for encoding.

comment:6 Changed 3 years ago by hawken

A small collection of resources I think can be useful:

Jochen Britz's MVC thesis:

https://github.com/Britz/FFmpeg

Koda tried to clean this up for libav:

https://github.com/kodabb/libav/tree/mvc_redo4

Webpages:

http://blogs.gentoo.org/lu_zero/2014/04/04/the-road-to-mvc/

libav information:

https://wiki.libav.org/Blueprint/MVC

Last edited 3 years ago by hawken (previous) (diff)
Note: See TracTickets for help on using tickets.