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 » Tue Jul 26, 2016 6:55 am

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 2763 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 2763 times

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

Regards,
Vijay

admin
Site Admin
Posts: 1303
Joined: Sat Feb 08, 2014 10:39 pm

Re: Transcoded MP4 Duration Not Matching with Source Duration

Post by admin » Tue Jul 26, 2016 8:15 am

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 » Wed Jul 27, 2016 5:07 am

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 » Thu Jul 28, 2016 1:10 pm

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