mlsmithjr / transcoder

Python wrapper for ffmpeg for batch and/or concurrent transcoding
GNU General Public License v3.0
117 stars 27 forks source link

automap: no is not evaluated #5

Closed cbu27 closed 5 years ago

cbu27 commented 5 years ago

I try to build a config with "automap: no" respectively "automap: False" but in the resulting ffmpeg command there is a "-map 0".

My Config-Options:

  facebook:
      include: common
      automap: False
      output_options:
          - "-movflags +faststart"
          - "-vcodec libx264"
          - "-pix_fmt yuv420p"
          - "-preset:v slow"
          - "-profile:v main"
          - "-level 3.1"
          - "-crf 20"
          - "-coder 1"
          - "-flags +loop"
          - "-aspect 16:9"
          - "-r 25"
          - "-force_key_frames expr:gte(t,n_forced*4)"
          - "-vf movie=/tmp/sr_38.png[watermark];[in]yadif=0:0:0[deinterlaced];[deinterlaced]scale=size=1024x576:flags=lanczos:interl=0[scaled];[scaled][watermark]overlay=65:38[out]"
          - "-f mp4"
          - "-filter_complex [0:1]aformat=sample_fmts=fltp:sample_rates=48000:channel_layouts=mono[a1];[0:2]aformat=sample_fmts=fltp:sample_rates=48000:channel_layouts=mono[a2];[a1][a2]amerge=inputs=2,pan=stereo|c0<c0|c1<c1[aout]"
          - "-map 0:0"
          - "-map [aout]"
          - "-acodec libfdk_aac"
          - "-strict -2"
          - "-b:a 192k"
          - "-ac 2"
          - "-ar 48000"

The resulting command is: /root/bin/ffmpeg -y -i /data/requests/XXX.mxf -movflags +faststart -vcodec libx264 -pix_fmt yuv420p -preset:v slow -profile:v main -level 3.1 -crf 20 -coder 1 -flags +loop -aspect 16:9 -r 25 -force_key_frames expr:gte(t,n_forced*4) -vf movie=/tmp/sr_38.png[watermark];[in]yadif=0:0:0[deinterlaced];[deinterlaced]scale=size=1024x576:flags=lanczos:interl=0[scaled];[scaled][watermark]overlay=65:38[out] -f mp4 -filter_complex [0:1]aformat=sample_fmts=fltp:sample_rates=48000:channel_layouts=mono[a1];[0:2]aformat=sample_fmts=fltp:sample_rates=48000:channel_layouts=mono[a2];[a1][a2]amerge=inputs=2,pan=stereo|c0<c0|c1<c1[aout] -map 0:0 -map [aout] -acodec libfdk_aac -strict -2 -b:a 192k -ac 2 -ar 48000 -map 0 /data/requests/xxx.mp4.tmp

I think the last "-map 0" is too much.

Thank you.

mlsmithjr commented 5 years ago

Yep, found the problem. Will post the fix before end of day today.

Thank you!

On Thu, Jul 25, 2019 at 7:21 AM cbu27 notifications@github.com wrote:

I try to build a config with "automap: no" respectively "automap: False" but in the resulting ffmpeg command there is a "-map 0".

My Config-Options:

facebook: include: common automap: False output_options:

  • "-movflags +faststart"
  • "-vcodec libx264"
  • "-pix_fmt yuv420p"
  • "-preset:v slow"
  • "-profile:v main"
  • "-level 3.1"
  • "-crf 20"
  • "-coder 1"
  • "-flags +loop"
  • "-aspect 16:9"
  • "-r 25"
  • "-force_key_frames expr:gte(t,n_forced*4)"
  • "-vf movie=/tmp/sr_38.png[watermark];[in]yadif=0:0:0[deinterlaced];[deinterlaced]scale=size=1024x576:flags=lanczos:interl=0[scaled];[scaled][watermark]overlay=65:38[out]"
  • "-f mp4"
  • "-filter_complex [0:1]aformat=sample_fmts=fltp:sample_rates=48000:channel_layouts=mono[a1];[0:2]aformat=sample_fmts=fltp:sample_rates=48000:channel_layouts=mono[a2];[a1][a2]amerge=inputs=2,pan=stereo|c0<c0|c1<c1[aout]"
  • "-map 0:0"
  • "-map [aout]"
  • "-acodec libfdk_aac"
  • "-strict -2"
  • "-b:a 192k"
  • "-ac 2"
  • "-ar 48000"

The resulting command is: /root/bin/ffmpeg -y -i /data/requests/XXX.mxf -movflags +faststart -vcodec libx264 -pix_fmt yuv420p -preset:v slow -profile:v main -level 3.1 -crf 20 -coder 1 -flags +loop -aspect 16:9 -r 25 -force_key_frames expr:gte(t,n_forced*4) -vf movie=/tmp/sr_38.png[watermark];[in]yadif=0:0:0[deinterlaced];[deinterlaced]scale=size=1024x576:flags=lanczos:interl=0[scaled];[scaled][watermark]overlay=65:38[out] -f mp4 -filter_complex [0:1]aformat=sample_fmts=fltp:sample_rates=48000:channel_layouts=mono[a1];[0:2]aformat=sample_fmts=fltp:sample_rates=48000:channel_layouts=mono[a2];[a1][a2]amerge=inputs=2,pan=stereo|c0<c0|c1<c1[aout] -map 0:0 -map [aout] -acodec libfdk_aac -strict -2 -b:a 192k -ac 2 -ar 48000 -map 0 /data/requests/xxx.mp4.tmp

I think the last "-map 0" is too much.

Thank you.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mlsmithjr/transcoder/issues/5?email_source=notifications&email_token=AAHRMTF4IUQWXWS2YWJ4SYDQBGEEHA5CNFSM4IGZTLOKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HBOQF4Q, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHRMTFA62LGGWRUYDMPRBTQBGEEHANCNFSM4IGZTLOA .

cbu27 commented 5 years ago

Thank you. Works as exptected now.