Transcoded MP4 Duration Not Matching with Source Duration

Questions and answers on how to get the most out of FFAStrans
Post Reply
vijm1972
Posts: 128
Joined: Fri Apr 24, 2015 7:35 am

Transcoded MP4 Duration Not Matching with Source Duration

Post by vijm1972 »

Hi Steipal,

I am transcoding MXF file to MP4 using command line option, after transcoding I am getting some extra frames in MP4 audio track. I am using below command for transcoding.

ffmpeg.exe -i Test.mxf -c:v libx264 -preset veryslow -crf 18 -s 640x360 -aspect 16:9 -b:v 650000 -minrate 650000 -maxrate 650000 -bufsize 300000 -pix_fmt yuv420p -coder 1 -flags +loop -cmp chroma -partitions +parti8x8+parti4x4+partp8x8+partb8x8 -me_method 4 -subq 6 -me_range 16 -g 15 -keyint_min 1 -bf 0 -intra -refs 4 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -direct-pred 1 -fast-pskip 1 -vprofile main -vlevel 4.1 -movflags +faststart -c:a aac -ar 48000 -b:a 128000 -ac 2 Test.mp4

Please find attached screen shot for your reference.
AAC Audio Duration Issue.jpg
AAC Audio Duration Issue.jpg (172.06 KiB) Viewed 7739 times
I have also checked in encoders MP4 option but output is same.

When we play these MP4 files in FCP or Adobe we doesn't observed any issue but when we play them in switch or HTML player we are getting extra frames at the end. Media info also showing extra frames in audio stream.

Please find attached screen shot of Switch player for your reference.

1.jpg
1.jpg (58.87 KiB) Viewed 7739 times

Extra frames at the end.
2.jpg
2.jpg (236.19 KiB) Viewed 7739 times
Can you please suggest if this is an aac codec behavior or some other issue is there.

Regards,
Vijay
admin
Site Admin
Posts: 1687
Joined: Sat Feb 08, 2014 10:39 pm

Re: Transcoded MP4 Duration Not Matching with Source Duration

Post by admin »

Hi Vijay,

Is this issue only apparent when using FFAStrans?

-steinar
vijm1972
Posts: 128
Joined: Fri Apr 24, 2015 7:35 am

Re: Transcoded MP4 Duration Not Matching with Source Duration

Post by vijm1972 »

No it's happening while using command line too.

Vijay
donkpow
Posts: 4
Joined: Mon Jul 25, 2016 11:40 pm

Re: Transcoded MP4 Duration Not Matching with Source Duration

Post by donkpow »

It's just my opinion but you may want to set fps and use -vsync in that command line. That should access time base during encode.
Post Reply