Opened 9 years ago

Last modified 6 years ago

#4589 new enhancement

support alis data reference type in mov

Reported by: dave rice 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:

I've been trying to get FFmpeg to generate a file that is supported by Blackmagic Media Express. I can get very close but can not get FFmpeg alone to produce a file acceptable to Media Express. I know that I should send a bug to Blackmagic as well but wanted to send along my notes here as well.

With the command below I can make a sample NTSC file, but to get it to work in Media Express I have to edit the dref type of each trak from 'url ' to 'alis'.

Associated QuickTime documentation (see table 4-2):
https://developer.apple.com/library/mac/documentation/QuickTime/QTFF/QTFFChap2/qtff2.html

Current use of 'url ' in movenc.c:
https://github.com/FFmpeg/FFmpeg/blob/master/libavformat/movenc.c#L1951-L1952

How to reproduce:

This command makes a file that is not supported by Blackmagic Media Express:

ffmpeg -f lavfi -i testsrc=d=1:s=720x486:r=30000/1001 -f lavfi -i aevalsrc=0:c=2:s=48000:d=1 -aspect 4:3 -c:v rawvideo -pix_fmt uyvy422 -vtag 2vuy  -c:a pcm_s24le -vf setfield=bff -y doesnotworkinmediaexpress.mov
ffmpeg version 2.6.3 Copyright (c) 2000-2015 the FFmpeg developers
  built with Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/2.6.3 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-libfreetype --enable-libfaac --enable-libass --enable-ffplay --enable-libopenjpeg --disable-decoder=jpeg2000 --extra-cflags='-I/usr/local/Cellar/openjpeg/1.5.0/include ' --enable-nonfree --enable-vda
  libavutil      54. 20.100 / 54. 20.100
  libavcodec     56. 26.100 / 56. 26.100
  libavformat    56. 25.101 / 56. 25.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 11.102 /  5. 11.102
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Input #0, lavfi, from 'testsrc=d=1:s=720x486:r=30000/1001':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 720x486 [SAR 1:1 DAR 40:27], 29.97 tbr, 29.97 tbn, 29.97 tbc
Single channel layout '2' is interpreted as a number of channels, switch to the syntax '2c' otherwise it will be interpreted as a channel layout number in a later version
Input #1, lavfi, from 'aevalsrc=0:c=2:s=48000:d=1':
  Duration: N/A, start: 0.000000, bitrate: 6144 kb/s
    Stream #1:0: Audio: pcm_f64le, 48000 Hz, stereo, dbl, 6144 kb/s
Output #0, mov, to 'doesnotworkinmediaexpress.mov':
  Metadata:
    encoder         : Lavf56.25.101
    Stream #0:0: Video: rawvideo (2vuy / 0x79757632), uyvy422, 720x486 [SAR 9:10 DAR 4:3], q=2-31, 200 kb/s, 29.97 fps, 30k tbn, 29.97 tbc
    Metadata:
      encoder         : Lavc56.26.100 rawvideo
    Stream #0:1: Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, stereo, s32, 2304 kb/s
    Metadata:
      encoder         : Lavc56.26.100 pcm_s24le
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> rawvideo (native))
  Stream #1:0 -> #0:1 (pcm_f64le (native) -> pcm_s24le (native))
Press [q] to stop, [?] for help
frame=   30 fps=0.0 q=0.0 Lsize=   20787kB time=00:00:01.00 bitrate=169834.0kbits/s    
video:20503kB audio:282kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.008913%

If the resulting file is then edited (I'm using a hex editor) to change the "url " in the dref atom to "alis" then the file works fine in Media Express.

I think that being able to produce files from FFmpeg for use in Media Express would be helpful. I've noticed that many QuickTime producing applications, like Media Express and Final Cut use 'alis' and not 'url ', but I am no expert in this atom. Is it feasible or a good idea to change 'url ' to 'alis' or to provide an option to use 'alis' data reference types.

Change History (5)

comment:1 by Carl Eugen Hoyos, 9 years ago

Is the issue reproducible with current FFmpeg git head?

comment:2 by dave rice, 9 years ago

I just rebuilt from git head and yes the result is the same as listed above.

comment:3 by dave rice, 9 years ago

Version: 2.6.2git-master

comment:4 by Michael Niedermayer, 9 years ago

IIUC url and alis have a different syntax, iam not sure where the alis syntax is documented but mov_read_dref() contains code to read it

comment:5 by MoMo, 6 years ago

Just chiming in that I'm able to reproduce this with FFmpeg 3.4.1 and Black Magic Media Express 3.5

Note: See TracTickets for help on using tickets.