[02:37] <alsu> I have a video file which seems to have odd timing information. there are no frames between 21:21 and 34:40. playing the file with VLC correctly skips ahead in time instantly. [02:37] <alsu> is there a way I can re-process this video with ffmpeg to remove that oddity? [02:37] <alsu> preferably without re-encoding the video [02:39] <alsu> (that is, I want to collapse time, not insert still frames) [02:41] <Aprel> alsu: you could try `-acodec copy -vcodec copy`. That will simply take the file and put it in a new container. Maybe ffmpeg will be smart with the timing in the process. [02:41] <Aprel> Dunno if it will work, but might be worth a shot. [02:42] <alsu> Aprel: nope. same property in the output file [02:46] <alsu> converting to another format either keeps the artifact or inserts strange (transparent?) frames for the duration of the gap [05:16] <salamanderrake> seems like the best place to ask, what is better webm or mp4 as far as quality or are they just container? [05:31] <defaultro> hey folks, -loop_input doesn't work anymore [05:34] <defaultro> -loop 1 worked [05:38] <defaultro> what's wrong with this, it's only creating one frame? ffmpeg -i M000077.jpg -t 10 -loop 1 -r 24000/1001 -vcodec libx264 -crf 0 -preset veryslow last.mp4 [05:38] <defaultro> -t 10 from my old notes works [05:41] <defaultro> got it working: ffmpeg -loop 1 -i M000077.jpg -r 24000/1001 -vcodec libx264 -crf 0 -preset veryslow -t 10 last.mp4 [07:53] <johnny22> does ffmpeg support timed metadata frames ? [07:53] <johnny22> i basically would like to have ffmpeg create a mp4 out of 3 pipes: video, audio and data [07:57] <johnny22> not sure what type of data, maybe it's side data or metadata [08:37] <blippyp> I'm applying a filter to the same video, but I keep getting this error: "First input link top parameters (size 704x480, SAR 1:1) do not match the corresponding second input link bottom parameters (704x480, SAR 40:33)". Even though it's the same file. The filter is doing something to it or something. How can I fix this? The scale option for filtering is suppose to have a sar parameter, but when I use it, it complains that this option doe [08:38] <johnny22> is it possible to pipe a live subtitle stream as input to ffmpeg ? [08:38] <blippyp> FYI - the video is used as two input sources for the filter - I'm blending them both, one on top of the other (same file). [08:39] <blippyp> Sorry johnny22, I don't know anything about that... :( [08:40] <johnny22> m'ok [08:41] <blippyp> To help elaborate on my issue - The video was recorded on my hand-held video camera, and even though it was recorded at 16:9 at a resolution of 640x480 - if that makes any sense to anyone - but when I watch it, the video is 704x480.... [09:32] <alsu> hm, ffmpeg -i rtmp://... doesn't seem to work nearly as well as flvsteamer -r rtmp://... [09:33] <alsu> is rtmp support still maintained? [10:23] <ilmenite> what inbuilt variable is available which returns the length of the [0:v] input ? [10:25] <Mavrik> none afaik. [10:26] <ilmenite> ah, nvm, i don't actually need to specify the length. I tried my command without the -t options [10:26] <ilmenite> option* [16:59] <blippyp> when doing any overlay with an alpha layer, there is a 'blending' effect that happens to the transparent areas - anyone know how to prevent this 'blending' and instead be completely transparent? [17:00] <Fjorgynn> thank you [17:00] <Fjorgynn> blippyp: blending? [17:00] <blippyp> I'm using alphamerge/alphaextract... [17:01] <blippyp> when I add the alpha image to a background, the 'transparent areas' have a blending effect - I'm doing a overlay filter... [17:03] <blippyp> ffmpeg -i $backdrop -map 0:1 -i $backdrop -vf "movie=tmpCamera.mov, scale=$cameraX:$cameraY [vid2]; [in][vid2] overlay=$cx:$cy" -c:v libx264 -crf 17 -preset ultrafast -to $testTime -c:a ac3 $base [17:04] <blippyp> that's the final overlay command that I'm using - The alpha transparency is working, except the transparent edges aren't 'completely' transparent... [17:17] <blippyp> fixed it: http://ffmpeg.org/pipermail/ffmpeg-user/2013-April/014562.html [19:16] <Ener2> hello, how do I scale a video with ffmpeg, if video has two streams and I want to scale both? [19:19] <blippyp> Ener2: Not sure, my guess would be to use the -vf (scale) option... You will likely need to map the video streams [19:19] <Ener2> I tried something like this: [19:19] <Ener2> ffmpeg -i HNI_0020.avi -map 0:0 -map 0:1 -map 0:2 -s 480x240 -acodec copy output.avi [19:20] <Ener2> but alas it has only one stream included [19:20] <Ener2> and it even changed the video codec... [19:20] <JEEB> unspecified = container-specific default that can be pretty much anything [19:21] <JEEB> also you can't scale without re-encoding, just FYI [19:21] <Ener2> I dont mind reencoding [19:22] <Ener2> also it seems to be missing audio stream even though it is mapped... [19:24] <blippyp> This is suppose to work: ffmpeg -i input1 -i input2 -c copy -map 0 -map 1 output.mkv - Change your containers [19:24] <Ener2> blippyp: but I have only one source [19:26] <blippyp> I just did it and it worked... [19:26] <Ener2> huh? [19:27] <Ener2> you have two inputs in your command, I have only one input video containing three streams, audio which I want to copy and two video streams which I want to scale... [19:27] <blippyp> do this: ffmpeg -i HNI_0020.avi -copy -map 0:0 -map 0:0 -map 0:1 out.mkv (this should duplicate your video stream twice and add the audio as well I believe) [19:28] <Ener2> unrecognized option copy [19:28] <Ener2> but again, I dont want to duplicate stream [19:30] <blippyp> then what do you want exactly - because your previous command suggest that... [19:30] <Ener2> I have a video [19:30] <Ener2> it has one audio stream and two different video streams [19:30] <Ener2> (it is a 3D video) [19:30] <Ener2> what I want is to scale both videos to 480x240 [19:31] <Ener2> because now they are 800x240 [19:31] <blippyp> k - hold on... [19:31] <Ener2> sure [19:33] <blippyp> k - I just did this and it worked: ffmpeg -i in.avi -map 0:0 -map 0:1 -map 0:2 -s 480x240 out.avi [19:33] <Ener2> blippyp: it does, but it changes the codec... [19:33] <blippyp> basically, exactly what you said previously... [19:34] <blippyp> it worked for me fine [19:34] <Ener2> it changes codec for me [19:34] <blippyp> (i forgot to included the -c:a copy in my example - I used it when I tested it... [19:34] <blippyp> yes it has to [19:34] <Ener2> why? [19:34] <blippyp> or at least, re-encode it - because you changed the video size [19:34] <Ener2> sure but reencode to same codec... [19:35] <blippyp> doesn't matter, it's not a copy [19:35] <Ener2> http://pastebin.com/5rzjLrZp [19:35] <blippyp> it has to re-encode it [19:35] <Ener2> well codec matters to me otherwise video will be unplayable on the device [19:35] <blippyp> then you have to re-encode them [19:35] <Ener2> ugh three reencodes will make video ... unwatchable... [19:36] <Ener2> cant I specify which codecs? [19:36] <Ener2> to use [19:36] <JEEB> yes [19:36] <blippyp> yes [19:36] <blippyp> c:v libx264 will encode in x264 [19:36] <JEEB> s/in x264/in H.264/ [19:36] <Ener2> hmm [19:37] <Ener2> there is no codec mjpeg/mjpg... [19:37] <blippyp> type ffmpeg -codecs to see a list of codecs you can use [19:37] <blippyp> yes there is - it's mjpeg I believe [19:37] <blippyp> Hmm, maybe not - I thought for sure I read about that being one... [19:38] <Ener2> [NULL @ 04d601c0] Unable to find a suitable output format for 'mjepg' mjepg: Invalid argument [19:38] <Ener2> err [19:38] <Ener2> this [19:38] <Ener2> NULL @ 04d201c0] Unable to find a suitable output format for 'mjpeg' jpeg: Invalid argument [19:38] <blippyp> Maybe you have to re-compile ffmpeg to get mjepg working... I'm sure I read about it working... You probably just need to include it.... [19:39] <JEEB> wat [19:39] <JEEB> Ener2, pastebin your full command line and output and link here [19:39] <Ener2> d:\export>ffmpeg -i HNI_0020.avi -map 0:0 -map 0:1 -map 0:2 -s 480x240 -c:a -c:v mjpeg out.avi [19:39] <Ener2> sure [19:39] <JEEB> uhh [19:39] <JEEB> see -c:a and -c:v right after it [19:39] <Ener2> http://pastebin.com/gAGf0EFs [19:40] <Ener2> hmm [19:40] <JEEB> -c:a copy -c:v mjpeg maybe? :P [19:40] <Ener2> hmm [19:40] <Ener2> okay seems to be reencoding but [19:40] <Ener2> I get this error: [19:40] <Ener2> [avi @ 048ef420] Non-monotonous DTS in output stream 0:1; previous: 1485, curren [19:40] <Ener2> t: 492; changing to 1486. This may result in incorrect timestamps in the output [19:40] <Ener2> file. [19:41] <Ener2> and no audio stream at all [19:41] <Ener2> video streams are fine though [19:41] <JEEB> once more pastebin kthx [19:41] <Ener2> uhh I will try to catch it [19:42] <JEEB> just push stdout and stderr to a file [19:42] <JEEB> Ener2, http://stackoverflow.com/questions/1420965/redirect-stdout-and-stderr-to-a-s... [19:42] <Ener2> god knows how you do it in windows [19:42] <Ener2> ah okay thanks [19:43] <blippyp> got it working - I see what you did wrong - include an audio encoder [19:43] <blippyp> you didn't in your example... [19:43] <JEEB> I think we're like a mile past that :P [19:43] <blippyp> ffmpeg -i video.avi -c:a ac3 -c:v mjpeg out.avi [19:43] <Ener2> I would need [19:43] <Ener2> adpcm_ima_wav [19:44] <Ener2> to be specific [19:44] <Ener2> adpcm_ima_wav ([17][0][0][0] / 0x0011), 48000 Hz, stereo [19:44] <JEEB> which is -c:a copy [19:44] <Ener2> which gives that error... [19:44] <JEEB> thus, pastebin pl0x [19:45] <Ener2> http://pastebin.com/QcfLJ3by [19:45] <Ener2> stdout [19:45] <JEEB> well yeah [19:45] <JEEB> just use what I linked [19:45] <JEEB> :P [19:45] <JEEB> because ffmpeg outputs most stuff to stderr [19:45] <Ener2> that is what I used... [19:46] <JEEB> and if you got your warnings during encoding why did you exit when it asked about overwriting... -__ [19:46] <Ener2> d:\export>ffmpeg -i HNI_0020.avi -map 0:0 -map 0:1 -map 0:2 -s 480x240 -c:a copy [19:46] <Ener2> -c:v mjpeg out.avi > a.txt 2>&1 [19:46] <JEEB> how am I supposed to help you for eff's sake [19:46] <JEEB> ok, so you had stdout and -err there [19:46] <Ener2> hmm well I am not sure when to exit actually [19:46] <Ener2> I just exit after some delay [19:46] <Ener2> but I guess I have to put in "y", sorry [19:47] <Ener2> JEEB:http://pastebin.com/3HpCnnLt [19:47] <JEEB> ok [19:48] <Ener2> also I dont like those changes between reencodings [19:48] <Ener2> like SAR DAR for mjpegs....H [19:48] <Ener2> but might not be fatal for playback I suppose [19:48] <JEEB> well [19:48] <JEEB> you changed the aspect ratio of the picture [19:48] <Ener2> okay [19:48] <JEEB> thus the metadata will have to change as well [19:49] <JEEB> that tells it to keep the original ratio [19:49] <JEEB> naturally, with avi most things don't read that stuff from the video stream :P [19:49] <Ener2> also video quality is horrible [19:49] <JEEB> welcome to ffmpeg defaults [19:50] <Ener2> along with no sound stream [19:50] <JEEB> also those messages pretty much mean that the decoding timestamps (DTS) of the audio stream are somehow wonky o_O [19:50] <Ener2> video has only 20fps though [19:50] <Ener2> maybe that can throw it off? [19:50] <JEEB> I see it writing the audio tho [19:50] <Ener2> yeah but media player sees no audio stream [19:50] <JEEB> audio:2462kB [19:50] <Ener2> Video: MJPG 480x240 20.00fps [Stream 00] [19:50] <Ener2> Video: MJPG 480x240 20.00fps [Stream 02] [19:51] <JEEB> I think AVI had per-stream info for that [19:51] <JEEB> so no, the frame rate shouldn't really matter [19:51] <JEEB> it's a per-stream thing [19:51] <Ener2> original file: [19:51] <Ener2> Video: MJPG 800x240 20.00fps [Stream 00] [19:51] <Ener2> Video: MJPG 800x240 20.00fps [Stream 02] [19:51] <Ener2> Audio: IMA ADPCM 48000Hz stereo 128kbps [Stream 01] [19:51] <JEEB> also if you want to make sure random players can handle it, I recommend you take it through virtualdub with copying audio and video [19:51] <JEEB> that muxes in a way that MS things generally like [19:52] <Ener2> actually it is for 3DS ... [19:52] <Ener2> but I encoded original, which I already deleted to wrong size... [19:52] <Ener2> thus the need for scale [19:53] <JEEB> anyways, can't really say more about why the audio is wonky, and if it's an ffmpeg bug, or if it's something else [19:53] <JEEB> you're in general doing it all right command-line wise [19:56] <JEEB> but it most definitely is writing the audio stream there :) [19:56] <Ener2> :( [19:56] <Ener2> cat hear anything though [19:56] <JEEB> so do see what remuxing that with vdub + audio and video set to copy does [19:57] <JEEB> what did you create that thing you're inputting with btw? [19:57] <JEEB> ffmpeg or something else? [19:57] <JEEB> as in, should ffmpeg's avi output work as is on that nintendo thing? [19:57] <Ener2> well it should [19:57] <Ener2> I found a website with ffmpeg commands [19:58] <Ener2> and it was fine except they had wrong resolution... [19:58] <JEEB> funky [19:58] <Ener2> https://javaz.org/2011/12/ffmpeg-convert-3d-video-for-nintendo-3ds/ [19:58] <JEEB> might want to report it over at the trac then I guess? [19:58] <JEEB> with a sample that creates those DTS messages when you read it in and try to copy the audio [20:00] <blippyp> do you guys have any experiene with alphamerge dropping frames - do you know any possible fixes? like switching to a different codec maybe? I'm usuing qtrle in a mov container currently, and it keeps dropping frames and messing up my final video... [20:03] <blippyp> my only current solution at this time is to record a longer video sequence for that section and then re-encode when I'm done specifying a time before the video freezes, everything looks fine in the video, but that section just 'freezes' after a while... [20:42] <alsu> can I overwrite the timecode in a file? [20:43] <alsu> I think the timecode in this represents the live stream, but I tuned in about 3 hours in, so it thinks 3 hours of video is missing :/ [23:06] <Aprel> hi is there anyway to truncate an audio/video file in ffmpeg without de/reencoding it? [23:07] <durandal_1707> Aprel: yes, not that you can truncate audio packets only not exact samples [23:07] <durandal_1707> *note [23:07] <Aprel> for ex: if I have a 4-hour aac-encoded mp4 file, and I'm only interested in the last hour, can I do that? [23:08] <Aprel> durandal_1707: do you know the command? [23:08] <Mavrik> use "copy" as codec. [23:09] <Aprel> Mavrik: okay, then how do I specify to ffmpeg with portion of the file to cut out? [23:09] <Aprel> ^what [23:11] <Aprel> Okay, I'll check the docs, but is there a term I can search for for what I want to do? I didn't get far on google because 'cropping' seems to mean to cut out pixels, not frames. What is cutting frames called? [00:00] --- Mon Jul 29 2013
participants (1)
-
burek