[Ffmpeg-devel-irc] ffmpeg.log.20140929

burek burek021 at gmail.com
Tue Sep 30 02:05:01 CEST 2014


[00:16] <dashcloud> Hi, I'm looking for a commandline to encode video from my capture card to SD h264 in real time.  If it matters,  I'll be editing it afterwards to trim out things.
[00:19] <c_14> https://trac.ffmpeg.org/wiki/Encode/H.264
[00:24] <dashcloud> thanks! do you think an AMD Athlon II X2 B22 is fast enough to do real-time encoding of SD resolution h264?
[00:25] <c_14> Hmm, you'd have to try.
[00:25] <c_14> Using -preset ultrafast will help.
[00:26] <dashcloud> thanks
[00:28] <iive> i'm with i3 2.9GHz (2 physical cores, 2 virtual). I can encode SD at 3 times the realtime speed.
[00:28] <iive> that is, with the normal default setting.
[00:29] <iive> btw, are you capturing though v4l2 (aka raw image) or dvb (aka digital tv)
[00:33] <dashcloud> v4l2
[00:35] <iive> libx264 it is then :)
[01:01] <Peter_Occ> here is a command line which seems to work fine
[01:01] <Peter_Occ> ffmpeg -f mjpeg -r 8 -i http://user:pass@192.168.0.6/video/mjpg.cgi -r  10 /var/www/html/videos/videoMain2.mp4
[01:01] <Peter_Occ> Why would I have set it up this way, with the rate for input at 8 while the rate for output is 10? I remember doing that on purpose but I don't remember why.
[02:52] <waressearcher2> I have one video 10 minutes long that is with 24 fps, and other 10 minutes long that is with 29.970 fps, when I concatenate them together using command: "ffmpeg -f concat -i list.txt -c copy out.avi" in place where they are joined there is a lag or pause for few seconds and if I add audio to that out.avi when it reaches 10 minutes there goes that
[02:52] <waressearcher2>  lag then video continue playing but the audio seek forward for few minutes, what I did to remedy it is added "-r 24" to ffmpeg command but will it worsen the quality ? or should I've added "-r 29.970" instead ?
[02:53] <c_14> Wait, that helped?
[02:53] <c_14> -r as an output option should not do anything if -codec copy was used.
[02:53] <c_14> iirc
[02:54] <waressearcher2> I don't remember if I removed "copy" option
[02:55] <waressearcher2> but anyway, if I concatenate two videos, 24fps and 29.970fps, should I increase to upper value or decrease to lowest value fps ?
[02:56] <c_14> I'd increase just to avoid frame dropping.
[02:56] <c_14> But it doesn't really matter.
[02:56] <c_14> Might depend on if you want to stay more PAL or more NTSC conform.
[04:45] <sebastianlacuest> Hi everyone!
[04:45] <sebastianlacuest> does anybody knows about qmg file format support in ffmpeg?
[05:00] <c_14> Don't think so.
[05:05] <active8> in linux, when ffmpeg runs and all those output messages fly, do the errors (in red) go to stderr ( fd 2) or stdout (fd 1) - i take it all normal output text goes to stdin; and what about those warnings that I see in yellowish orange? I'd like to catch them in some info dialogs I can pop up with zenity (pretty cool, that)
[05:06] <JodaZ> active8, all messages go to stderr
[05:07] <active8> thanks JodaZ. I'll try catching it. be nice to catch the errors separately. guess I'll have to filter on key words in the output.
[05:10] <JodaZ> active8, use the return code
[05:13] <active8> JodaZ, won't that just return success or failure. I was going to use two info popups. one for warnings and/or errors (the dialog icon is specific to the zenity dialog type) and one for normal output. be interesting to see if zenity preserves the message colors.
[05:13] <JodaZ> active8, thing is, since encoding is supposed to be deterministic, you can always rerun it to get the error :)
[05:15] <JodaZ> oh, you making some kinda gui
[05:15] <JodaZ> hmm
[05:15] <active8> the script I'm writing should figure out whether the dialog needs to have and exclamation icon, info, or error icon
[05:16] <JodaZ> doesn't new ffmpeg output colored error info? (or was that libav)
[05:16] <c_14> It does.
[05:16] <JodaZ> colour would correspond nicely to your error classification
[05:17] <JodaZ> but you propably shouldn't show anything poping up for anythign below red, and even for red it shouldn't abort ffmpeg or interrupt it or anything
[05:17] <active8> bash script calls zenity for output info. zenity does list, checkboxes, text views, etc. radios - I could set codec, formats, pick files, all that good stuff and build the command froom the selections and not have to process commandline options to the script.
[05:18] <c_14> JodaZ: I'm pretty sure red is fatal, isn't it?
[05:18] <JodaZ> dunno man
[05:18] <active8> i might find a way to ... easy q for quit echo q >&1 - i think
[05:19] <active8> or >&0 stddin
[05:19] <JodaZ> zenity sounds annoying >_>
[05:19] <louis__> what should encode lossless faster, huffyuv or ffv1?
[05:21] <active8> what's annoying is trying to remember that option t (or whatever) means a different thing for every stinkin linux cmd that has that option. -t for list in tar, -l for list in unzip. when I come home with a 3gp or amr on my phone, I want to just open the script, set whatever and do the comversion to mp3 or mp4
[05:21] <active8> or whatever i want without having to look up a command in my note. the script is my notebook
[05:22] <JodaZ> active8, theres handbrake
[05:22] <active8> you get handbrake to run on CentOS
[05:22] <JodaZ> maybe i can interest you in a desktop os that is not trying to be rhel?
[05:24] <JodaZ> but there are rpm's for it aparently
[05:24] <active8> well, in a VM guest, debian sux and that travesty BKlinux died, IIRC. but it ran like a pig in mud when it wasn't locking up - cinelerra just locked.
[05:25] <JodaZ> ?_?
[05:25] <JodaZ> vm?
[05:25] <JodaZ> handbrake is available for windows
[05:26] <JodaZ> and centos
[05:26] <JodaZ> dunno what more you could want
[05:26] <active8> what was before that? AV Linux. buncha locking up. they wouldn't install right from a livecd, either.
[05:27] <c_14> louis__: According to several short tests, they both take about the same length of time. But you should probably test with your source and your settings as I didn't take all variables into account (and didn't test that thoroughly).
[05:28] <active8> handbrake is NOT available for CentOS in any of the repos I trust - the ones that won't break things. Now in windows, on the laptop, I can make exceptions. Doze is made to break anyway and I can keep XP in one piece with no effort
[05:28] <JodaZ> ...
[05:28] <c_14> The ffv1 output was about half the size of the huffyuv output though (again, might depend on the source and encoding settings).
[05:28] <JodaZ> great os you got there if packages break the system
[05:28] <JodaZ> but ya, suit yourself :)
[05:29] <active8> thanks JodaZ . I'll keep handbrake in mind along with some of the other 'doze video and sound apps I've found usable.
[05:33] <louis__> c_14: kdenlive says 45 minutes to encode ffv1, but 13 for huffyuv
[05:33] <louis__> i am skeptical since the huffyuv video came out to be 29 gb for 27 minutes
[05:33] <active8> JodaZ, it's for cert training - not meant for gui fooey. server and devel box. prob is that without carefully maintaining exclude lists in the repo.d files, it can accidentally replace a dependency from another app. at least that's what would happen with VLC til i found the nux-dextop repo.
[05:33] <active8> but what distro / desktop OS did you have in mind, JodaZ ?
[05:34] <c_14> louis__: I only tried with a short sample file, but both took about 35 seconds.
[05:34] <c_14> I can try with something longer.
[05:35] <active8> sumthing that will run in a VM guest without trouble? note that USB passthrough can be flakey with KVM/qemu
[05:35] <JodaZ> replace a dependency? never had dep trouble with debian, while all the rpm plebs always go around installing random rpm's to save their lifes
[05:35] <c_14> louis__: let me use the git version of ffmpeg while I'm at it.
[05:36] <active8> JodaZ, debian ran like crap in a VM. Not sure why
[05:36] <active8> but YAY!
[05:36] <JodaZ> maybe because you brought up a gui on the shitty emu'd gpu
[05:36] <JodaZ> or you didn't have kvm but original real deal qemu xD
[05:36] <active8> I got Ardour to compile into a safe dire where I can run it directly without hosing anything
[05:37] <active8> lots of ifs and and buts with VMs , lol 8)
[05:37] <louis__> how are you c_14 ?
[05:37] <active8> Maybe one day I can package my Ardour into an RPM and script that for easy updates
[05:37] <louis__> thanks for all the help with the v4l stuff a few weeks back
[05:39] <c_14> I'm fine, no problem.
[05:39] <louis__> is it possible for huffyuv to do lossless video at only 169106 kilobits per second?
[05:39] <louis__> that seems a little low
[05:40] <nmz787> when I use libx264 trying to write video from opencv my computer freezes, but IYUV and DIV3 codecs work
[05:40] <louis__> 1080p30 source
[05:41] <c_14> I'm getting 130000k about for huffyuv 720p24
[05:41] <c_14> And the bitrate aside, the compression ratio is usually the more interesting part. Is the source raw?
[05:42] <louis__> c_14: rawvideo capture
[05:42] <louis__> i work with rawvideo because my wimpy laptop processor likes it better
[05:42] <louis__> capturing lossless x264 works, but trying to edit it is a nightmare
[05:43] <louis__> there's 5 seconds of lag just when you hit play in kdenlive
[05:55] <c_14> Right, I've got some huffyuv encodes running now. Will do the ffv1 tests once they're done.
[06:13] <c_14> Hmm, looking at some io stats, huffyuv at least might be IO limited on my machine.
[06:46] <c_14> louis__: At least on my machine, both ffv1 and huffyuv take about the same amount of time and ffv1 creates files that are ~40% as large as the huffyuv encode, but as I said above I might be IO-limited.
[07:35] <socksandsandals> is there an API in ffmpeg to take one AVPicture and draw it on top of another one at a given (x,y) offset?
[08:26] <aditya3098> Hi, I have a live audio stream, and would like to use ffmpeg to relay this stream, with a minuite of latency
[08:27] <aditya3098> In other words, if a a sound is  sent over the main stream, then in a minuite, the same sound is sent over the new stream
[08:27] <aditya3098> I tried other channels and was asked to use liquidsoap/gstreamer, but can I do it with ffmpeg
[15:55] <svkoskin> I'm having an issue with -shortest option. I'm trying to convert a .ts file which has around 7½ minutes of H.264 video and 9½ minutes of audio to an .mp4 file, which should have 7½ min length (so that the part which only has audio track gets discarded, as I suppose -shortest should work that way). However, I get a .mp4 file with a longer audio stream than
[15:55] <svkoskin> the video stream, so it seems -shortest is not working correctly. Here is the command line command and its output http://pastebin.com/k8r7dva6
[17:57] <quebre> hi
[17:58] <quebre> i joined two movies into one, which is now: NVEExport.mpg, File size: 7.44gb, Audio: AC-3, Audio bitrate: 448kbit/s, Video codec: MPEG-2, Video bit rate: 3,0Mbit/s, Resolution 720x576
[17:58] <quebre> so how do i put it on my double layer DVD to play on dvd plaer ?
[19:04] <sky99> I am trying to get a question answered about ffmpeg and I have tried the mailing list for for some reason anything I send there seems to fall into a black hole and never gets posted.
[19:05] <sky99> My question is this:  I have video files in .ts format that were obtained via a satellite receiver.
[19:06] <sky99> They contain one video stream but mulyiple audio streams.
[19:06] <sky99> multiple
[19:07] <sky99> Each audio stream appears to have two channels (left and right) but one contains background sounds, another dialogue and so on.
[19:08] <sky99> Is there any way using ffmpeg to merge all those audio streams down to a single stream, without changing the video at all?
[19:09] <sky99> What i need to do is actually slightly more complicated than that nut that is the key part that I cannot figure out how to do.
[19:09] <sky99> nut=but
[19:29] <jberger1> hello
[19:34] <jberger1> I've just upgraded to ffmpeg 2.4.1 and adjusted to the modified syntax of the overlay feature. Nearly all seems to be fine, except a input/output error messages about the (different) overlay .png files. The resulting .mov file works as expected, but I am unable to get more information about the reason, -loglevel debug does not help.
[19:39] <jberger1> Debug output: http://pastebin.com/BYXdtUdh
[19:54] <JodaZ> sky99, https://trac.ffmpeg.org/wiki/AudioChannelManipulation
[20:12] <vlatkozelka> hi ... how to change ffprobe output format to xml instead of the plain text default ? i read its possible but can't figure out how
[20:12] <JEEB> http://www.ffmpeg.org/ffprobe.html
[20:13] <vlatkozelka> i read that
[20:13] <JEEB> then you should know
[20:13] <vlatkozelka> but doesnt show what option to use
[20:13] <JEEB> with little scrolling I see the option
[20:14] <JEEB> and for the value I can see it tells me to scroll further
[20:16] <vlatkozelka> i get it the value is xml
[20:16] <vlatkozelka> but what comes before that ?
[20:16] <JEEB> hint: the example in the documentation in that point has the value "json"
[20:16] <JEEB> I mean, seriously. it's written there and I found it with little scrolling.
[20:17] <JEEB> and I don't even use ffprobe like that so it's not like I already knew what I was looking for :|
[20:17] <vlatkozelka> maybe im just tired ...
[20:17] <someone-noone> hello. I capture my mic & webcam with avfoundation framework, but resulting file is out of sync. Here's what I run: http://pastebin.com/EZRRCXST
[20:18] <someone-noone> I think it's due to the fact that my webcam starts not immediately as mic and that's why video little bit late
[20:18] <someone-noone> Can ffmpeg fix it without offsets?
[20:18] <JEEB> vlatkozelka, ctrl+f for "json" upwards from the listing of the formats :P you should get the example there
[20:19] <vlatkozelka> yeah found that
[20:19] <vlatkozelka> but
[20:19] <vlatkozelka> its not really usefull i though im doin something wrong
[20:19] <vlatkozelka> all it does is <ffprobe> </ffprobe>
[20:19] <vlatkozelka> everything else is still printed as it would always do
[20:20] <JEEB> the xml format has a comment in there
[20:20] <JEEB> Note that the output issued will be compliant to the ffprobe.xsd schema only when no special global output options (unit, prefix, byte_binary_prefix, sexagesimal etc.) are specified.
[20:20] <JEEB> anyways, no idea otherwise, that's general ffprobe usage then and I have nfi about that \o/
[20:31] <Polarwinds> JEEB, I finished my transcoding with the script you gave me. it reduced the whole series from 27 gigs to 13 :)
[20:46] <gopi> I am trying to add watermark to a video
[20:46] <gopi> this is my code
[20:46] <gopi> ffmpeg -i bigbunny.mp4 -i /media/movies/watermark/wm_720p.png -filter_complex 'overlay=10:main_h-overlay_h-10' -t 1  test.mp4
[20:47] <gopi> I am getting following error "/media/movies/watermark/wm_720p.png: Input/output error'
[20:48] <gopi> what is this error?  How do I debug it..
[20:51] <vlatkozelka> try [0:v][1:v] overlay
[20:52] <gopi> what does those parameters do?
[20:52] <vlatkozelka> specifies what ur overlaying over what
[20:53] <vlatkozelka> 0:v is the video , 1:v is the png
[20:53] <gopi> oh..mapping..
[20:53] <gopi> i am getting same error
[20:53] <gopi> this is the code ffmpeg -i bigbunny.mp4 -i /media/movies/watermark/wm_720p.png -filter_complex '[0:v][1:v] overlay=10:main_h-overlay_h-10' -t 1  test.mp4
[20:55] <vlatkozelka> -map 0:v:0 -map 0:a:0 -c:v copy -c:a copy
[20:55] <vlatkozelka> 1 sec ill show u a test i just did
[20:57] <vlatkozelka> gopi , try this
[20:57] <vlatkozelka> http://pastebin.com/QfnVtMMZ
[20:58] <gopi> ok..
[20:58] <vlatkozelka> thats the result i got
[20:58] <vlatkozelka> http://oi59.tinypic.com/1428tau.jpg
[20:58] <gopi> give me a minute
[21:01] <gopi> vlatkozelka, I am getting same
[21:01] <gopi> ffmpeg -i bigbunny.mp4 -i /media/movies/watermark/wm_720p.png -filter_complex "[1:v] scale=20:20 [s] ; [0:v][s] overlay=10:10" -map 0:v:0 -map 0:a:0 -c:v libx264 -c:a copy test.mp4
[21:02] <gopi> what does this error means? "/media/movies/watermark/wm_720p.png: Input/output error'
[21:02] <gopi> can't it find the file?
[21:02] <vlatkozelka> maybe
[21:03] <vlatkozelka> try putting -f mpeg right before the test.mp4
[21:04] <gopi> i ll trye
[21:04] <gopi> http://pastebin.com/7WGvdvhP
[21:05] <gopi> that's the error report
[21:05] <vlatkozelka> hmm
[21:05] <vlatkozelka> can u try
[21:05] <vlatkozelka> ffplay /media/...../ .. jpg
[21:05] <vlatkozelka> just ffplay the picture see if it works
[21:08] <gopi> i can't do ffplay..since i am running it as server..
[21:08] <gopi> i did ffprobe
[21:09] <svkoskin> do you have right to write to /media/movies/watermark/
[21:09] <gopi> http://pastebin.com/J5WcdfSh
[21:09] <gopi> yeah
[21:09] <gopi> i set 777
[21:10] <gopi> folder watermark have 777 permission
[21:18] <someone-noone> hello. I capture my mic & webcam with avfoundation framework, but resulting file is out of sync. Here's what I run: http://pastebin.com/EZRRCXST
[21:19] <someone-noone> I think it's due to the fact that my webcam starts not immediately as mic and that's why video little bit late
[21:19] <someone-noone> Can ffmpeg fix it without offsets?
[21:22] <someone-noone> or: can I tell ffmpeg to recalculate pts values not how they actually written with avfoundation or some muxer, but when the first packet comes
[21:22] <gopi> i got the watermark working..
[21:23] <gopi> I am still getting Input/Output error..
[21:23] <gopi> but watermark and encoding working..
[21:23] <gopi> thanks a lot..
[21:24] <vlatkozelka> ?
[21:24] <vlatkozelka> its working but giving an error ? how ? and what did you do ... im interested
[21:24] <vlatkozelka> gopi ^
[21:28] <gopi> vlatkozelka, watermark and encoding is working..
[21:28] <gopi> but I am still getting this message /media/movies/watermark/wm_720p.png: Input/output error
[21:29] <gopi> I don't know why
[21:29] <vlatkozelka> wierd but
[21:29] <vlatkozelka> what did u do to make it work ?
[21:29] <gopi> I didn't make any changes..
[21:30] <vlatkozelka> lol
[21:30] <vlatkozelka> well if its working dont break it i guess
[21:30] <gopi> It must have been working before as well...i was trying to figure out the error message...i didn't see the output
[21:30] <gopi> lol
[21:30] <gopi> i should have looked at the output..
[21:31] <gopi> stupid me :P
[21:31] <gopi> lol
[21:31] <vlatkozelka> programmers always care about errors , its warning we dont give a fuck about ;)
[21:31] <gopi> But, I am still curious..why I am getting input/Output error..
[21:31] <gopi> lol...debugging is the fun side of programming..
[21:32] <gopi> :)
[21:32] <gopi> Do you have any idea, how we can trace this error?
[21:32] <gopi> i am curious to figure it out..
[21:32] <vlatkozelka> no not really ...
[21:32] <vlatkozelka> maybe post on the forums
[21:32] <vlatkozelka> or in the mailing list
[21:33] <gopi> yeah..i will do..
[21:37] <gopi> vlatkozelka, I have posted to mailing list..
[21:38] <gopi> lets wait..
[21:49] <spectralsun> I created some video files from images, but I am having issues when concatting them with existing video files that were created by phones
[21:50] <c_14> https://trac.ffmpeg.org/wiki/How%20to%20concatenate%20(join,%20merge)%20media%20files
[21:50] <spectralsun> c_14: https://dpaste.de/si7M
[21:51] <spectralsun> it's complaining about pixel format when I use this method
[21:51] <c_14> That won't work.
[21:51] <c_14> Have you tried reading the link I gave you?
[21:51] <c_14> Try using the concat demuxer.
[21:51] <c_14> That or the filter.
[21:52] <c_14> Since you're reencoding anyway.
[21:52] <c_14> The only video format (I know of) that you can concat with `cat' is mpegts.
[21:52] <spectralsun> I'll try with the filter
[21:52] <spectralsun> I also tried with the mmcat scrip
[21:53] <spectralsun> https://dpaste.de/BB9T
[21:53] <spectralsun> Output file #0 does not contain any stream
[21:53] <c_14> >/tmp/mcs_v_all: Operation not permitted
[21:53] <c_14> Something's going wrong.
[21:54] <spectralsun> indeed.
[21:54] <c_14> I also would not recommend that script. I've had mixed results with it.
[21:54] <c_14> Sometimes it works fine for people, sometimes you need to patch certain parts, and at other times it just doesn't work.
[21:55] <c_14> Also, it might not break anything, but are you sure you want this: [..]b/nsextreme/../nsextreme/[..] ?
[21:57] <spectralsun> c_14: those were paths generated by the django app
[21:57] <spectralsun> getting better results with the concat demuxer
[21:58] <c_14> Better or good?
[21:58] <spectralsun> it made a file, but the video clip that is an actual clip from a phone, is all messed up
[21:58] <spectralsun> I'm going to see if converting it all to the same scale helps
[21:59] <spectralsun> the file plays in ffplay
[21:59] <c_14> Scale shouldn't matter that much, (except for maybe with codec copy). What has to match is things like pixel format etc.
[22:01] <spectralsun> the video clip created from the image plays correctly, but the video from the actual video file looks like this: http://i.imgur.com/7Y1O76A.png
[22:04] <c_14> Ye, looks like something doesn't match up between the 2 videos.
[22:04] <c_14> Try with the filter or pastebin the ffprobe of both files.
[22:06] <spectralsun> Okay, would it help if all the files I'm concatting are the same resolution?
[22:06] <c_14> Are you reencoding during concat or not?
[22:07] <spectralsun> Yeah, I want them all to come out as .mp4
[22:08] <spectralsun> basically I'm taking a 6 second clip from videos, and having splash image + 6 second clip + another splash image
[22:08] <spectralsun> sometimes the 6 second clip is a .mov, but it will usually be .mp4
[22:10] <c_14> If you're reencoding, differing sizes shouldn't be an issue, if you're only remuxing (ie with -codec copy) it might be.
[22:13] Action: hawken looks around
[22:14] <hawken> Wondering if there are any plans with making ffmpeg read bluray mvc (.ssif-files) and if I can contribute :P
[22:16] <c_14> Related to OPW or on your own?
[22:23] <hawken> c_14: OPW? I just want to be able to read those files :P but I won't mind putting some work in ffmpeg if I know where to start :P
[22:23] <hawken> I'm just your regular computer science student
[22:27] <ubitux> hawken: ask in #ffmpeg-devel instead
[22:27] <ubitux> this is where the development on FFmpeg happens
[22:27] <hawken> Mkay :P
[22:44] <voip1__> Hello guys, please help me
[22:44] <voip1__> I have problem and i am not sure my problem related with my source or with ffmpeg parameters.
[22:44] <voip1__> When i am trying to play my source with VLC, video stops and starts. Stream source provider says on his side everything is ok, and he is able normal play with VLC
[22:44] <voip1__> Please chek: http://pastebin.com/dEmLZYEz
[22:46] <spectralsun> c_14: https://dpaste.de/kMfc#L23
[22:47] <c_14> splash.mp4 needs an audio track, even if it's just silence.
[22:48] <spectralsun> ok, how can i add one?
[22:48] <c_14> you can use aevalsrc=0
[22:49] <spectralsun> c_14: thanks, trying that now
[22:49] <spectralsun> c_14: Unable to find a suitable output format for 'aevalsrc=0'
[22:50] <c_14> For the current command you can just use -filter_complex 'aevalsrc=0:d=2[as];[0:0][as][1:0][1:1] concat=n=2:v=1:a=1[v][a]' instead of what you have as a filter_complex.
[22:51] <spectralsun> ah
[22:52] <spectralsun> c_14: Input link in1:v0 parameters (size 568x320, SAR 0:1) do not match the corresponding output link in0:v0 parameters (568x320, SAR 640:639)
[22:54] <spectralsun> that was when i tried to use a splash.mp4 that was converted to the same resolution as the video file
[22:54] <spectralsun> here is when I use the original splash:
[22:54] <spectralsun> Input link in1:v0 parameters (size 568x320, SAR 0:1) do not match the corresponding output link in0:v0 parameters (1280x720, SAR 1:1)
[22:55] <c_14> Try piping in1 through setsar=1
[22:55] <c_14> '[1:0]setsar=1[vs]'
[22:55] <c_14> and then use [vs] instead of [1:0] in the concat
[22:56] <spectralsun> c_14: 'aevalsrc=0:d=2[as];[1:0]setsar=1[vs]; [0:0] [as] [vs] [1:1] concat=n=2:v=1:a=1 [v] [a]' ?
[22:56] <spectralsun> still same error
[22:58] <c_14> scale=iw*sar:ih,setsar=1
[22:58] <c_14> ie [1:0]scale=iw*sar:ih,setsar=1[v1];[0:0]scale=iw*sar:ih,setsar=1[v2]
[22:58] <c_14> then use v1 and v2 in the concat
[22:59] <spectralsun> c_14: could you show me a full example in my context please?
[23:01] <c_14>  'aevalsrc=0:d=2[as];[1:0]scale=iw*sar:ih,setsar=1[vs];[0:0]scale=iw*sar:ih,setsar=1[v2s]; [v2s] [as] [vs] [1:1] concat=n=2:v=1:a=1 [v] [a]'
[23:01] <spectralsun> ok, we are getting somewhere
[23:01] <spectralsun> that worked
[23:01] <spectralsun> :)
[23:02] <spectralsun> I did this:
[23:02] <spectralsun> 'aevalsrc=0:d=2[as];[1:0]scale=iw*sar:ih,setsar=1[v1];[0:0]scale=iw*sar:ih,setsar=1[v2]; [v1] [as] [v2] [1:1] concat=n=2:v=1:a=1 [v] [a]'
[23:02] <spectralsun> it rendered the clips in the wrong order though
[23:02] <c_14> switch v1 and v2
[23:03] <c_14> either after the setsar (for correctness) or in the concat input.
[23:04] <spectralsun>  'aevalsrc=0:d=2[as];[0:0]scale=iw*sar:ih,setsar=1[v1];[1:0]scale=iw*sar:ih,setsar=1[v2]; [v1] [as] [v2] [1:1] concat=n=2:v=1:a=1 [v] [a]' -map '[v]'
[23:04] <spectralsun> I changed the input streams before the scale parameter
[23:05] <c_14> That works too.
[23:05] <spectralsun> now its in the correct order, but the splash plays for too long and you only see a few seconds of the video clip
[23:05] <c_14> Can you pastebin the command output?
[23:07] <spectralsun> c_14: https://dpaste.de/ucnw
[23:09] <c_14> That one's still in the wrong order, isn't it?
[23:09] <c_14> Also, you should change d=2 to d=4 since splash.mp4 is 4 seconds long.
[23:09] <spectralsun> yes, you're right
[23:09] <spectralsun> ok, I'll try that
[23:10] <c_14> You might just want to remux the splash mp4 directly with the silent audio
[23:11] <c_14> ffmpeg -i splash.mp4 -af aevaslrc=0 -c:v copy -c:a [whatever] -shortest out.mp4
[23:12] <spectralsun> I accidently made the splash 4 seconds, it really is supposed to be 2. Can I add silent audio with this command:
[23:12] <spectralsun> ffmpeg -f image2 -r 1/2 -i Downloads/nsextreme_logo.jpg -vcodec libx264 -pix_fmt yuv420p -b:v 128k ~/code/nsextreme/nsextremeweb/nsextreme/video/clips/splash.mp4
[23:13] <c_14> yeah, just add -af aevalsrc=0 -shortest
[23:14] <spectralsun> I did that, but still only seeing stream 0:0 for video
[23:15] <c_14> In splash.mp4?
[23:15] <spectralsun> Yep
[23:15] <spectralsun> ffmpeg -f image2 -r 1/2 -i Downloads/nsextreme_logo.jpg -vcodec libx264 -pix_fmt yuv420p -b:v 128k aevalsrc=0  ~/code/nsextreme/nsextremeweb/nsextreme/video/clips/splash.mp4
[23:16] <spectralsun> sorry that was an old try
[23:16] <spectralsun> it has the -af flag
[23:16] <c_14> Try using -f lavfi -i aevalsrc=0 -shortest
[23:16] <c_14> You should place that before -vcodec
[23:18] <spectralsun> okay, that worked.
[23:22] <spectralsun> Still the same result on the ouput
[23:22] <spectralsun> for the concatted file
[23:29] <voip1__> guys, please help me
[23:29] <voip1__> I have problem and i am not sure my problem related with my source or with ffmpeg parameters.
[23:29] <voip1__> When i am trying to play my source with VLC, video stops and starts. Stream source provider says on his side everything is ok, and he is able normal play with VLC
[23:29] <voip1__> Please chek: http://pastebin.com/dEmLZYEz
[23:29] <spectralsun> c_14: output.mp4 should be around 4 seconds, but ffprobe says it's 8
[23:30] <spectralsun> https://dpaste.de/kKOH
[23:30] <spectralsun> line 81 is when I do ffrobe
[23:31] <c_14> ah, the fps don't match up
[23:32] <c_14> append an ,fps=29.97 before the [v1]
[23:33] <c_14> right after the setsar=1
[23:34] <spectralsun> Okay, thats better, but the splash screen is only up for a second
[23:34] <spectralsun> the video clip plays fine after a flash of the splash screen
[23:34] <spectralsun> ffrobe reporting correct video time
[23:36] <c_14> So the splash screen shows for 1 second instead of 2?
[23:37] <spectralsun> not even a second, its just a flash of it
[23:37] <spectralsun> plays in vlc! thats a good sign
[23:38] <spectralsun> but yeah, it shows the splash for a second, then it immediately shows the first frame of the 2nd clip
[23:38] <spectralsun> during when it should be showing the splash
[23:38] <c_14> Might now why, hmmm. Recreate the splash with -r 29.97 as an output option and then run the command again without the ,fps=
[23:39] <c_14> *know
[23:41] <spectralsun> c_14: ffmpeg -f image2 -r 1/2 -i Downloads/nsextreme_logo.jpg -f lavfi -i aevalsrc=0 -shortest -vcodec libx264 -r 29.97 -pix_fmt yuv420p -b:v 128k -vf scale=568:320 ~/code/nsextreme/nsextremeweb/nsextreme/video/clips/splash568x320.mp4
[23:41] <spectralsun> I am using -r twice ?
[23:42] <c_14> Once as an input option, once as an output option.
[23:42] <spectralsun> is that correct ^?
[23:42] <c_14> should be
[23:42] <spectralsun> I used that splash output and it doesn't hang on the frame of the next video, however it still only shows the splash screen for a split second
[23:43] <c_14> the duration of the splash video is as it should be though?
[23:43] <spectralsun> no
[23:43] <spectralsun> it's just a flash of it
[23:43] <c_14> I mean the file.
[23:43] <spectralsun> then into the next clip
[23:43] <spectralsun> no
[23:43] <spectralsun> its 00:00:00.12
[23:45] <spectralsun> c_14: how do I set the length of that file? Are you sure I should be using -r twice?
[23:45] <spectralsun> I want the splah to be 2 seconds long
[23:46] <c_14> I'm testing right now.
[23:48] <spectralsun> ok
[23:51] <c_14> According to the wiki what I said _should_ work, but I found an alternative.
[23:51] <c_14> ffmpeg -loop 1 -i nsextreme_logo.jpg [foobar] -t 2 splash.mp4
[23:51] <c_14> keep the -r 29.97 as an output option
[23:52] <spectralsun> c_14: sweet, working now :)
[23:54] <spectralsun> so, this requires me to render the splash to the same size as the video I'm concatting to
[23:55] <spectralsun> if I attempt to use a larger resolution splash, I get this error again:
[23:55] <spectralsun> Input link in1:v0 parameters (size 568x320, SAR 1:1) do not match the corresponding output link in0:v0 parameters (1280x720, SAR 1:1)
[23:55] <spectralsun> is it possible to have ffmpeg resize the splash during the combining of the clips?
[23:57] <c_14> you can try activating the unsafe flag in concat
[23:57] <spectralsun> I would prefer to do it this way, since we may get new higher resolutions in the future. (as opposed to having premade splash clips at identicle expected resolutions)
[23:59] <spectralsun> c_14: I don't think that will solve my question
[23:59] <spectralsun> I want to have it convert all video streams to a common resolution, I'll be using the video clip as that resolution
[00:00] --- Tue Sep 30 2014


More information about the Ffmpeg-devel-irc mailing list