[FFmpeg-user] Change container/encoder used to create a file without re-encoding

Carlos M carlosmarc12 at gmail.com
Sun Jun 2 22:42:52 EEST 2019


Hello Carl, thanks for your answers and time.

My answer are inline.

Thanks in advance

El dom., 2 de jun. de 2019 a la(s) 15:26, Carl Eugen Hoyos (
ceffmpeg at gmail.com) escribió:

> Am Sa., 1. Juni 2019 um 21:58 Uhr schrieb Carlos M <carlosmarc12 at gmail.com
> >:
>
> > What I'm trying is to get several videos that were remuxed, to it's
> > original state, with the same original metadata/headers. But i only have
> > one of those videos in original were i can get the original
> metadata/header
> > information.
>
> If your question is "Is FFmpeg an archiving tool like zip, 7z or tar?", the
> answer is "no" - for real-world cases, you cannot get the "video in
> original"
> back.
>

> > The format profile of the original video is "Base Media / Version 2" and
> > the format profile of the remuxed ones is "Base Media". I saw that i can
> > remuxed them again and get "Base Media / Version 2" passing the switch
> > "-brand mp42". But i'm still have other metadata difference.
>
> I don't think FFmpeg supports writing "Base Media / Version 2", only
> "Base Media" is supported.
>

Well if i run ffmpeg with "-brand mp42"
*ffmpeg -i input.mp4 -c copy -brand mp42 output.mp4*

MediaInfo show this on the General Information


*Format                                   : MPEG-4Format
profile                           : Base Media / Version 2Codec
ID                                 : mp42 (isom/iso2/avc1/mp41)*

If i run it without "-brand mp42" i get

*ffmpeg -i input.mp4 -c copy output.mp4*
MediaInfo show this on the General Information


*Format                                   : MPEG-4Format
profile                           : Base MediaCodec
ID                                 : isom (isom/iso2/avc1/mp41)*

So at least the Format Profile is wrtting like Base Media / Version 2 by
ffmpeg, although know i understand that could be an error if ffmpeg doesn't
support that.


> > To make the question simple what i want to do is
> > 1) Remove the metadata "Writing application" that is being added when
> using
> > FFMPEG.
>

Do you know what's the option to avoid the "Writing application" metadata
header?


> > 2) Add the metadata fields "Tagged date", "TIM", "TSC" and "TSZ". I tried
> > for example with
> > -metadata -tsc="1001"
> > and
> > -metadata -TSC=1001"
> > but it doesn't seem to work.
>
> "It doesn't seem to work" is usually not a helpful problem description.
>

If i run for example

*ffmpeg -i input.mp4 -c copy -metadata creation_time="2016-06-02 12:00:00"
-metadata TSC="1001" -brand mp42 output.mp4*

*or**ffmpeg -i input.mp4 -c copy -metadata creation_time="2016-06-02
12:00:00" -metadata Tsc="1001" -brand mp42 output.mp4*

MediaInfo show this on the General Information on both cases.








*Format                                   : MPEG-4Format
profile                           : Base Media / Version 2Codec
ID                                 : mp42 (isom/iso2/avc1/mp41)File
size                                : 261
MiBDuration                                 : 1 min 12 sOverall bit rate
mode                    : VariableOverall bit rate
: 30.2 Mb/sEncoded date                             : UTC 2013-06-21
15:00:00Tagged date                              : UTC 2013-06-21 15:00:00*

So the metadata creation_time is working (encoded date/tagged date), but i
can' get the header TSC to be added.

Do you know how can i do that?


> 3) When using ffmpeg i see on the video stream that a "GOP" format setting
> > is added, not sure if i can be disabled.
>
> I don't understand this sentence (likely command line
> and complete, uncut console output missing).
>

No matter what file i generate through ffmpeg i get on the video stream the
information "Format settings, GOP: M=3, N=23".








*VideoID                                       :
1Format                                   :
AVCFormat/Info                              : Advanced Video CodecFormat
profile                           : High at L5.1Format settings,
CABAC                   : YesFormat settings, ReFrames                : 3
framesFormat settings, GOP                     : M=3, N=23*

This setting is not added through other programs, so the question was if i
can disable that.


>
> > By the way i'm gathering the video information with MediaInfo.
>
> That's unrelated (and re-reading your mail, I have a strong feeling that
> using MediaInfo is bad in your case because it makes you making
> wrong assumptions like that you can force FFmpeg to wring "Base
> Media / Version 2" files which you cannot).
>
> Consider to describe your actual use-case, not what you believe the
> technical description of your use case is.
> (Ask "Why why does my media player XYZ not show the video?"
> instead of "How can I write Base Media Version 2 files?")
>

My actual use-case is that i'm trying to get the remuxed videos more
similar to the original ones (with the same metadata/header) that were
mp42. It's not a video player problem.


More information about the ffmpeg-user mailing list