[FFmpeg-user] Remuxing Into "aivx" MOV
Vincent Olivier
vincent at up4.com
Wed Mar 12 15:46:50 CET 2014
OK. Thanks! I’ll investigate further.
On Mar 12, 2014, at 10:27 AM, Bryce McLeod <bryce.mcleod at codory.com> wrote:
> Hi Vincent,
> I'm afraid I don't know why you are getting a weird avg_frame_rate, I
> just tried remuxing a 24fps video (not xavc) using ffmpeg and
> -video_track_timescale of 24000, ffprobe reports the output as having an
> avg_frame_rate=24/1
>
> Regards
>
>
> On Wed, Mar 12, 2014 at 1:46 PM, Vincent Olivier <vincent at up4.com> wrote:
>
>> Hi Bryce,
>>
>> Thanks! It works with: av_opt_set_int(ofmt_ctx->priv_data,
>> "video_track_timescale", in_stream->time_base.den, 0);
>>
>> But: the FCPX-remuxed file (my reference) has a time_base.den 1000 times
>> the value of the original (1/24000). If I set that value for the
>> "video_track_timescale", I get weird values for the avg_frame_rate equals
>> to 24.01FPS). Is there a way to avoid that? For now I'll leave it at that
>> because it seems a definite progress over what I was getting before, but
>> I'm just curious.
>>
>> Thanks!
>>
>> Vincent
>>
>> On Mar 12, 2014, at 9:04 AM, Bryce McLeod <bryce.mcleod at codory.com> wrote:
>>
>>> For 1) you can stop the mov muxer changing the time base by using its
>>> -video_track_timescale option, eg for 24fps content:
>>>
>>> ffmpeg -i in.mxf -vcodec copy -acodec copy -f mov -video_track_timescale
>> 24
>>> out.mov
>>>
>>> Regards
>>>
>>> On Wed, Mar 12, 2014 at 12:53 PM, Vincent Olivier <vincent at up4.com>
>> wrote:
>>>
>>>> Hi,
>>>>
>>>> Starting from Stefano Sabatini's remuxin.c, I'm trying to remux an XAVC
>>>> video stream (AVC/H.264 High 4:2:2 Intra 10-bit) from a MXF file into a
>> MOV
>>>> file made to look like the output of FCPX's own remuxing of the same
>> source
>>>> file (codec tag "aivx"). Specifically, using the ffprobe -show_data
>>>> -show_streams command. I can see that there are still a couple of
>> important
>>>> differences between what I can get with FFMPEG and the file produced by
>>>> FCPX (Final Cut Pro X 10.1). No matter what I try, it seems that the MOV
>>>> FFMPEG "format" remangles those values after I have specifically set
>> them.
>>>> Namely, all for the video stream:
>>>>
>>>> 1) time_base: I'm setting 1/24000 and I'm getting 1/12288
>>>>
>>>> 2) extradata: here, I'm getting something mangled beyond recognition
>> after
>>>> explicitly setting the target metadata to the source metadata with this
>>>> code:
>>>>
>>>> out_stream->codec->extradata = in_stream->codec->extradata;
>>>> out_stream->codec->extradata_size =
>>>> in_stream->codec->extradata_size;
>>>>
>>>> The other values (avg_frame_rate, duration, duration_ts) all seem to be
>>>> calculated from the time_base, so I will stick to those two for now.
>> How to
>>>> deterministically set those values for a AVC/H.264 video stream to be
>> muxed
>>>> into a MOV file with FFMPEG?
>>>>
>>>> Thanks!
>>>>
>>>> Vincent
>>>>
>>>> Here is the FFMPEG version I'm using on Mac OS X 10.9.2:
>>>>
>>>> ffmpeg version 2.1.git-ffb7d71
>>>> built on Mar 4 2014 08:48:40 with Apple LLVM version 5.0
>> (clang-500.2.79)
>>>> (based on LLVM 3.3svn)
>>>> configuration: --prefix=/opt/local --enable-swscale --enable-avfilter
>>>> --enable-avresample --enable-libmp3lame --enable-libvorbis
>> --enable-libopus
>>>> --enable-libtheora --enable-libschroedinger --enable-libopenjpeg
>>>> --enable-libmodplug --enable-libvpx --enable-libspeex --enable-libass
>>>> --enable-libbluray --enable-gnutls --enable-fontconfig
>> --enable-libfreetype
>>>> --disable-indev=jack --disable-outdev=xv --mandir=/opt/local/share/man
>>>> --enable-shared --enable-pthreads --cc=/usr/bin/clang --arch=x86_64
>>>> --enable-yasm --enable-gpl --enable-postproc --enable-libx264
>>>> --enable-libxvid --enable-nonfree --enable-libfdk-aac --enable-libfaac
>>>> libavutil 52. 66.100 / 52. 66.100
>>>> libavcodec 55. 52.102 / 55. 52.102
>>>> libavformat 55. 33.100 / 55. 33.100
>>>> libavdevice 55. 10.100 / 55. 10.100
>>>> libavfilter 4. 2.100 / 4. 2.100
>>>> libavresample 1. 2. 0 / 1. 2. 0
>>>> libswscale 2. 5.101 / 2. 5.101
>>>> libswresample 0. 18.100 / 0. 18.100
>>>> libpostproc 52. 3.100 / 52. 3.100
>>>> _______________________________________________
>>>> ffmpeg-user mailing list
>>>> ffmpeg-user at ffmpeg.org
>>>> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>>>
>>>>
>>>
>>>
>>> --
>>> Bryce McLeod
>>> _______________________________________________
>>> ffmpeg-user mailing list
>>> ffmpeg-user at ffmpeg.org
>>> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>
>> _______________________________________________
>> ffmpeg-user mailing list
>> ffmpeg-user at ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>
>
>
>
> --
> Bryce McLeod
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
More information about the ffmpeg-user
mailing list