Opened 10 years ago

Last modified 3 weeks ago

#3009 open enhancement

Support mvc

Reported by: skifreak Owned by:
Priority: wish Component: avcodec
Version: git-master Keywords: h264 mvc mpegts
Cc: DustBird, philcerf, kagami 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 (13)

comment:1 by Carl Eugen Hoyos, 10 years ago

Component: FFmpegavcodec
Keywords: h264 mvc mpegts added; AVC m2ts removed
Priority: normalwish
Reproduced by developer: set
Status: newopen
Summary: AVC codec in m2ts file not recognized by ffmpegSupport mvc
Type: defectenhancement
Version: 2.0.1git-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.

in reply to:  1 comment:2 by skifreak, 10 years ago

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 by Carl Eugen Hoyos, 10 years ago

(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.)

in reply to:  3 comment:4 by skifreak, 10 years ago

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 by Håkon Struijk Holmen, 9 years ago

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 9 years ago by Håkon Struijk Holmen (previous) (diff)

comment:7 by DustBird, 2 years ago

Cc: DustBird added

My JVC Everio GS-TD1 camcorder produces these files as well. If I'm not mistaken, there are actually two different formats that get called MVC. One, called "MP4/MVC" on the camera, produces a normal video stream and a data stream that contains delta information. The other format, called "AVCHD 3D" on the camera, contains two video streams, and should be easier to support. The sample on this thread seems to be from the dual-video-stream "AVCHD 3D" version.

Here's the result of ffprobe:

>ffprobe AVCHD3Dtest.MTS
ffprobe version N-105832-g72684d2c2d-20220303 Copyright (c) 2007-2022 the FFmpeg developers
  built with gcc 11.2.0 (crosstool-NG 1.24.0.533_681aaef)
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --enable-shared --disable-static --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librist --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --disable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp --extra-version=20220303
  libavutil      57. 22.100 / 57. 22.100
  libavcodec     59. 21.103 / 59. 21.103
  libavformat    59. 17.102 / 59. 17.102
  libavdevice    59.  5.100 / 59.  5.100
  libavfilter     8. 27.100 /  8. 27.100
  libswscale      6.  5.100 /  6.  5.100
  libswresample   4.  4.100 /  4.  4.100
  libpostproc    56.  4.100 / 56.  4.100
[mpegts @ 0000020e61edc4c0] Stream #1: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0000020e61edc4c0] start time for stream 1 is not set in estimate_timings_from_pts
[mpegts @ 0000020e61edc4c0] stream 1 : no TS found at start of file, duration not set
[mpegts @ 0000020e61edc4c0] Could not find codec parameters for stream 1 (Video: h264 (HDMV / 0x564D4448), none): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, mpegts, from 'AVCHD3Dtest.MTS':
  Duration: 00:00:09.02, start: 1.033367, bitrate: 26003 kb/s
  Program 1
  Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p(top first), 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 59.94 tbr, 90k tbn
  Stream #0:1[0x1012]: Video: h264 (HDMV / 0x564D4448), none, 90k tbr, 90k tbn
  Stream #0:2[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 256 kb/s
  Stream #0:3[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080

And again with the probesize and analyzeduration increased:

>ffprobe -probesize 1000000000000 -analyzeduration 10000000000000 AVCHD3Dtest.MTS
ffprobe version N-105832-g72684d2c2d-20220303 Copyright (c) 2007-2022 the FFmpeg developers
  built with gcc 11.2.0 (crosstool-NG 1.24.0.533_681aaef)
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --enable-shared --disable-static --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librist --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --disable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp --extra-version=20220303
  libavutil      57. 22.100 / 57. 22.100
  libavcodec     59. 21.103 / 59. 21.103
  libavformat    59. 17.102 / 59. 17.102
  libavdevice    59.  5.100 / 59.  5.100
  libavfilter     8. 27.100 /  8. 27.100
  libswscale      6.  5.100 /  6.  5.100
  libswresample   4.  4.100 /  4.  4.100
  libpostproc    56.  4.100 / 56.  4.100
[h264 @ 000001b832dcde40] sps_id 1 out of range
    Last message repeated 17 times
[h264 @ 000001b832dcde40] missing picture in access unit with size 15503381
[h264 @ 000001b832dcde40] sps_id 1 out of range
    Last message repeated 17 times
[mpegts @ 000001b832cfc800] Could not find codec parameters for stream 1 (Video: h264 (HDMV / 0x564D4448), none): unspecified size
Consider increasing the value for the 'analyzeduration' (10000000000000) and 'probesize' (1000000000000) options
Input #0, mpegts, from 'AVCHD3Dtest.MTS':
  Duration: 00:00:09.02, start: 1.033367, bitrate: 26003 kb/s
  Program 1
  Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p(top first), 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 59.94 tbr, 90k tbn
  Stream #0:1[0x1012]: Video: h264 (HDMV / 0x564D4448), none, 90k tbr, 90k tbn
  Stream #0:2[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 256 kb/s
  Stream #0:3[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080

The size of the two video streams are about equal, again suggesting that it is an independent video stream, and not some kind of delta. Programs like MediaInfo correctly read format information (such as resolution) for both streams, so perhaps ffmpeg is just having trouble with that aspect, rather than anything codec related? (Forgive my ignorance if I'm wrong.)

I would be glad to help in any way I can, including samples straight off the JVC 3D camcorder :)

comment:8 by jake downs, 6 months ago

Hello, I'm curious if there's been any progress on adding support for this?

I noticed that the LAVFilters project seems to add support for PCs https://github.com/Nevcairiel/LAVFilters

And applications like Stereoscopic Player appear to be able to decode the additional view and render it as a SBS view in real time (perhap with some buffering?) without needing to fully re-encode the file.

I'd love to see if we could get support added to FFMPEG and, beyond that, VLC for Mac / Linux (for x86, x64 and ARM64 ideally)

Is anyone aware of any progress being made on this front?

I'll be diving into the Jochen Britz repo in the meantime: https://github.com/Britz/FFmpeg (Thanks to Håkon Struijk Holmen for posting that)

comment:9 by philcerf, 3 months ago

Cc: philcerf added

comment:10 by philcerf, 3 months ago

I guess, that when one has an output device (like a 3D capable projector, a 3D TV screen or glasses/VR-headsets like the "Bigscreen Beyond" or the "XREAL AR glasses") and if that does support MVC itself, then ffmpeg wouldn't need to do much except for passing the stream on as is (and the only thing that would be required was some Linux driver, for the said device.

But it seems that quite some devices do not support MVC directly, but require e.g. SBS (side by side) input.
Right now, many people seem to use BD3D2MK3D, but its not open.

So would be nice if any ffmpeg MVC support could be used together with its stereo3d filter to generate e.g. SBS output.

"3D is dead" - so is it even worth it?
Well, there are still many movies released as 3D movies, not only in the cinema but also on home media (i.e. BluRays).
And while 3D TV screens are probably indeed rather dead, there seem to be still quite many 3D projectors and glasses/VR set being released and in development.
Also there are 3D camcorders which seem to produce the format.

I have found h264-tools which seems to be able to decode MVC and create SBS versions of it. Britz/FFmpeg was already mentioned above.

comment:11 by philcerf, 2 months ago

For the records:
Looks, as if 3D profiles have also been specified for HEVC (https://en.wikipedia.org/wiki/High_Efficiency_Video_Coding#Version_3_and_higher_profiles), though I guess it's not really used yet (at least not by UHD BluRays)

comment:12 by kagami, 3 weeks ago

Not fully ontopic, but I think this belongs here.

There's new app for the Quest headset, 4XVR. It claims support for both AVC MVC and MV-HEVC. I don't have Quest, but I've checked the apk contents and found that it uses ffmpeg (v4.4.3 LGPL2.1+) but to my knowledge nowhere in the app or on the website FFmpeg's license is mentioned and source code isn't available.

Furthermore, the prefix used for compilation --prefix=/ffmpeg_443v_mvc/ and few symbols inside libavcodec binary such as Missing reference picture, mvc_ref_pic_ptr default, h->mvc_ref_pic_ptr = NULL make me think that the developer added support for the MVC decoding to the FFmpeg (I've checked both current and v4.4.3 ffmpeg's source code and haven't found similar lines). Although I'm not entirely sure.

Shouldn't the developer upload modified source code of FFmpeg as the LGPL license requires?

Last edited 3 weeks ago by kagami (previous) (diff)

comment:13 by kagami, 3 weeks ago

Cc: kagami added
Note: See TracTickets for help on using tickets.