Skip to content

Commit

Permalink
[muxerMp4] Optimize output for streaming on Windows too
Browse files Browse the repository at this point in the history
  • Loading branch information
eumagga0x2a committed Apr 16, 2019
1 parent c8c05ee commit ffc1459
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
3 changes: 1 addition & 2 deletions avidemux_plugins/ADM_muxers/muxerMp4/muxerMP4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,9 @@ bool muxerMP4::open(const char *file, ADM_videoStream *s,uint32_t nbAudioTrack,A
snprintf(buf, sizeof(buf), "%d", AV_TIME_BASE / 10);
av_dict_set(&dict, "preload", buf, 0);
av_dict_set(&dict, "max_delay", "200000", 0);
#if !defined(_WIN32) || defined(_MSC_VER) // does not work on windows as the file must be opened twice at the same time
if(muxerConfig.faststart)
av_dict_set(&dict, "movflags","faststart",0);
#endif

const char *angle=NULL;
switch(muxerConfig.rotation)
{
Expand Down
12 changes: 2 additions & 10 deletions avidemux_plugins/ADM_muxers/muxerMp4/muxerMP4Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,7 @@ bool mp4Configure(void)
bool force=muxerConfig.forceAspectRatio;
diaMenuEntry format[]={{MP4_MUXER_MP4,"MP4"},{MP4_MUXER_PSP,"PSP"}};
diaElemMenu menuFormat(&fmt,QT_TRANSLATE_NOOP("mp4muxer","Muxing Format"),2,format,"");
#if !defined(_WIN32) || defined(_MSC_VER)
diaElemToggle faststart(&fast,QT_TRANSLATE_NOOP("mp4muxer","Move index to the beginning of the file"));
const uint32_t nbTabs=5;
#else
const uint32_t nbTabs=4;
#endif
diaElemToggle forceAR(&force,QT_TRANSLATE_NOOP("mp4muxer","Force aspect ratio"));
diaMenuEntry aspect[]={{STANDARD,"4:3"},{WIDE,"16:9"},{UNI,"18:9"},{CINEMA,"64:27"}};
diaElemMenu menuAspect(&dar,QT_TRANSLATE_NOOP("mp4muxer","Aspect Ratio (DAR)"),4,aspect,"");
Expand All @@ -44,12 +39,9 @@ bool mp4Configure(void)
{MP4_MUXER_ROTATE_270,QT_TRANSLATE_NOOP("mp4muxer","270°")}
};
diaElemMenu menuRotation(&rot,QT_TRANSLATE_NOOP("mp4muxer","Rotate video"),4,rotation,"");
#if !defined(_WIN32) || defined(_MSC_VER)
diaElem *tabs[]={&menuFormat,&faststart,&forceAR,&menuAspect,&menuRotation};
#else
diaElem *tabs[]={&menuFormat,&forceAR,&menuAspect,&menuRotation};
#endif
if( diaFactoryRun(QT_TRANSLATE_NOOP("mp4muxer","MP4 Muxer"),nbTabs,tabs))

if( diaFactoryRun(QT_TRANSLATE_NOOP("mp4muxer","MP4 Muxer"),5,tabs))
{
muxerConfig.muxerType=(MP4_MUXER_TYPE)fmt;
muxerConfig.faststart=fast;
Expand Down

0 comments on commit ffc1459

Please sign in to comment.