View Full Version : FFmpegSource
MatMaul
23rd August 2007, 16:01
thanks a lot !
I'm waiting for the new version.
MatMaul
23rd August 2007, 19:34
for the audio I propose an other method to don't have to wait for the decode of the whole audio track at the beginning :
1) as long as the read is linear, we just decode the stream in the same time as we provide it to avisynth and we store it in the cache too.
2) if a seek appears forward, we continue the decoding and storing in the cache to the demanded position then we provide to avisynth and continue like in 1
3) if a seek appears backward, I think we have no choice and we need to decode the whole stream in the cache before go in the decoded position.
it could be a good solution as I think more than 50% of this plugin use is linear.
Myrsloik
23rd August 2007, 19:43
Now explain how you intend to report the exact number of audio samples at the time the filter is created.
G_M_C
23rd August 2007, 19:43
Are you using LoadCPlugin to load it? (Note the extra "C" in there...)
LOL :D
Guess i noticed the extra C allright :p
MatMaul
23rd August 2007, 19:51
Now explain how you intend to report the exact number of audio samples at the time the filter is created.
yep right I didn't think about that :p
what about a first fast read without store the data in a cache (in the same time than the video indexing perhaps ?) ? but I don't know if this will be significantly faster than decode and store in the cache.
TheRyuu
23rd August 2007, 20:15
LOL :D
Guess i noticed the extra C allright :p
I don't think you need LoadCPlugin anymore. I thought that was just for one of the "interm" builds.
Myrsloik
23rd August 2007, 20:37
Parsing without decoding can't be done done for all formats due to variable block sizes (mp3 is fixed, vorbis isn't) so at least for some you'll end up having to decode every single audio frame to get a reasonable number. That and you'd still have to create the cache once you actually want to read the audio...
Inc
24th August 2007, 10:35
@Myrsloik
Did you look at the Videolan API? Maybe its more easy to implement that library as "Libavcodec" source as it also (as you know) bases on ffmpeg but maybe gots better Matroska etc etc etc support?!
Myrsloik
24th August 2007, 13:17
Version 1.9 released mostly for testing the flac cache stuff. If no one finds it useful I'll remove it in the next version.
Is there any useful documentation at all about libvlc? All I found was completely useless and didn't say anything at all about its limitations.
MatMaul
24th August 2007, 13:40
thanks a lot !!
a little bug : the video cache is created even if vtrack = -2
I will test the flac cache tonight.
Inc
27th August 2007, 08:28
@Myrsloik
IIRC at videolan.org in its develping section there you can find a documentation.
Regarding ffmpeg .... do you know this one? Maybe one or two included things can be useful for your work: http://www.dranger.com/ffmpeg/
ajp
28th August 2007, 09:39
I get an error when I try to use Flac compression... without it works fine.
"CAviStreamSynth: System exception - Access Violation at 0x0, reading from 0x0"
buzzqw
28th August 2007, 10:18
be sure to exclude any other filters problem
try an avs with ffmpegsource and your source file, no other filters
are errors present again?
BHH
ajp
28th August 2007, 11:20
Yes, in fact I was only using ffmpegsource...no other filters. I removed all other plugins from plugin folder as well, no luck...
FFmpegSource(source="movie.mkv", vtrack=-1, atrack=-1, timecodes="timecodes.txt", vcache = true, accompression = 1, pp="", ppquality = 6, seekmode = 1)
Myrsloik
28th August 2007, 20:47
No hints on what the file contains? does it happen with all files but only for you? You're making this far too simple for me and you should absolutely not upload a piece of whatever it is to ftp://upload:upload@mellbin.org/
If someone else is feeling generous and want flac to work for 8 and 24bit audio feel free to upload a small file because I'm too lazy to create that myself.
ajp
28th August 2007, 20:59
:)
The file contains one h264 track and one ac3 track. Normally I use NicAC3source for the audio but I wanted to try the complete ffmpegsource solution now that there's a chance to shrink the audio cache a little. I've tried a few different files with the same type of tracks, same error on all of them. I wanted to wait for someone else to comment on how it works but nobody has so...
I can't upload a sample right now, maybe tomorrow...
Thanks for the support.. :)
MatMaul
28th August 2007, 22:40
I don't have this problem, but problems with mono file : flac cache is twice bigger than wav cache and the audio is distorted
EDIT : if you want a sample this problem appears with my last mov sample I provided to you, and I have uploaded an other problematic mono file.
Myrsloik
29th August 2007, 00:47
New version (1.10). This one actually works.
ajp
29th August 2007, 07:24
Wohoo! Tried it, it works! :D
Any chance of DTS support as well? ;)
Myrsloik
29th August 2007, 10:02
DTS support where? I think libavcodec is already supposed to have its own decoder for it. Never tried it myself though.
ajp
29th August 2007, 10:10
Oh, I just assumed it didn't... never actually tried it! :D
imcold
3rd September 2007, 23:26
great plugin, thanks a lot :)
Lele-brz
5th September 2007, 11:23
Hi,
I'm using FFmpegsource and it's great, no more mess with ffdshow...
But I found a regression, I used version 1.4 to encode using FFmpegSource a mov file with dvvideo + pcm_s16be and everything was ok.
Using version 1.10 I can encode but the resulting bitrate is not the one specified in x264.
Then just changing ffmpegsource files to version 1.4 everything worked ok.
anyone has some idea about it?
thanks in advance
bye
Myrsloik
5th September 2007, 12:16
The only difference is that x264 (different versions?) produce different sized output? Nothing else?
foxyshadis
5th September 2007, 12:23
Sounds like a framerate issue. Did you check to see if it changed to 25 instead of 23.976?
Lele-brz
5th September 2007, 14:03
>The only difference is that x264 (different versions?) produce > different sized output? Nothing else?
The big difference is that the bitrate is around 1 Mbps instead of the required 450, so the file is also bigger.
I have the same problem with version 1.8.
But If I just change to FFmpegSource 1.4 wihtout changing nothing else (x264) everything is ok.
About the bitrate I'll let you know I'm reencoding now.
thanks for answering
Lele-brz
5th September 2007, 15:07
no the framerate wasn't changed...
I also noted some AV sync problems on other format encoding with FFmpegSource
Wilbert
5th September 2007, 19:43
no the framerate wasn't changed...
I also noted some AV sync problems on other format encoding with FFmpegSource
Yes, vfr results in async video/audio when encoding straight to avi, because:
With vfr it just returns every encoded frame and sets the fps to 30.
I don't know how to circumvent it. Myrsloik, correct me, if i'm wrong. Perhaps Myrsloik can add a convertfps=true/false option ala DirectShowSource?
Of course you can always encode back to MKV with the timecodes file.
Myrsloik
6th September 2007, 20:31
The fps is no longer set to 30 fps unless the guessed value is completely insane. For mkv it's set to the average frame duration and for all other formats it's the first frame duration. Of course both fail in their own way once vfr is encountered...
If you for some inexplicable reason want to convert from vfr to cfr use the timecode file and write your own filter/program that generates an avisynth script with lots of duplicateframe or whatever your preferred method is. I really don't see the point and don't intend to add fps conversion ever.
IanB
6th September 2007, 22:53
I really don't see the point and don't intend to add fps conversion ever.I must say I am disappointed but I do understand. :(
As to the point, it is simply about providing the best service to our users.
While parsing the stream you have easy access to this timecode information and can easily reverse any temporal compression.
Generating a timecode file involves an extra parse of the input file, then a lot of stuffing around generating a devious script.
ficofico
7th September 2007, 17:56
Hi, ffmpegsource doesn't work with my e90 recording.
I've make a batch program that use a lot of different avisynth script with flash gui, in my computer and a few other, program work well using directshowsource as input, but in many computer program doesn't work, due to conflict with other codec (i presume) . It's very important for me that ffmpegsource really work in my program. Probably I haven't understand how to use this input plugins........., or there's a bug.
I've tried to encode a clip and this is the result:
VIDEO (http://ficofico.interfree.it/video4.rar)
the original video it's a video like this:
Video (http://ficofico.interfree.it/originale2.rar)
I've looking a lot for an input plugins like this...... very thanks for your work
Myrsloik
7th September 2007, 19:28
Read about seekmode in the manual. The "similar" video you posted doesn't show the issue. What was the input container anyway?
ficofico
7th September 2007, 20:12
The video it's original from my smartphone, I haven't recode the video.
I've tried seekmode 0-1-2 but neither work
Myrsloik
7th September 2007, 20:22
How did seekmode=0 fail? Did you try to remux the file to mp4 and if that fails mkv?
Yong
7th September 2007, 20:41
Hi, im using the 1.10 version, but it crash(ffmpegsource.dll crash) with x264 and xvid_encraw when certain options enabled:confused:
here is my avs script and x264/xvid encoding options.
i use this on my x264/xvid batch file.
FFmpegSource("%~1", vtrack = -1, atrack = -2,vcachefile="%temp%\%~n1.ffv",seekmode = 1).crop(0,6,0,-6).hqdn3d()
set x=start/b/w/low encraw2 -i "%temp%\%~n1.avs" -quality 6 -vhqmode 4 -bvhq -qpel -nopacked -lumimasking -progress 2 -size 8192 -frames 500
%x% -pass1 "%temp%\%~n1.log" -turbo
%x% -pass2 "%temp%\%~n1.log" -type 2 -o "%temp%\%~n1.mkv"it doesnt crash if i use 1pass encoding mode with default options.
start/b/w/low x264 "%temp%\%~n1.avs" -o "%temp%\%~n1.mkv" -b 3 --8x8dct --mixed-refs --crf 36 --me umh -A all --b-pyramid --weightb --no-fast-pskip --no-psnr --no-ssim --progress --frames 500
if i remove -A all and -me umh, problem will gone:p
btw, it only happen after the encoding is finish.
ficofico
7th September 2007, 20:46
Here you can find the original video, the recoded video and a txt file with my settings for avisynth and x264.
Videos (http://ficofico.interfree.it/videos.rar)
very thanks
Myrsloik
7th September 2007, 21:04
New version where Yong's issue is guaranteed to be fixed. Can't reproduce ficofico's problem here at all with 1.11.
ficofico
7th September 2007, 21:13
I'll waiting for 1.12 Myrsloik.......... thanks again
edit: I've tested now 1.11 , and as the 1.10 ,only the first 5 second of video are processed.
Yong
7th September 2007, 21:54
thanks alot, no more crash on 1.11:)
Lele-brz
10th September 2007, 08:16
Hi,
I'm using FFmpegSource to encode a vc-1 video (in a asf container) and I noticed that's ok, the video is encoded but there a problem with the AV sync, is there some option to set or VC-1 is not supported?
thanks for any help
Myrsloik
10th September 2007, 21:11
Is it vfr?
Lele-brz
11th September 2007, 08:03
Hi, thanks for answering
this are the specs of the video in question:
Filename: D:\testNewFormats\TVFINT_383_CONTENT.wmv
Container: asf
Extended: asf format
Bitrate: 1073198
Duration: 00:43:30
Video Codec: vc1
Audio Codec: wmav2
Video Size: 640 x 480
Video fps: 25
Audio channels: 2
Audio sample rate: 44100
Myrsloik
11th September 2007, 10:44
But is it vfr?
Lele-brz
11th September 2007, 12:30
sorry, I don't know, the tool I use for retrieving information is ffmpeg and it doesn't tell me if is varaible framerate...
thanks
Myrsloik
11th September 2007, 20:57
Hint: timecodes=...
TheFluff
12th September 2007, 20:17
In my experience, WMV in the .wmv/ASF container is almost always VFR or some kind. vOv
Myrsloik
14th September 2007, 23:45
New version. All colorspace conversions should finally work correctly (a bug in libavcodec's camtasia decoder made the testing very confusing). It's also possible to use ffmpegsource as a simple image reader with seekmode=-1. Animated gifs only seem to return the first frame though.
Mtz
15th September 2007, 07:06
I'm trying to use AutoMKV and buzzqw recommended me to unpack the ffmpegsource dlls to system32. After I made this, when I'm trying to open VirtualDubMod 1.5.4.1 I always have this error:
http://img502.imageshack.us/img502/177/vdmerrornt0.jpg
When I overwrited the dlls, I remember that the latest dll was from spring of 2007 (don't remember the date)
enjoy,
Mtz
foxyshadis
15th September 2007, 07:43
You're picking up an older version of ffmpegsource, I think. The latest version doesn't have that import. Check that no avsi files are loading older copies, for instance.
Mtz
15th September 2007, 11:33
I used the 1.12 version. Until this update, VDM worked very well for me and I had some older dlls in system32 like avcodec-51.dll. :(
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.