mp4 like Adobe premiere result

Questions and answers on how to get the most out of FFAStrans
User avatar
Wahyu
Posts: 49
Joined: Sun Nov 15, 2020 12:27 am

mp4 like Adobe premiere result

Post by Wahyu »

Hello All,

I compared the results of h264 in Premiere with FFAStrans. I found a difference like the picture below.
If I look through ffprobe, the file from premiere is "encoder : AVC Coding" while the result of FFAStrans is "encoder : lavf58.65.101" I think maybe the metadata "encoder" I can write myself.
what I want to ask, how can I make an mp4 file like the results of mp4 premiere? I've tried the ffmpeg command executor to generate it, but still can't be the same as premiere results. what codec does premiere use for its h264 media export option?



best regards,

Wahyu
Attachments
MP4 Compare.png
MP4 Compare.png (71.43 KiB) Viewed 5376 times
User avatar
FranceBB
Posts: 230
Joined: Sat Jun 25, 2016 3:43 pm
Contact:

Re: mp4 like Adobe premiere result

Post by FranceBB »

x264 cannot produce completely interlaced TFF or BFF videos (also known as PAFF), it can only encode interlaced stuff as MBAFF.
Even if you specify --tff or --bff, it will always end up in MBAFF, but it's not a problem, it will be handled by most decoders anyway.
The difference between PAFF (so totally interlaced) and MBAFF (interlaced when needed) is that in MBAFF macroblocks with differences in fields are encoded as interlaced, those without any difference are encoded as progressive, therefore MBAFF is a slightly more efficient way to encode interlaced materials.
Last edited by FranceBB on Fri Aug 13, 2021 9:21 am, edited 1 time in total.
User avatar
Wahyu
Posts: 49
Joined: Sun Nov 15, 2020 12:27 am

Re: mp4 like Adobe premiere result

Post by Wahyu »

Thanks for your help, but i don't know why the playout can't play file ts from FFAStrans, if i use Adobe premiere result playout its ok play.
emcodem
Posts: 1631
Joined: Wed Sep 19, 2018 8:11 am

Re: mp4 like Adobe premiere result

Post by emcodem »

Hmmm it is not 100% guaranteed but possible that the mbaff stuff is your problem. It would be best if you could upload a short example of your working files.

Thanks!
emcodem, wrapping since 2009 you got the rhyme?
User avatar
FranceBB
Posts: 230
Joined: Sat Jun 25, 2016 3:43 pm
Contact:

Re: mp4 like Adobe premiere result

Post by FranceBB »

Wahyu wrote: Tue Aug 03, 2021 12:11 am Thanks for your help, but i don't know why the playout can't play file ts from FFAStrans, if i use Adobe premiere result playout its ok play.
Uhm... MBAFF could be the reason, however since you're sending the file to a playout port, I'm much more concerned about keyframes and the GOP. By default, x264 sets keyframe to like 240 if I remember correctly instead of being equal to the framerate. This can of course cause some issues.
Can you please try with:

Code: Select all

--min-keyint 1 --keyint 25
If it doesn't solve the issue, please share a sample as emcodem suggested and we'll take a deep look at it.
User avatar
Wahyu
Posts: 49
Joined: Sun Nov 15, 2020 12:27 am

Re: mp4 like Adobe premiere result

Post by Wahyu »

I've tried and it doesn't work either.
Because I'm using NVIDIA Graphics, I tried the h264_nvenc codec but it still doesn't work.
in the picture the results of the h264 enc are used as TS with mp2 audio to play in playout.
Attachments
Create_TS.json
(5.66 KiB) Downloaded 170 times
CreateTS.jpg
CreateTS.jpg (55.8 KiB) Viewed 5169 times
User avatar
FranceBB
Posts: 230
Joined: Sat Jun 25, 2016 3:43 pm
Contact:

Re: mp4 like Adobe premiere result

Post by FranceBB »

Ok, so it wasn't the GOP either... Uhm... Can you send me a short sample (even color bars is fine) exported from Premiere with the settings that work with your playout system?
I'll try to reproduce it as closely as I can and send the settings back to you for some tests. I'm kinda curious and I refuse to think that it's MBAFF causing the problem with x264...
Besides, are you using ffmpeg to mux in .ts?
Perhaps using TSMuxer will make things better?
User avatar
Wahyu
Posts: 49
Joined: Sun Nov 15, 2020 12:27 am

Re: mp4 like Adobe premiere result

Post by Wahyu »

basically i need ts file by using h.264 video codec and mp2 audio. I really appreciate the FFAStrans 1.2 update to 1.2.1 because I found the ts wrapper on h.264, but I can't try it because it can't convert the audio to MP2, that's why I added custom ffmpeg to convert the audio to mp2, dual language and to TS.
I sent 2 files.. the first file is the premiere mp4+AAC file. the second file comes from the mp4+AAC file from premiere, changed to TS with custom ffmpeg according to the picture above.

1. https://www.dropbox.com/s/vbdkheqw6kb9c ... E.mp4?dl=0
2. https://www.dropbox.com/s/tfs1zowkjunn5 ... S.mpg?dl=0

thanks for helping me in analyzing this.
User avatar
FranceBB
Posts: 230
Joined: Sat Jun 25, 2016 3:43 pm
Contact:

Re: mp4 like Adobe premiere result

Post by FranceBB »

Sorry for the late reply but I'm in paid leave for two more weeks.
(paid leave from my real job I mean ehehehehhe)
Anyway, a few things:
Wahyu wrote: Fri Aug 13, 2021 11:34 am I really appreciate the FFAStrans 1.2 update to 1.2.1 because I found the ts wrapper on h.264, but I can't try it because it can't convert the audio to MP2
I will modify the x264 encoding node to add MP2 support within the .ts container when I get back to the office. I don't really think there are gonna be any problems with that and it's likely Grandmaster will approve my commit, but I don't know whether this will be included in 1.2.2 or if you'll have to wait to 1.3.0 as we haven't discussed it internally yet.

Wahyu wrote: Fri Aug 13, 2021 11:34 am I sent 2 files.. the first file is the premiere mp4+AAC file. the second file comes from the mp4+AAC file from premiere, changed to TS with custom ffmpeg according to the picture above.
Ok, so, the first one is the one from Premiere, but in order to send it to the playout you gotta remux it to .ts and re-encode the audio to MP2, right?

Just to be absolutely clear and on the same page:

- If you get the H.264 + AAC MP4 from Premiere, re-encode the audio to MP2 with FFMpeg and remux it to .TS with FFMpeg and then you send it to the Playout, it works

- If you encode in H.264 + MP2 .ts with x264 + FFMpeg directly and you send it to the playout, it doesn't work

Right?

If that's the case, I'll send you a few samples to try on your playout system; if they won't work, then I'll give up (but hopefully they will)
User avatar
Wahyu
Posts: 49
Joined: Sun Nov 15, 2020 12:27 am

Re: mp4 like Adobe premiere result

Post by Wahyu »

FranceBB wrote: Mon Aug 16, 2021 3:26 pm I will modify the x264 encoding node to add MP2 support within the .ts container when I get back to the office. I don't really think there are gonna be any problems with that and it's likely Grandmaster will approve my commit, but I don't know whether this will be included in 1.2.2 or if you'll have to wait to 1.3.0 as we haven't discussed it internally yet.
I hope, I hear good news.. :D
FranceBB wrote: Mon Aug 16, 2021 3:26 pm Ok, so, the first one is the one from Premiere, but in order to send it to the playout you gotta remux it to .ts and re-encode the audio to MP2, right?
yes, right..
FranceBB wrote: Mon Aug 16, 2021 3:26 pm Just to be absolutely clear and on the same page:

- If you get the H.264 + AAC MP4 from Premiere, re-encode the audio to MP2 with FFMpeg and remux it to .TS with FFMpeg and then you send it to the Playout, it works

- If you encode in H.264 + MP2 .ts with x264 + FFMpeg directly and you send it to the playout, it doesn't work

Right?

If that's the case, I'll send you a few samples to try on your playout system; if they won't work, then I'll give up (but hopefully they will)
yes, all right. I hopefully they will :roll:
Post Reply