separate video and sound sources, frame sequences

Questions and answers on how to get the most out of FFAStrans
screenshaper
Posts: 16
Joined: Fri Oct 17, 2014 3:23 pm

separate video and sound sources, frame sequences

Post by screenshaper »

Do you have some suggestion about how to deal with separate video and sound input files?
Last edited by screenshaper on Sun Feb 22, 2015 11:48 am, edited 1 time in total.
admin
Site Admin
Posts: 1669
Joined: Sat Feb 08, 2014 10:39 pm

Re: separate video and sound sources

Post by admin »

Well, at the moment FFAStrans only support one file per input monitor but using the "Custom FFmpeg" you could potentially pick up multiple input files based on the initial source name.

Example: If you are monitoring a folder with separate audio and video with shared naming convention, you can monitor one of them, say video files called *.MXF. If the video is named C0001.MXF and audio tracks for the video are named C0001A01.WAV and C0001A02.WAV, your "Custom FFmpeg"-encoder would look something like this:

Audio codec:copy

Video codec: copy

FFmpeg options: -i "%original_path%\%original_name%A01.WAV" -i "%original_path%\%original_name%A02.WAV" -map 0:0.0:0 -map 1:0.0:1 -map 2:0.0:2 -c:v copy -c:a copy

Extension:MXF

Now you could, if you want to, output the muxed file to another workflow for filters etc

PS: I haven tried this particular case but should in theory work or at least get you going in the right direction.

Do you have any use case you'd like to share?

-steipal
screenshaper
Posts: 16
Joined: Fri Oct 17, 2014 3:23 pm

Frame sequences

Post by screenshaper »

The most common case of separate soundtrack I have to deal with, is when the media is delivered as .png or .jpeg framesequence and .wav or .aiff sound.

But this implies another question...
How to deal with frame sequence input on FFAStrans?
With ffmpeg it is as simple as -i filename%5d.png
admin
Site Admin
Posts: 1669
Joined: Sat Feb 08, 2014 10:39 pm

Re: separate video and sound sources, frame sequences

Post by admin »

Well, at the moment there is no sequence-decoder in FFAStrans but again you may try the "Custom FFmpeg"-encoder, using the source-variables in this example:
-i "%original_path%\%original_name%-%5d.png" -i "%original_path%\%original_name%-pngaudio.aiff" -map 1:0.0:0 -map 2:0.0:1

Note that the initial source will always be the first input (0:x). The above example should therefor disregard input 0:x and instead focus on the png sequence being 1:0 and the audio file being 2:0.

PS: Again, I haven tried this particular case and it may not suit your workflow but with some adaptation i think it might work. ;-) Please try it and let me know.

In the future there WILL be a sequence decoder in FFAStrans, just don't know when :?:

-steipal
screenshaper
Posts: 16
Joined: Fri Oct 17, 2014 3:23 pm

Re: separate video and sound sources, frame sequences

Post by screenshaper »

Sure I will try and report back!
I just don't understand which file shall trigger FFAStrans to start the job.
If I remember well, FFAStrans actually ignores .jpeg files.
But if FFAStrans should notice them, I'm afraid it will start a job for any frame. Devastating!
Or maybe FFAStrans is already aware of *%5d.* notation?
screenshaper
Posts: 16
Joined: Fri Oct 17, 2014 3:23 pm

Re: separate video and sound sources, frame sequences

Post by screenshaper »

Furthermore, I'd like suggest to implement a sequence encoder, too
admin
Site Admin
Posts: 1669
Joined: Sat Feb 08, 2014 10:39 pm

Re: separate video and sound sources, frame sequences

Post by admin »

Sequence encoding was implemented "long" ago. Look at the "Stills" encoder and theck the "Sequence" option. Set "Every n'th frame" to 1 and voila ;)

-steipal
admin
Site Admin
Posts: 1669
Joined: Sat Feb 08, 2014 10:39 pm

Re: separate video and sound sources, frame sequences

Post by admin »

Sorry, I did not notice that you had two posts so I just answered the last one.

In order for this kind of workflow to work you need a kind of receipt-file with the same naming convention as the actual image and audio files. The receipt-file could be anything and FFAStrans won't use it other than getting a name-variable to work with. FFAStrans does not ignore .jpeg per se but it WILL ignore zero-byte files. Also, FFAStrans does not know what *%5d.* mean and it doesn't need to either. Let me try an example:

d:\media\videoseq_0001.jpg
d:\media\videoseq_0002.jpg
d:\media\videoseq_0003.jpg
d:\media\videoseq_0004.jpg
d:\media\videoseq_0005.jpg
d:\media\videoseq_0006.jpg
d:\media\videoseq_0007.jpg
d:\media\videoseq_0008.jpg
d:\media\videoseq_0009.jpg
d:\media\videoseq_0010.jpg
d:\media\videoseq_0011.jpg
d:\media\videoseq_0012.jpg
.......
d:\media\videoseq_01.wav
d:\media\videoseq_02.wav
d:\media\videoseq.xml

What you need to do is monitor "solo"-files, or a "reciept"-file. In this case the videoseq.xml. Now FFAStrans will use the filename as basis for dealing with the still-images and the audio files with this "Custom FFmpeg" command:

-i "%original_path%\%original_name%-%5d.png" -i "%original_path%\%original_name%_01.wav" -i "%original_path%\%original_name%_02.wav" -map 1:0.0:0 -map 2:0.0:1 -map 3:0.0:2

...which FFAStrans would translate to:

-i "d:\media\videoseq_%4d.jpg" -i "d:\media\videoseq_01.wav" -i "d:\media\videoseq_02.wav" -map 1:0.0:0 -map 2:0.0:1 -map 3:0.0:2

Now, I don't know what kind of system delivers these files or how they're presented on your hd/unc but either way you need to monitor for that reciept-file in order for this to work. Maybe you actually need to create that reciept-file yourself. You may also monitor *_02.wav files if they're the last files being written by the system that delivers these files. But you can't monitor .jpg files because you probably never know that the last number in the sequence will be. If you do, FFAStans will as you rightfully pointed out, start a job for any frame.

I will try to create an exact workflow example and send you a package containing both media files and a workflow you can use as a template.

-steipal
admin
Site Admin
Posts: 1669
Joined: Sat Feb 08, 2014 10:39 pm

Re: separate video and sound sources, frame sequences

Post by admin »

I'm very sorry but there has been some misinformation in the last post from me. I have sucessfully created a working case. However, it did not work out quite as I expected. You can NOT have a .xml as reciept-file. That will fail, but you can have any other kind of .txt file as long as it's bigger than 10 bytes. Also, any other valid media can be used as reciept, f.ex. the last d:\media\videoseq_02.wav file.
In addition, the first command example had some errors. The correct should be:

-i "%original_path%\%original_name%_%4d.jpg" -i "%original_path%\%original_name%_01.wav" -i "%original_path%\%original_name%_02.wav" -map 1:0.0:0 -map 2:0.0:1 -map 3:0.0:2

Also, please note that you can use the supplied video and audio options in the "Custom FFmpeg"-encoder. You must only use the command-line and extension.

I know that this way of dealing with sequences as source media is not ideal, but it's a workaround until a proper sequence-decoders is at place.

-steipal
screenshaper
Posts: 16
Joined: Fri Oct 17, 2014 3:23 pm

Re: separate video and sound sources, frame sequences

Post by screenshaper »

Many many thanks.
Will give it a try tomorrow.
Post Reply