Page 2 of 3

Re: How to keep ascpect ratio 16:9

Posted: Wed Apr 29, 2015 1:11 pm
by vijm1972
Steipal wanted to know how can I add audio streams in output. My source file have one video and 4 audio streams and I want same in output.

I am using custom FFMPEG encoder and my command is

-c:v prores -profile:v 3 -qscale:v 1 -s 720x576 -r 25 -aspect 4:3 -vb 50000000 -c:a copy -map 0:0 -map 0:1 -map 0:2 -map 0:3 -map 0:4

With this command I am getting error "Invalid File! Could not process" but if I use below command I able to transcode the file with only one audio stream.

-c:v prores -profile:v 3 -qscale:v 1 -s 720x576 -r 25 -aspect 4:3 -vb 50000000 -c:a copy

Re: How to keep ascpect ratio 16:9

Posted: Thu Apr 30, 2015 7:34 am
by admin
That is probably because you're using the "A/V Media"-decoder which ALWAYS returns 32 channel on stream 0.1. Either you must insert the "Channel Mapper"-filter and set output to 4 channels or remove the "A/V Media"-decoder and filters all together. Problem then is that IF you want to transcode files that don't have the channel layout; 1 video stream and 4 audio streams, your workflow will fail. Using the "A/V Media"-decoder ensures your encoder are fed with consistent content and you can use this command line: "-c:v prores -profile:v 3 -qscale:v 1 -s 720x576 -r 25 -aspect 4:3 -vb 50000000 -c:a copy"

The problem with "A/V Media"-decoder is that it returns an AviSynth-script which cannot output audio channels into separate streams. It's a problem I'm trying to solve.

P.S. In the future, can you please make a new forum topic for new issues? It will benefit everyone on the forum looking for help ;)

-steipal

Re: How to keep ascpect ratio 16:9

Posted: Thu Apr 30, 2015 8:17 am
by vijm1972
Steipal thanks for your reply.

"Channel Mapper"-filter only adds 4 channels to the one audio stream not 4 separate audio streams.
After removing "Channel Mapper"-filter and A/V media decoder with command you provided I am still getting only one audio stream. I have used below command and disabled "Channel Mapper"-filter and A/V media decoder, it's worked properly.
-c:v prores -profile:v 3 -qscale:v 1 -s 720x576 -r 25 -aspect 4:3 -vb 50000000 -c:a copy -map 0:0 -map 0:1 -map 0:2 -map 0:3 -map 0:4

Sure next time I will start new issue on new forum topic.

Re: How to keep ascpect ratio 16:9

Posted: Thu Apr 30, 2015 10:03 am
by admin
Both your commands work but under different setups:

Workflow with "A/V Media" and "ChannelMapper" set to 4 channels:
-c:v prores -profile:v 3 -qscale:v 1 -s 720x576 -r 25 -aspect 4:3 -vb 50000000 -c:a copy

Workflows without "A/V Media" and "ChannelMapper":
-c:v prores -profile:v 3 -qscale:v 1 -s 720x576 -r 25 -aspect 4:3 -vb 50000000 -c:a copy -map 0:0 -map 0:1 -map 0:2 -map 0:3 -map 0:4

If you need the "A/V Media"-decoder and 4 separate streams then your correct command should be:
-c:v prores -profile:v 3 -qscale:v 1 -s 720x576 -r 25 -aspect 4:3 -vb 50000000 -map 0:0 -map 0:1 -map_channel 0.1.0:0.1 -map 0:1 -map_channel 0.1.1:0.2 -map 0:1 -map_channel 0.1.2:0.3 -map 0:1 -map_channel 0.1.3:0.4 -c:a pcm_s16le

-steipal

Re: How to keep ascpect ratio 16:9

Posted: Thu Apr 30, 2015 11:02 am
by vijm1972
1) Workflow with "A/V Media" and "ChannelMapper" set to 4 channels:
-c:v prores -profile:v 3 -qscale:v 1 -s 720x576 -r 25 -aspect 4:3 -vb 50000000 -c:a copy

Does that means it will create 4 separate streams or with 4 source audio streams it will create 1 streams with 4 channels?

Re: How to keep ascpect ratio 16:9

Posted: Thu Apr 30, 2015 11:32 am
by admin
The "AudioChannel"-filter it will mux 4 audio channels (if that's your setting) into one stream. Subsequently, if you have no mapping in you ffmpeg command line and only do a "-c:a copy" parameter, you will end up with the same 4 audio channels muxed into one stream. So, in order to route those 4 channels to 4 separate streams you need the extended command line in my example.

-c:v prores -profile:v 3 -qscale:v 1 -s 720x576 -r 25 -aspect 4:3 -vb 50000000 -map 0:0 -map 0:1 -map_channel 0.1.0:0.1 -map 0:1 -map_channel 0.1.1:0.2 -map 0:1 -map_channel 0.1.2:0.3 -map 0:1 -map_channel 0.1.3:0.4 -c:a pcm_s16le

-steipal

Re: How to keep ascpect ratio 16:9

Posted: Thu Apr 30, 2015 2:19 pm
by vijm1972
Thanks...

Re: How to keep ascpect ratio 16:9

Posted: Mon Nov 16, 2015 7:40 am
by mkobzar
steipal wrote:I've found the bug: Your ffmpeg-parameters are not valid. There is no such thing as "wmv8" or "wma2" encoders. The correct should command line should be:

-vcodec wmv2 -qscale 4 -s 352x288 -r 25 -aspect 16:9 -acodec wmav2 -ab 96k -ac 2 -ar 44000 -async 1 -vsync 1 -scodec copy

Please consult the latest version of ffmpeg on correct usage. http://www.ffmpeg.org/documentation.html

-steipal
Hello, I use you'r wonderful software.
I use scheme
Image
It's work fine, but I need aspect 16x9 on exit.

Thanks!

Re: How to keep ascpect ratio 16:9

Posted: Mon Nov 16, 2015 9:08 am
by admin
Hi mkobzar,

In order to help I need to know what your "Resize" and "MP4" settings are.
Currently there are no way of setting aspect in the "MP4" encoder but it tries to be intelligent about it. If the original is 16:9, it should set the 16:9 flag. On the other hand, the "MP4"-encoder need a bit of rewamping because it's "too basic" so most people end up using a "Custom FFmpeg"-encoder to meet their needs.
A more advanced "MP4" encoder will hopefully (if I have time) be available within a few versions of FFAStrans.

-steipal

Re: How to keep ascpect ratio 16:9

Posted: Tue Nov 17, 2015 6:18 am
by mkobzar
Ok, I use resize. Set up it 786x576 pixels, but picture still square, not wide.
What sequence is true? folder-avmedia-resize-watermark-mp4-folder
This is my setup
Image
Image
Image