h264 MP4

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

h264 MP4

Post by vijm1972 »

Hi Steipal,

I am trying to create h264MP4 with constant A/V bitrate, but my output is always variable. I have tried both the custom FFMPEG and Encoder MP4 options.

I am using below FFMPEG command.

-c:v libx264 -s 640x480 -aspect 4:3 -b:v 512000 -minrate 512000 -maxrate 512000 -bufsize 512000 -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 -movflags +faststart -vprofile main -vlevel 4.1 -q:a 0 -c:a aac -b:a 128000 -ar 48000 -ac 2

My output is as per below screenshot.
ProxyInfo.jpg
ProxyInfo.jpg (70.04 KiB) Viewed 15613 times
Every file has different A/V bitrate.

Please suggest if there is any option to create constant A/V bitrate.

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

Re: h264 MP4

Post by admin »

Is this an example that works when using ffmpeg command line but not when using the "Custom FFmpeg"-encoder in FFAStrans?

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

Re: h264 MP4

Post by vijm1972 »

I have tried both ways, output was same. If I removed -q:a 0 then I will get audio bit rate around 126 Kbps.
vijm1972
Posts: 128
Joined: Fri Apr 24, 2015 7:35 am

Re: h264 MP4

Post by vijm1972 »

Is it possible to enable libfdk_aac encoder in FFMPEG and try the audio bitrate?

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

Re: h264 MP4

Post by admin »

You can enable libfdk_aac by compiling your own ffmpeg that does not comply to the GPL licence. The FFAStrans (Zeranoe) version of ffmpeg is GPL compliant so you have to replace that with your own version.

https://trac.ffmpeg.org/wiki/Encode/AAC

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

Re: h264 MP4

Post by vijm1972 »

Please let me know how can I enabled libfdk_aac in ffmpeg?

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

Re: h264 MP4

Post by admin »

Vijay, please try and stick to questions that is directly related to FFAStrans. How to compile ffmpeg is not for this forum and there are other sites much more suited for this.

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

Re: h264 MP4

Post by vijm1972 »

Hi Steipal,

I have created workflow in which I am making two streams m4v and m4a using mxf source. I need to merge them again in same workflow to mp4 output. Please suggest how to monitor m4v and m4a files to create mp4?

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

Re: h264 MP4

Post by admin »

You can do this by monitoring *.m4v files and add a custom ffmpeg preset:

-i "%s_original_path%\%s_original_name%.m4a" -c:v -copy -c:a copy

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

Re: h264 MP4

Post by vijm1972 »

Not able to process.

What I am trying do is using two FFMPEG wanted to transcode the final output.
For above mentioned issue (Bitrate Variation) I had tried transcoding on another FFMPEG using command line option through which I am able to get proper audio bitrate but my video bitrate in variable. Through FFAStrans FFMPEG I am able to get proper video bitrate but audio bitrate is variable. I am trying to use both the FFMPEG using FFASTrans and trying to merge the final output with proper bitrate.

Using FFAStrans default FFMPEG I am creating two streams (m4a and m4v), m4v is proper as per my requirement but m4a is having audio bit rate issue. Now I am trying to use another FFMPEG using Others-Command Executor option and correct the audio bitrate and merge both the streams to create final MP4 out.

Please suggest if this can be done? If possible please let me know how can I use another FFMPEG?

Thanks
Vijay
Post Reply