AviSynth and certain files causing failed output file.

Here you can submit bugreports
Post Reply
Monotroska
Posts: 5
Joined: Sat Sep 13, 2014 12:25 pm

AviSynth and certain files causing failed output file.

Post by Monotroska »

Hello!

First of all, great program. Love how light, flexible and fast FFAStrans works. Keep up the good work! Very thankful for this program!
I work for a non-profit local TV station. We have been looking for a good network watch-folder encoder for a while. Tried Adobe and Sorenson Squeeze for a few months, both had issues and shortcomings.
Knowing FFmpeg already, I was excited to see what FFAStrans could do. Setup took a little longer then the "fancy" commercial encoders, but also because FFAStrans has way more options hidden inside it. Settings are for setting! ;)
Most things have been running smoothly. Editors put their MPEG2 masters in one of a handful of input watchfolders, FFAStrans picks them up and spits out the encoded files to the output folders. (With the SyncBack util then moving the original master to storage, uploads some formats to FTP and all that good automated stuff).

One tiny "issue" however.
Not sure howcome, but when someone submitted a H264 file in MP4 container from the HandBreak DVD ripper, I notice that the monitor window shows the "Process @node" going through the usual steps of "A/V Media@ENCODER" then "Custom FFmpeg@ENCODER" and lastly "Delivery@". But the "Status" shows up as "Checking AviSynth script (TTL: 1200)" (and counting down from 1200 sec.) instead of the usual "Percentage %" and "NNNN / NNNN @ NN FPS" for the respective steps i see when people submit MPEG2 files. FFMPEG process seems to be churning on the file in the background just fine though, at expected speed for completion. But in that case it delivers [filename].avs files in the output folder. The content of the .avs files seems to be the AviSynth script used in the processing of the file.
It was an easy fix, since I realized I didnt need the decoder as long as I wasnt adding filter, FFMPEG functionality naturally decoding just fine without an intermediate step, faster too I imagine. So this is now only a problem with the workflow I have for adding watermark and timecode, with DVD rips from Handbreak that is.

Added print from MediaInfo below. Suppose could be any of these properties that cause the issue with AviSynth, someone would have to do a bunch of testing! :?
Its not an issue for me currently, as we likely wont get DVD rips that need watermarking. But seeing as I love FFAStrans, and this was the only issue I found, this is what I submitted to the forum! ;)

By the way. Could someone explain how they set up network farm for encoding. Is it as simple as having multiple machines start the exe from the same mapped network drive, minding the full access to cache folder too?

Best Regards!
- Mono

Random file that encodes normally:

Code: Select all

General
Complete name                            : N:\[censorship]...Snart_FillerBaggrund.mp4
Format                                   : MPEG-4
Format profile                           : Base Media / Version 2
Codec ID                                 : mp42
File size                                : 1.05 GiB
Duration                                 : 5mn 0s
Overall bit rate mode                    : Variable
Overall bit rate                         : 30.2 Mbps
Encoded date                             : UTC 2013-06-03 18:41:22
Tagged date                              : UTC 2013-06-03 18:41:22

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L5.1
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 4 frames
Format settings, GOP                     : M=3, N=33
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 5mn 0s
Bit rate mode                            : Constant
Bit rate                                 : 30.0 Mbps
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 25.000 fps
Standard                                 : PAL
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.579
Stream size                              : 1.05 GiB (99%)
Language                                 : English
Encoded date                             : UTC 2013-06-03 18:41:22
Tagged date                              : UTC 2013-06-03 18:41:22
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709

Audio
ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : 40
Duration                                 : 5mn 0s
Source duration                          : 5mn 0s
Bit rate mode                            : Variable
Bit rate                                 : 192 Kbps
Maximum bit rate                         : 237 Kbps
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 KHz
Compression mode                         : Lossy
Stream size                              : 6.77 MiB (1%)
Source stream size                       : 6.77 MiB (1%)
Language                                 : English
Encoded date                             : UTC 2013-06-03 18:41:22
Tagged date                              : UTC 2013-06-03 18:41:22
File from Handbreak:

Code: Select all

General
Complete name                            : N:\[Censorship]...Center (Rip 2).mp4
Format                                   : MPEG-4
Format profile                           : Base Media / Version 2
Codec ID                                 : mp42
File size                                : 603 MiB
Duration                                 : 29mn 6s
Overall bit rate mode                    : Variable
Overall bit rate                         : 2 894 Kbps
Encoded date                             : UTC 2014-09-12 10:06:42
Tagged date                              : UTC 2014-09-12 10:10:32
Writing application                      : HandBrake 0.9.9 2013052900

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : Main@L4.0
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 4 frames
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 29mn 6s
Bit rate                                 : 2 731 Kbps
Width                                    : 720 pixels
Height                                   : 574 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 25.000 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.264
Stream size                              : 569 MiB (94%)
Writing library                          : x264 core 130 r2273 b3065e6
Encoding settings                        : cabac=1 / ref=1 / deblock=1:0:0 / analyse=0x1:0x111 / me=hex / subme=2 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=6 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=1 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=10 / rc=crf / mbtree=1 / crf=20.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=20000 / vbv_bufsize=25000 / crf_max=0.0 / nal_hrd=none / ip_ratio=1.40 / aq=1:1.00
Encoded date                             : UTC 2014-09-12 10:06:42
Tagged date                              : UTC 2014-09-12 10:10:32
Color primaries                          : BT.601 PAL
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.601

Audio
ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : 40
Duration                                 : 29mn 6s
Bit rate mode                            : Variable
Bit rate                                 : 159 Kbps
Maximum bit rate                         : 203 Kbps
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 KHz
Compression mode                         : Lossy
Stream size                              : 33.1 MiB (5%)
Encoded date                             : UTC 2014-09-12 10:06:42
Tagged date                              : UTC 2014-09-12 10:10:32
And also one of the .avs files that it spits out:

Code: Select all

video = FFVideoSource(_ffas_video, 0, cachefile = "D:\FFAStrans Cache\20140902153210\20140913-140754-101-002F8895\~dec_avmedia_20140902153435.ffindex", seekmode = -1)
audio_null = BlankClip(length=43662, width=720, height=574, color=$000000, channels=1, audio_rate=48000)
audio_1 = audio_null
audio_2 = audio_null
audio_3 = audio_null
audio_4 = audio_null
audio_5 = audio_null
audio_6 = audio_null
audio_7 = audio_null
audio_8 = audio_null
audio_9 = audio_null
audio_10 = audio_null
audio_11 = audio_null
audio_12 = audio_null
audio_13 = audio_null
audio_14 = audio_null
audio_15 = audio_null
audio_16 = audio_null
audio_17 = audio_null
audio_18 = audio_null
audio_19 = audio_null
audio_20 = audio_null
audio_21 = audio_null
audio_22 = audio_null
audio_23 = audio_null
audio_24 = audio_null
audio_25 = audio_null
audio_26 = audio_null
audio_27 = audio_null
audio_28 = audio_null
audio_29 = audio_null
audio_30 = audio_null
audio_31 = audio_null
audio_32 = audio_null
audio = FFAudioSource(_ffas_video, 1, cachefile = "D:\FFAStrans Cache\20140902153210\20140913-140754-101-002F8895\~dec_avmedia_20140902153435.ffindex").ResampleAudio(48000).ConvertAudioTo16bit()
audio_1 = GetChannel(audio, 1)
audio_2 = GetChannel(audio, 2)
audio = MergeChannels(audio_1, audio_2, audio_3, audio_4, audio_5, audio_6, audio_7, audio_8, audio_9, audio_10, audio_11, audio_12, audio_13, audio_14, audio_15, audio_16, audio_17, audio_18, audio_19, audio_20, audio_21, audio_22, audio_23, audio_24, audio_25, audio_26, audio_27, audio_28, audio_29, audio_30, audio_31, audio_32)
m_clip = AudioDub(video, audio)
# avs_a_acmapper
m_clip = GetChannel(m_clip, 1,2)
Return m_clip
admin
Site Admin
Posts: 1687
Joined: Sat Feb 08, 2014 10:39 pm

Re: AviSynth and certain files causing failed output file.

Post by admin »

Hi Monotroska and thank you for using FFAStrans!
I would like for you to send me your <workflow>.ini found in the "Workflows" folder in the root FFAStrans folder. Also, a short sample of a problem file would be nice :-) You can send it to post@ffastrans.com if you like or make it available through DropBox or another means of share larger files. In the mean time, try and select "Full decode" for both audio and video in the "A/V Decoder". This might solve your problem until I find out what's happening with your workflow.

Regarding the farming setup; You ar quite right. It's as easy as running the FFAStrans.exe from a network path (UNC or letter). In the "Configuration" on the main FFAStrans window, you should then select "shared" for optimum farming performance IF you have a fast shared work folder. The farming feature has been massively improved in this 0.4.0 version but mind you; it's still beta but a lot of testing has been done with several server co-working with good results :-) You should however keep in mind that the farming capabilities does NOT allow for single file encoding to be shared between the nodes.

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

Re: AviSynth and certain files causing failed output file.

Post by admin »

Hi again Monotroska,

I have now reproduced this bug and I will look into it as soon as possible. Thanks for the bug-report! :-)

-steipal
Monotroska
Posts: 5
Joined: Sat Sep 13, 2014 12:25 pm

Re: AviSynth and certain files causing failed output file.

Post by Monotroska »

Hey Steipal.

Was just about to upload the video in question. But seeing as you already reproduced the bug, I wont do that :D
And thank YOU for looking into the bug so quickly!

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

Re: AviSynth and certain files causing failed output file.

Post by admin »

Last night I published a new version which should correct the problem. Try it out:-)

-steipal
Monotroska
Posts: 5
Joined: Sat Sep 13, 2014 12:25 pm

Re: AviSynth and certain files causing failed output file.

Post by Monotroska »

Hi there Steipal.

Its working now yes! Oddly though that "Waiting for AviSynth TTL" countdown still happens, but once its passed the 1200 seconds i jumps on to the A/V Media process and starts encoding as expected.
Already been ripping with another program then handbreak that transcode an MKV container file with no re-coding from the DVD that was an issue before. So its working perfectly in our workflow again.

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

Re: AviSynth and certain files causing failed output file.

Post by admin »

Even though the bug was fixed, ffms2 AviSynth plugin (which does the analyzing when using "A/V Decoder") will still have problems these kind of files coming from Handbrake. I don't know if it's a ffms2 problem or a Handbrake problem but if it's a ffms2 problem, I'm afraid it's also a FFAStrans problem. If you do not need filters you should try your workflow without the "A/V Decoder", otherwise you have to live with TTL for now. Most important is that you files does not fail, right ;-)

-steipal
Post Reply