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

burek burek021 at gmail.com
Sat Jul 16 02:05:01 CEST 2016


[00:11:55 CEST] <zhanshan> any screen capture command line professionals awake?
[01:30:19 CEST] <DHE> zhanshan: just say what you need
[01:30:58 CEST] <medya> I am currently using ffmpeg to conver AVI to MP4. I pass some random video codec stuff to it, and I am not happy with the quality, I have some mp4 videos with better quality and less size, is there any way to copy their Video Codec measurements ?
[01:31:22 CEST] <medya> currently I am using   ffmpeg -i $file -acodec libfaac -b:a 128k -vcodec mpeg4 -b:v 2500k -flags +aic+mv4
[01:31:37 CEST] <medya> is there a way to replace 128K and 2500K with exact numbers of another video file
[01:31:46 CEST] <medya> or copy another video files exact format and preset ?
[01:32:11 CEST] <DHE> mpeg4 is old. why not h264?
[01:32:36 CEST] <DHE> you need a build of ffmpeg with libx264, but that's pretty common
[01:37:00 CEST] <medya> DHE I am open to suggestion can you give me a command to convert my AVI files to a modern format
[01:37:15 CEST] <medya> @DHE how many parameters are there to be passed
[01:45:17 CEST] <c_14> medya: https://trac.ffmpeg.org/wiki/Encode/H.264 https://trac.ffmpeg.org/wiki/Encode/AAC
[01:46:29 CEST] <medya> can u give it to me in one command
[01:46:40 CEST] <medya> it confuses me when I have to decide both video and audio stuff
[01:46:51 CEST] <c_14> what audio codec is your input?
[01:46:56 CEST] <medya> I dont care
[01:47:00 CEST] <medya> just a normal one
[01:47:10 CEST] <medya> like a old digital camera
[01:47:15 CEST] <medya> how can I find out
[01:47:53 CEST] <c_14> ffmpeg -i file -c:v libx264 -crf 23 -c:a aac -b:a 260k out.mp4
[01:47:55 CEST] <c_14> you can use that
[01:48:02 CEST] <medya> thanks
[01:48:07 CEST] <medya> those colons in the options scare me
[01:48:13 CEST] <medya> what does c:v or b:a mean
[01:48:24 CEST] <medya> I never seen a linux command option with colon in it
[01:48:28 CEST] <c_14> If your input is aac or mp3 (check with ffprobe) you can use -c:a copy to spare the conversion
[01:48:41 CEST] <catchin> medya: https://trac.ffmpeg.org/wiki/Encode/MP3
[01:48:43 CEST] <c_14> -c is short for -codec :a selects applies the option to audio streams
[01:48:46 CEST] <c_14> :v applies it to video streams
[01:49:04 CEST] <medya> why there is a colon
[01:49:25 CEST] <medya> what does 260K represent
[01:49:32 CEST] <medya> if I lower than number my file will be smaller?
[01:49:55 CEST] <c_14> ffmpeg has a (rather complex) stream selection system that uses colons https://ffmpeg.org/ffmpeg.html#Stream-specifiers-1 , that syntax gets applied everywhere
[01:49:56 CEST] <medya> and what does crf mean
[01:50:01 CEST] <c_14> 260k is the bitrate of the audio stream
[01:50:14 CEST] <c_14> Lowering it will make the output smaller (though at that bitrate audio won't eat that much)
[01:50:29 CEST] <c_14> crf is short for constant rate factor and is the quality knob for libx264
[01:50:42 CEST] <c_14> higher is lower quality, lower is better quality
[01:50:43 CEST] <medya> so crf maens 23 frames per second?
[01:51:17 CEST] <c_14> no
[01:51:35 CEST] <c_14> It's a quality knob
[01:51:54 CEST] <c_14> It affects the size of the output video
[01:52:00 CEST] <medya> I see.
[01:52:30 CEST] <medya> is there a way to copy exact v:c and a:c of another video
[01:52:58 CEST] <c_14> not unless it's written into the metadata of the input video
[01:53:57 CEST] <medya> I did ffmpeg -i on a video which I like its quality and gives me this :   Metadata:     major_brand     : isom     minor_version   : 512     compatible_brands: isomiso2avc1mp41     encoder         : Lavf56.25.101   Duration: 00:02:00.01, start: 0.000000, bitrate: 2134 kb/s     Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 2132 kb/s, 30 fps, 30 tbr, 1200k tbn, 60 tbc (default)     Metadata:
[01:54:07 CEST] <medya> can I steal this exact format
[01:56:43 CEST] <c_14> not unless the video was encoded at constant bitrate
[01:56:54 CEST] <c_14> using a crf around 23 will most of the time do what you want
[01:57:16 CEST] <medya> ok thank you so much
[01:57:56 CEST] <medya> another question, is there any way to make timelapse video out of a long video, like if you have 1 hour long, can you make a 1 minute long fast video out of it
[02:01:15 CEST] <c_14> ffmpeg -i video -vf setpts=PTS/60,fps=30 out.mkv
[02:01:59 CEST] <medya> why this one is mkv instead of mp4?
[02:02:05 CEST] <c_14> doesn't matter
[02:02:07 CEST] <c_14> I just always use mkv
[02:02:08 CEST] <medya> what is -vf do
[02:02:15 CEST] <c_14> specifies video filters
[02:02:25 CEST] <medya> what is the video filter in this case
[02:02:57 CEST] <c_14> setpts takes the timestamps of the input video and divides them by 60 (makes the video 60 times faster so that 1 hour fits in 1 minute), the fps filter then drops frames
[02:04:37 CEST] <medya> makes sense, and why did you have to add fps=30
[02:04:43 CEST] <medya> how does that option help
[02:05:59 CEST] <c_14> the fps filter drops frames, otherwise you'd still have all the frames just with very small delays between them and the output would be unnecessarily large and most of the frames would be dropped on display anyway
[02:06:31 CEST] <medya> so the video would not be 1 minute it will be 10 hours ?
[02:06:38 CEST] <medya> like opposite of shorteninig it
[02:06:40 CEST] <medya> right?
[02:06:51 CEST] <medya> is there a place to see list of all the video filters
[02:08:16 CEST] <c_14> no, it'd be 1 minute. You know those flip picture books? It'd be like taking a really thick one of those and getting rid of pages you wouldn't be able to see anyway because they're flipping by too fast
[02:08:19 CEST] <c_14> https://ffmpeg.org/ffmpeg-filters.html
[02:08:24 CEST] <c_14> ^has all the filters and what they do
[02:08:31 CEST] <medya> thank you so much
[02:08:36 CEST] <medya> I feel so much better now
[02:08:39 CEST] <medya> that I undrestand it
[02:08:58 CEST] <medya> do you know if I can combine 3 videos into one big video?
[02:09:07 CEST] <medya> like add them one after another in one video
[02:09:18 CEST] <c_14> yep https://trac.ffmpeg.org/wiki/Concatenate
[02:12:01 CEST] <medya> c_14++
[02:13:42 CEST] <medya> c_14 why I cant find stepts in https://ffmpeg.org/ffmpeg-filters.html
[02:13:58 CEST] <c_14> https://ffmpeg.org/ffmpeg-filters.html#setpts_002c-asetpts
[02:14:01 CEST] <c_14> It's right there
[02:14:50 CEST] <medya> ah you are right, its weird chrome's Ctrl+F doesnt work for stepts
[02:15:07 CEST] <c_14> setpts?
[02:15:09 CEST] <c_14> one t too many
[02:15:38 CEST] <medya> oops
[02:15:51 CEST] <medya> you are right :) sorry typo
[02:15:54 CEST] <medya> now it works
[02:19:04 CEST] <medya> is there a way to get the embeded subtitle in mp4 file exported to a text file
[02:19:16 CEST] <c_14> ffmpeg -i mpv out.srt
[02:19:22 CEST] <c_14> s/mpv/mp4/
[02:19:29 CEST] <thebombzen_> medya: you could try ffmpeg -i input.mp4 -map 0:s out.srt
[02:19:39 CEST] <thebombzen_> actually you don't even need -map 0:s scratch that
[02:19:56 CEST] <medya> c14 so ffmpeg is smart enoguh if I make the extension srt it will make it subtitle?
[02:20:04 CEST] <c_14> yes
[02:20:08 CEST] <medya> sweeet !
[02:21:16 CEST] <medya> how can I cut the first 10 minute of a video of 30 minute. ( I only care the first 10 miute I dont want the rest)
[02:21:39 CEST] <c_14> ffmpeg -i video -c copy -t 10:00 out.mkv
[02:22:52 CEST] <medya> wow c_14 you are like a ffmpeg nina
[02:22:56 CEST] <medya> ninja*
[02:23:00 CEST] <medya> you should write a book about it
[02:23:28 CEST] <medya> how can I get what is the current length of a video
[02:23:42 CEST] <c_14> use ffprobe and check the duration tag
[02:24:01 CEST] <klaxa> what's non-current lenght of a video? :^)
[02:24:08 CEST] <klaxa> *length
[02:24:28 CEST] <c_14> klaxa: you know, those videos that change length depending on the phase of the moon
[02:24:35 CEST] <klaxa> oic
[02:25:02 CEST] <klaxa> like those videos that are stored are 23.976 fps but are played back at 25 fps
[02:25:29 CEST] <klaxa> th-thanks differing national standards
[02:25:47 CEST] <klaxa> television is a silly thing
[02:31:01 CEST] <thebombzen_> medya: you could use ffprobe to doublecheck the duration. if you want you coudl use "ffprobe input_file -show_format | grep duration"
[02:31:13 CEST] <thebombzen_> there's some syntax to take it directly. I don't know what it is tho so I use grep
[02:31:21 CEST] <thebombzen_> I wonder if if c_14 knows
[02:32:37 CEST] <c_14> ffprobe input_file -show_entries format=duration
[02:32:57 CEST] <c_14> -loglevel quiet -of flat
[02:34:35 CEST] <klaxa> fucking lexicon. train a network
[02:34:57 CEST] <klaxa> might not be a bad idea actually
[02:35:14 CEST] <klaxa> https://xkcd.com/810/
[02:37:04 CEST] <thebombzen> haha klaxa today I signed up for the arch forums
[02:37:31 CEST] <thebombzen> the captcha was "what is the output of date +%V$(uname)|sha1sum" or something like that
[02:37:40 CEST] <thebombzen> imagine if a bot could answer that question
[02:38:17 CEST] <c_14> Well it could, at least until someone invents a captcha that tries installing a rootkit
[02:39:12 CEST] <klaxa> (Robots: no sandboxes!)
[02:41:06 CEST] <medya> c_14 thanks this command looks like a charm ffprobe inputfile.mp4 -show_entries format=duration -v quiet| grep "duration"
[02:44:57 CEST] <thebombzen> does anyone know if ffmpeg supports libdaala? I can't find it in ./configure but that doesn't mean there's no way to do it
[02:45:13 CEST] <c_14> not yet
[02:45:40 CEST] <c_14> atomnuker was working on a decoder a while back afaik, not sure how far that got
[02:46:24 CEST] <thebombzen> well I definitely feel like libdaala codec in libavcodec would be easier than writing a native decoder.
[02:46:39 CEST] <thebombzen> it doesn't quite seem worth it to write a native decoder because the bitstream format isn't frozen
[02:46:57 CEST] <c_14> yeah, it was mostly just an experiment/base to work on
[02:50:32 CEST] <medya> c_14 when you said to make a time lapse ffmpeg -i video -vf setpts=PTS/60,fps=30 out.mkv
[02:50:44 CEST] <medya> if I wanna make my time lapse 6 seconds how do I change the number
[02:50:53 CEST] <medya> do I just change PTS/6 and not touch fps?
[02:51:24 CEST] <c_14> if the input is 1 hour long it would be PTS/600
[02:51:39 CEST] <medya> ok the PTS is the only thing will change
[02:52:12 CEST] <c_14> yep
[02:52:16 CEST] <medya> gtocha thanks
[02:53:30 CEST] <c_14> It's basically input_time/x = length_you_want
[02:55:02 CEST] <medya> so what is mkv and why do you use that ? if you name the output file exention mkv, will ffmpeg automaticly put some default format and codec for me
[02:55:47 CEST] <c_14> mkv is matroska, I use it because it supports basically every codec under the sun and isn't quite as braindead as mp4 in certain things
[02:56:04 CEST] <c_14> It will choose default codecs if you don't specify any on the commandline (but afair those should be the same as for mp4)
[02:57:23 CEST] <medya> cool, is there a way to make the setpts smarter, like if there 1 hour of video and first 20 minute is not much movement, dont use that one, and only put frames with more movement ?
[02:57:44 CEST] <medya> like choose the frames with more contrast and change with other frames
[02:57:56 CEST] <c_14> setpts doesn't have motion detection or anything like that, you can use the select filter with the scene variable
[02:58:26 CEST] <medya> so there is already a motion detector filter embeded ?
[02:58:59 CEST] <c_14> It's not motion detection
[02:59:11 CEST] <c_14> It's basic scene detection, i.e. how much changes between frames
[02:59:44 CEST] <medya> so do you happen to know how it would be in one command
[03:01:19 CEST] <c_14> something like -vf select='gt(scene\,0.2)',fps=30
[03:01:27 CEST] <c_14> you'll probably have to play around with that though
[03:06:07 CEST] <medya> so I add -vf select='gt(scene\,0.2)' to the already setps?
[03:06:20 CEST] <c_14> nah, without the setpts
[03:06:35 CEST] <medya> like this?  ffmpeg -i videofile -vf select='gt(scene\,0.2)' -vf setpts=PTS/60,fps=30 out.mkv
[03:06:50 CEST] <medya> but how would the scence0.2 know to make 6 secnds
[03:06:55 CEST] <medya> I want one hour in 6 seconds
[03:11:54 CEST] <c_14> That's the issue, the select filter will drop all frames that don't match that. What you could do is add a minimum/maximum to the select like -vf select='gt(scene\,0.2)*gt(prev_selected_t\,0.001)+lt(prev_selected_t\,0.002)'
[03:12:00 CEST] <c_14> that should work
[03:12:05 CEST] <c_14> assuming my math didn't go bonkers
[03:15:03 CEST] <c_14> you can adjust the time values if you want
[03:15:28 CEST] <c_14> eh, I think my math might be wrong
[03:15:31 CEST] <medya> what do those numbers means, which ones are time values
[03:15:46 CEST] <medya> what is 0.2 what is 0.001 .... what is gt what is lt
[03:15:53 CEST] <c_14> The 0.001 should be ~550 and the 0.002 650 or so
[03:16:29 CEST] <c_14> The 0.2 (for the scene) is a value between 0 and 1 which determines the likelihood that this frame begins a new scene 0 being very unlikely and 1 being very likely
[03:16:46 CEST] <c_14> The gt prev_selected number is at least how many seconds to space frames apart
[03:17:00 CEST] <c_14> The lt prev_selected number is the maximum distance between two frames
[03:17:54 CEST] <c_14> So it should try and select frames that start new scenes, but will make sure that the whole video is on average the length you want
[03:40:33 CEST] <medya> sorry c_14 my comperut froze, is there a way to make ffmpeg not to use 100% of my cpu ?
[03:40:59 CEST] <c_14> you can set -threads
[03:41:05 CEST] <DHE> most people want it to so processing is done as fast as possible.
[03:41:11 CEST] <c_14> if you're on a unix system you can set the niceness
[03:41:18 CEST] <medya> I am on ubuntu
[03:41:26 CEST] <medya> how can I set niceness or -threads
[03:41:29 CEST] <DHE> prefixing the command with "nice" will run at reduce priority
[03:41:37 CEST] <medya> oh
[03:41:38 CEST] <medya> cool
[03:41:53 CEST] <DHE> still uses 100% CPU, but will yield to other applications more
[03:44:13 CEST] <medya> @c_14 so you were saying -vf select='gt(scene\,0.2)*gt(prev_selected_t\,0.001)+lt(prev_selected_t\,0.002)'   The 0.001 should be ~550 and the 0.002 650 or so
[03:44:21 CEST] <medya> what did you mean The 0.001 should be ~550 and the 0.002 650 or so
[03:44:54 CEST] <c_14> -vf select='gt(scene\,0.2)*gt(prev_selected_t\,550)+lt(prev_selected_t\,650)'
[03:45:12 CEST] <medya> what does 550 and 650 do for me
[03:45:31 CEST] <c_14> minimum and maximum distance between frames in seconds
[04:09:32 CEST] <medya> and 0.2 is ?
[04:09:46 CEST] <medya> and how would I make sure 1 hour video becomes 6 second
[04:09:47 CEST] <medya> or 10 second
[04:09:54 CEST] <medya> how would I adjust the gt and lt
[04:09:59 CEST] <medya> to make whatever length I want
[04:11:27 CEST] <c_14> original_length / wanted_length = x  (in seconds)
[04:11:31 CEST] <c_14> then just adjust up and down
[04:12:44 CEST] <medya> so I put x for gt  and then I add x+a small number for lt ?
[04:13:00 CEST] <c_14> x-a for gt and x+a for lt
[04:14:35 CEST] <klaxa> c_14: say, how did we fail the written math exams again? :/
[04:16:38 CEST] <c_14> wrong questions
[04:17:12 CEST] <klaxa> yeah probably
[04:24:35 CEST] <thebombzen> how do I do a transcode without mapping any metadata?
[04:24:43 CEST] <c_14> -map_metadata -1
[04:24:48 CEST] <thebombzen> oh thanks
[04:28:38 CEST] <medya> c_14 in what does * do in the command you gave me "-vf select='gt(scene\,0.2)*gt(prev_selected_t\,550)+lt(prev_selected_t\,650)'"
[04:30:15 CEST] <c_14> * is the equivalent of an AND and + is the equivalent of an OR
[04:30:46 CEST] <c_14> logical AND and logical OR
[04:31:35 CEST] <medya> c_14 I did this command and the output has 0KB video 24169KB of audio
[04:31:39 CEST] <medya>  ffmpeg -i output.mp4 -vf select='gt(scene\,0.2)*gt(prev_selected_t\,294)+lt(prev_selected_t\,314)' output_fast_scene.mp4
[04:31:45 CEST] <medya> frame=    0 fps=0.0 q=0.0 Lsize=   24751kB time=02:34:40.72 bitrate=  21.8kbits/s     video:0kB audio:24169kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.407669%
[04:31:51 CEST] <medya> and when I play it has no video
[04:37:07 CEST] <c_14> eh, duh
[04:37:15 CEST] <c_14> I can't and with prev_selected_t if I never select anything
[04:39:47 CEST] <medya> what do you mean
[04:50:08 CEST] <c_14> Ok
[04:50:10 CEST] <c_14> -vf select='eq(n\,0)+(gt(scene\,0.2)*gt(t\,prev_selected_t+294))+gt(t\,prev_selected_t+314)',setpts=PTS/600
[04:50:13 CEST] <c_14> should work
[04:50:28 CEST] <c_14> you might have to change the 600
[04:50:37 CEST] <c_14> and you'll also need to speed up the audio
[04:51:04 CEST] <c_14> or get rid of it entirely
[04:53:52 CEST] <c_14> had to change a few things
[05:00:37 CEST] <medya> how can I get rid of the audio entirely?
[05:00:41 CEST] <c_14> -an
[05:00:53 CEST] <medya> should I add -an in the end
[05:01:53 CEST] <c_14> Somewhere before the output filename and after the input filename
[05:11:05 CEST] <medya> c_14 the last command you gave me is producing 0 frames
[05:11:07 CEST] <medya> Press [q] to stop, [?] for help frame=    0 fps=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A
[05:12:32 CEST] <c_14> It's working for me, and it should definitely produce at least 1 frame
[05:12:39 CEST] <c_14> What's your complete command look like?
[05:12:58 CEST] <medya>  ffmpeg -i output.mp4 -vf select='gt(scene\,0.2)*gt(prev_selected_t\,294)+lt(prev_selected_t\,314)' -an output_fast_scene.mp4
[05:13:36 CEST] <c_14> That's not the last one I gave you
[05:13:38 CEST] <medya> oops it seems like I forgot the last part
[05:13:39 CEST] <medya> sorry
[05:13:40 CEST] <c_14> I gave you ffmpeg -i video -vf select='eq(n\,0)+(gt(scene\,0.2)*gt(t\,prev_selected_t+294))+gt(t\,prev_selected_t+314)',setpts=PTS/600 -an out.mkv
[05:13:42 CEST] <medya> my bad
[05:15:47 CEST] <medya> ok that command now has made a file with 885 bytes in it, and it is not increasing (like old ones that kept increasing)
[05:16:10 CEST] <c_14> might take a while
[05:16:13 CEST] <medya> and the frame status is increasing one by one very slowly
[05:16:14 CEST] <medya> frame=    7 fps=0.1 q=0.0 size=       1kB time=00:00:00.00 bitrate=N/A
[05:16:24 CEST] <medya> it says the bitrate is N/A
[05:16:59 CEST] <c_14> hmm, time bitrate and speed should all have values
[05:17:22 CEST] <medya> yeah it keeps saying 000000 and n/a
[05:17:24 CEST] <medya> for those values
[05:17:43 CEST] <c_14> try replacing 294 with 9 and 314 with 11
[05:17:49 CEST] <medya> ok
[05:19:08 CEST] <medya> still no bitrare
[05:19:39 CEST] <medya> but frames are going faster
[05:19:44 CEST] <c_14> hmm
[05:19:47 CEST] <c_14> try waiting for it to finish
[05:19:59 CEST] <medya> it will be a long wait, it is a longer video
[05:20:06 CEST] <medya> this one has a new thing called drop
[05:20:12 CEST] <medya> and it keeps increasing
[05:20:19 CEST] <c_14> rapidly?
[05:20:22 CEST] <medya> like drop=38.. (and countruing
[05:20:24 CEST] <medya> counting)
[05:20:34 CEST] <medya> yeah like 3 increase per second
[05:20:41 CEST] <c_14> that's a bit too fast
[05:20:43 CEST] <medya> right now drop is 75
[05:20:54 CEST] <medya> now it is 85
[05:21:04 CEST] <medya> and dup is constant 0
[05:21:14 CEST] <medya> bitrate still n/a
[05:21:24 CEST] <c_14> is frame= greater than drop?
[05:21:33 CEST] <medya> no
[05:21:34 CEST] <medya> frame is 47
[05:21:38 CEST] <medya> drop is 127
[05:21:43 CEST] <c_14> what's your current command?
[05:21:57 CEST] <medya> ffmpeg -i output.mp4 -vf select='eq(n\,0)+(gt(scene\,0.2)*gt(t\,prev_selected_t+9))+gt(t\,prev_selected_t+11)',setpts=PTS/600 -an out.mkv
[05:22:55 CEST] <c_14> maybe try getting rid of the setpts part
[05:23:03 CEST] <c_14> to see if that changes anything
[05:23:06 CEST] <medya> but it seemed it like that command hand generated a good a few seconds of time lapse after I killed it (the last one)
[05:23:10 CEST] <medya> ok
[05:23:25 CEST] <c_14> yeah, it should work but it also shouldn't be dropping that many frames
[05:23:50 CEST] <medya> ok without setps there is no drop
[05:24:12 CEST] <medya> and the output file is increasing
[05:24:13 CEST] <medya> which is good
[05:24:39 CEST] <medya> so 9 and 11 means.... there should be no longer than 9 or 11 seconds difference between each two frame?
[05:24:52 CEST] <c_14> yes
[05:25:16 CEST] <c_14> how long is the input video and how long do you want the output to be?
[05:25:48 CEST] <c_14> Because you're going to need the setpts filter, but maybe 600 was too high
[05:26:27 CEST] <medya> duration=18280 I want it to be like 60 seconds
[05:27:05 CEST] <c_14> try adding ,setpts=PTS/300
[05:27:38 CEST] <medya> ok
[05:28:36 CEST] <medya> frame=   34 fps=0.9 q=0.0 size=       1kB time=00:00:00.00 bitrate=N/A dup=0 drop=24
[05:29:03 CEST] <medya> ok now it has a bitrate
[05:30:28 CEST] <medya> how can I see a the real duration of a time elapsed video, if I do the ffprobe it will tell the big number before being shortened
[05:34:34 CEST] <c_14> Does the input video have subtitles?
[05:34:48 CEST] <medya> no
[05:34:51 CEST] <c_14> If there's any other track in the video that isn't being shortened it'll show that duration
[05:35:17 CEST] <medya> oh
[05:35:26 CEST] <medya> how can we short the subtitle also
[05:35:35 CEST] <medya> shorten*
[05:36:12 CEST] <c_14> eh, in this case it's probably better to just get rid of them. They wouldn't make sense on the shortened video anyway
[05:36:40 CEST] <c_14> you can use -sn to get rid of them
[05:38:02 CEST] <medya> so anything we dont want we add -n to it
[05:38:05 CEST] <medya> -an -sn
[05:38:08 CEST] <c_14> ye
[05:38:11 CEST] <medya> what else is out there other than a and s
[05:38:22 CEST] <c_14> v and d -dn -vn
[05:38:29 CEST] <medya> what is d
[05:38:35 CEST] <c_14> data
[05:38:45 CEST] <medya> there are videos with data?
[05:38:57 CEST] <medya> does it mean like metadata  like author ...stuff ?
[05:39:04 CEST] <c_14> data is basically anything ffmpeg can't decode
[05:40:33 CEST] <medya> you are very knwoldgeable and helpful
[05:40:37 CEST] <medya> do you have a github page
[05:41:51 CEST] <c_14> I do, but I only really have a couple of forks of things I played around with on it
[05:42:45 CEST] <medya> can I follow you there
[05:43:04 CEST] <medya> btw the last time lapse command you gave me worked like a charm in the end I saw this warning in orange
[05:43:05 CEST] <medya>  Delayed frames seen. Reenabling low delay requires a codec flush.p=0 drop=633
[05:43:08 CEST] <medya> what does that mean
[05:43:17 CEST] <c_14> sure, it's c-14
[05:43:47 CEST] <c_14> hmm
[05:45:20 CEST] <c_14> Sounds like something intrenal. As long as it isn't fatal I wouldn't worry all that much about it.
[05:45:52 CEST] <medya> cool
[05:45:55 CEST] <medya> this is really cool
[05:46:02 CEST] <medya> thank you so much again
[05:46:25 CEST] <c_14> np
[05:47:10 CEST] Action: c_14 needs to be heading off to bed now. I'll be back later today if you have more questions, just ask and I'll get back to you when I have time or somebody else might be able to answer them.
[05:47:48 CEST] <medya> thanks I am going to bed also, so no more questions have a good night
[08:00:06 CEST] <Bray90820> If my video file has multiple audio tracks ow would I choose audio track two with "-c:a copy"
[08:01:25 CEST] <Bray90820> *How
[08:13:07 CEST] <darkapex> Bray90820: Use -c:a:0, -c:a:1 etc to select a particular stream. (Refer to https://trac.ffmpeg.org/wiki/Map)
[08:14:05 CEST] <Bray90820> Would -c:a:0  be audio stream 1 and -c:a:1 be audio stream 2?
[08:14:44 CEST] <darkapex> Yes, I guess
[08:15:23 CEST] <Bray90820> You guess?
[08:18:56 CEST] <darkapex> Wait, my bad, what you should do is select the second stream using map
[08:19:20 CEST] <darkapex> and check which is the index of the second audio stream using ffprobe
[08:19:58 CEST] <darkapex> Just refer to the wiki page I linked, I need caffeine
[08:20:30 CEST] <Bray90820> Alright
[08:20:32 CEST] <Bray90820> Thanks
[08:20:47 CEST] <darkapex> Np, sorry for the confusion, I'm sleepy af
[08:21:43 CEST] <Bray90820> Same here it's ok
[08:22:12 CEST] <Bray90820> And if worst comes to worst I can just try different numbers until I figure it out
[09:16:06 CEST] <motbob> hello, I concatted a bunch of TS files. When I play the video, the audio is broken at the points of the joined files (there is a small, noticable glitch). But when I play the audio stream in an audio player, it sounds fine. I have no idea where to start solving this problem.
[10:29:55 CEST] <maziar_> hello everyone, i want to convert mp4 to hls, can you please help me how to do it
[10:44:53 CEST] <maziar_> sorry my network goes down, how can i convert mp4 to m3u8 ? can you give me a tutorial link for learning it ?
[10:49:11 CEST] <spaam> maziar_: https://www.keycdn.com/support/how-to-convert-mp4-to-hls/
[10:49:54 CEST] <maziar_> spaam is there any full document about it
[10:50:12 CEST] <spaam> https://www.ffmpeg.org/ffmpeg-formats.html#hls-1
[11:56:09 CEST] <roxlu> hey, where can I find if ffmpeg can read from a file which contains raw rtp data? I'm not sure where to look for in the docs
[14:50:23 CEST] <ultrav1olet> How does one pass x265 params to ffmpeg?
[14:50:42 CEST] <ultrav1olet> in the light of this: https://trac.ffmpeg.org/ticket/5715
[15:41:27 CEST] <Aberlin2> Hello, I hope this is the right channel for this question: how do I know if .mp4 is a good format as seen from a license perspective
[15:41:33 CEST] <Aberlin2> ?
[15:42:46 CEST] <Aberlin2> I just want to add it to the Wikipedia discussion, where I was looking for a hint
[15:42:56 CEST] <Aberlin2> https://en.m.wikipedia.org/wiki/MPEG-4_Part_14#/talk/1
[16:04:50 CEST] <Dev^Null> I am sure i am in the wrong channel but there is no one in the other ones. I am trying to use ffmpeg to connect to a ELP 1280*720p camera I got the url from Ispy and I keep getting this error "method DESCRIBE failed: 451 ERROR
[16:04:50 CEST] <Dev^Null> rtsp://admin@10.10.10.231/user=admin_password=_channel1=1_stream=1.sdp: Server returned 4XX Client Error, but not one of 40{0,1,3,4}" this is the syntax I am using ffmpeg -i rtsp://admin@10.10.10.231/user=admin_password=_channel1=1_stream=1.sdp -r 15 C:/DB_Videos/2013-04-30 17_18_34.703.mp4 can someone help me figure out what is wrong I am running ubuntu 16.04 and ffmpeg ver 3.1.1
[16:12:22 CEST] <limbo> the server's giving you an error code.
[16:12:31 CEST] <limbo> no idea what the DESCRIBE metod is.
[16:12:37 CEST] <limbo> *method
[16:16:13 CEST] <Dev^Null> vinanao
[16:16:14 CEST] <Dev^Null> asdf'lkjasdf;lkhsd
[16:18:18 CEST] <Dev^Null> oops sorry
[16:18:23 CEST] <Dev^Null> thanks
[16:27:44 CEST] <t4nk985> hi
[16:28:07 CEST] <t4nk985> iam right at the gay chat?
[17:25:17 CEST] <thebombzen> does anyone know how to get -vf subtitles to work with fastseek (i.e. -ss before -i)?
[17:25:50 CEST] <thebombzen> if I use ffmpeg -i input.mkv -vf subtitles=input.mkv -ss 5 then it will work correctly (i.e. render the subtitles 5 seconds in atop the video 5 seconds in)
[17:26:19 CEST] <thebombzen> but if I use ffmpeg -ss 5 -i input.mkv -vf subtitles=input.mkv it will render the initial subs atop video, despite starting five seconds in
[17:41:30 CEST] <kevinranks> I'm having an issue where I'm using fast seek on a remote file to grab a thumbnail at a certain point...however I am getting "Request range not satisfiable"....looking at the ffmpeg log I can see that ffmpeg does a partial content request and gets back "1349278381" as the file size....then it does a request with "Range: bytes=2054741312-" ...which makes no sense to me....
[17:42:41 CEST] <__jack__> kevinranks: you're using http/1.1 ?
[17:43:05 CEST] <__jack__> (eg not http/1.0)
[17:43:09 CEST] <kevinranks> correct
[17:43:34 CEST] <kevinranks> "[https @ 0x1bd1fc0] header='HTTP/1.1 206 Partial Content'"
[17:43:53 CEST] <__jack__> range: bytes=X- = from X to whatever you can give me, if I recall
[17:44:49 CEST] <kevinranks> Right, so it's requesting "2054741312-" ...but the file size is only 1349278381
[17:47:27 CEST] <__jack__> 1349278381 is the size ffmpeg gets, or the real file size, fetched from httpd ?
[17:49:04 CEST] <kevinranks> In the logs with -loglevel debug set, I see a request with:
[17:49:06 CEST] <kevinranks> https @ 0x1bd1fc0] header='HTTP/1.1 206 Partial Content'
[17:49:16 CEST] <kevinranks> [https @ 0x1bd1fc0] header='Accept-Ranges: bytes'
[17:49:17 CEST] <kevinranks> [https @ 0x1bd1fc0] header='Content-Range: bytes 63412-1349341792/1349341793'
[17:49:17 CEST] <kevinranks> [https @ 0x1bd1fc0] header='Content-Type: video/mp4'
[17:49:17 CEST] <kevinranks> [https @ 0x1bd1fc0] header='Content-Length: 1349278381'
[17:49:53 CEST] <kevinranks> then after that it does:
[17:50:03 CEST] <kevinranks> [https @ 0x1bd1fc0] request: GET [file source]
[17:50:20 CEST] <kevinranks> User-Agent: Lavf/56.25.101
[17:50:20 CEST] <kevinranks> Accept: */*
[17:50:20 CEST] <kevinranks> Range: bytes=2054741312-
[17:50:21 CEST] <kevinranks> Connection: close
[17:50:21 CEST] <kevinranks> Host: s3-us-west-2.amazonaws.com
[17:50:21 CEST] <kevinranks> [https @ 0x1bd1fc0] header='HTTP/1.1 416 Requested Range Not Satisfiable'
[17:50:21 CEST] <kevinranks> [https @ 0x1bd1fc0] http_code=416
[17:50:22 CEST] <kevinranks> [https @ 0x1bd1fc0] HTTP error 416 Requested Range Not Satisfiable
[17:50:56 CEST] <kevinranks> 1349341792 is the correct file size as well
[17:51:14 CEST] <kevinranks> so I'm confused why it's requesting 2054741312-
[18:14:55 CEST] <kevinranks> I see, it looks like the video file might be corrupt
[18:21:05 CEST] <thebombzen> what does this mean: [matroska @ 0x55f9439c3de0] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
[18:21:08 CEST] <thebombzen> I get it all the time.
[18:32:04 CEST] <maziar> what is the best way to convert a MP4 file to M3U8 different quality
[18:38:08 CEST] <__jack__> maziar: you mean, a variable bitrate playlist, with multiple sub-playlist (one for "hd", one for "sd" etc) ? I don't think you can with ffmpeg
[18:38:36 CEST] <maziar> __jack__ no
[18:39:23 CEST] <maziar> __jack__ for example for 720p what is the best way to convert a MP4 file to M3U8
[18:39:35 CEST] <maziar> __jack__ for example for 1080p what is the best way to convert a MP4 file to M3U8
[18:39:52 CEST] <maziar> __jack__ for example for 480p what is the best way to convert a MP4 file to M3U8
[18:47:32 CEST] <thebombzen> as though asking the same question three times will get you an answer faster
[18:48:27 CEST] <__jack__> maziar: for all of them : ffmpeg -i source.mp4 -map 0 -c copy output.m3u8
[18:48:41 CEST] <__jack__> the input resolution does not matter
[18:56:00 CEST] <maziar> __jack__ no i have a 1080 MP4 video and i want to create a 480p m3u8 and 720p m3u8, you mean what should i do?
[18:58:28 CEST] <__jack__> maziar: ffmpeg -i source.mp4 -map 0 -vf scale=720:-1 -c:a copy 720.m3u8 -map 0 -vf scale=480:-1 -c:a copy 480.m3u8
[18:58:31 CEST] <__jack__> or something like that
[18:59:12 CEST] <maziar> __jack__ is there any manual or document for that?
[18:59:26 CEST] <drv> m3u8 is a playlist format, not a video container...
[18:59:55 CEST] <__jack__> maziar: dunno, probably
[19:00:00 CEST] <__jack__> drv: sure
[19:03:54 CEST] <furq> thebombzen: it means that ffmpeg.c hasn't been updated to use a new api
[19:04:20 CEST] <thebombzen> furq: so it's something that someone should get around to patching but nobody has done it yet?
[19:04:38 CEST] <thebombzen> cause the API you're refering to would be libavformat, not anything external
[19:04:57 CEST] <furq> well really it's a situation where an api shouldn't have been marked as deprecated until the thing 99% of people use the project for stops using it
[19:05:14 CEST] <furq> but your thing would also work
[19:05:17 CEST] <maziar> drv i should create 4 quality in m3u8 output for adaptive bit rate , media streaming, would please help me how can i provide that quality's
[19:05:56 CEST] <furq> or at the very least it shouldn't spit out a completely useless warning that most people will obviously think is something they can fix
[19:13:45 CEST] <maziar> __jack__ i should create 4 quality in m3u8 output for adaptive bit rate , media streaming, would please help me how can i provide that quality's
[19:35:10 CEST] <kepstin> maziar: by 'm3u8' you mean HLS streaming?
[19:35:26 CEST] <maziar> kepstin yes i mean by HLS streaming
[19:37:45 CEST] <kepstin> maziar: probably best to just run multiple ffmpeg commands on the same source with different scale options, and use fixed gop (disable scene detection or add min keyframe interval) so the segments match up for adaptive stream switching.
[19:38:56 CEST] <maziar> kepstin, thank you so much, would you please help me about best way to convert from mp4 to hls 720 and 480 ?
[19:43:01 CEST] <shincodex> hi
[19:43:15 CEST] <shincodex> is your libraries of shinangans assertlevel > 0 by default in configure
[19:43:25 CEST] <kepstin> maziar: I'd be able to help you if you have some specific questions about why something you've tried isn't working, or how to improve an ffmpeg command you've been working on.
[19:43:29 CEST] <shincodex> cause my library that eats ffmpeg collection into one SO.....
[19:43:38 CEST] <shincodex> is aborting on my throw when i have try catch handlers
[19:43:52 CEST] <shincodex> so im wondering if my throw is geting stolen by ffmpeg
[19:44:35 CEST] <maziar> kepstin i'm using this command to convert a 1080 MP4 file to 720 hls, is this correct command : ffmpeg -i input.mp4 -map 0 -vf scale=720:-1 -c:a copy -profile:v baseline -level 3.0 -start_number 0 -hls_time 3 -hls_list_size 0 -f hls index.m3u8
[19:45:12 CEST] <kepstin> shincodex: in general you can't expect C++ exceptions to work across C++ to C interface boundaries...
[19:45:27 CEST] <maziar> kepstin please help me to improve my command
[19:45:47 CEST] <kepstin> maziar: have you tried it? is there some specific issue you're having with it?
[19:47:59 CEST] <kepstin> you're missing a few particular options that I'd recommend setting - in particular, I recommend always specifying the video encoder to use, you'll want to set a bitrate (and maybe vbv options depending on use case)
[19:48:23 CEST] <kepstin> there's rarely a reason to use baseline encoding, very few devices require it and it's much less efficient.
[19:50:37 CEST] <maziar> kepstin would you please kindly give me a sample
[19:51:08 CEST] <ultrav1olet> can anyone confirm that ffmpeg doesn't pass x265 to the encoder?
[19:51:19 CEST] <ultrav1olet> params
[19:51:44 CEST] <ultrav1olet> if you can please chime in  https://trac.ffmpeg.org/ticket/5715
[19:57:07 CEST] <maziar> kepstin would you please kindly give me a sample
[19:58:47 CEST] <kepstin> ultrav1olet: i've confirmed that with the x265 version I have, using -x265-params to set crf works, but some of the other options either have no effect or i'm not sure what to look for.
[19:59:06 CEST] <maziar> sry about duplicate msg its my keyboard issue
[20:04:06 CEST] <kepstin> ultrav1olet: tried a few other options, looks like they all work fine.
[20:04:52 CEST] <kepstin> ultrav1olet: I assume you probably are just having a syntax error or mismatched option name that's just being ignored... would have to have someone familiar with x265 options look at your command syntax
[20:05:15 CEST] <shincodex> I didnt say that at all
[20:05:20 CEST] <maziar> kepstin dear kepstin please kindly help me about improvement of my command
[20:05:27 CEST] <shincodex> Though your right the collection of junk is in C
[20:05:27 CEST] <maziar> kepstin i need your advice
[20:05:32 CEST] <shincodex> C doesnt have exceptions
[20:05:37 CEST] <shincodex> it just blows up instead
[20:05:45 CEST] <shincodex> My problem was
[20:05:48 CEST] <kepstin> ultrav1olet: in particular, the 'no-xxx' options don't work, you have to use e.g. 'xxx=0' or something, depending on the option
[20:06:04 CEST] <shincodex> I was being idiot thinking throw std::string had inherited exception class
[20:06:06 CEST] <shincodex> wrong
[20:06:17 CEST] <shincodex> so i just blew up on uncaught exceptions instead
[20:13:27 CEST] <maziar> kepstin !ping
[20:14:11 CEST] <kepstin> maziar: I don't have enough time to hand-hold someone through learning basic stuff about video encoding atm :/
[20:14:44 CEST] <maziar> kepstin sir, i know that, but i need your advice
[20:17:19 CEST] <shincodex> his time
[20:17:23 CEST] <shincodex> has run out he died
[20:22:05 CEST] <kepstin> I'm busy at work right now :) I have a limited amount of goodwill and spare time while I'm waiting for things to finish, but it's all used up now.
[20:24:32 CEST] <shincodex> im at work too
[20:24:48 CEST] <shincodex> working on
[20:25:02 CEST] <shincodex> idk... i got 3 more projects to make 6 make files for
[20:25:04 CEST] <shincodex> too much work
[20:25:38 CEST] <maziar> kepstin is it possible that i send email about it to you?
[20:26:03 CEST] <kepstin> maziar: nope. and I don't do any paid support
[20:26:35 CEST] <maziar> kepstin please kindly let me to have your help and advice
[20:28:09 CEST] <ultrav1olet> kepstin: pretty much all my options are being ignored
[20:28:41 CEST] <ultrav1olet> crf can also be specified and and it has no effect on the output
[20:29:00 CEST] <ultrav1olet> Maybe that's because I linked x265 statically
[20:29:12 CEST] <ultrav1olet> but it's very hard to believe
[20:29:29 CEST] Action: ultrav1olet has gone
[20:39:24 CEST] <maziar> kepstin sir, i am here for your advice, please let me know when you are free
[20:43:36 CEST] <Fyr> durandal_1707, hey, bro.
[20:43:57 CEST] <Fyr> could you send your patch to the developers?
[20:46:17 CEST] <maziar> Fyr i'm using this command to convert a 1080 MP4 file to 720 hls, is this correct command : ffmpeg -i input.mp4 -map 0 -vf scale=720:-1 -c:a copy -profile:v baseline -level 3.0 -start_number 0 -hls_time 3 -hls_list_size 0 -f hls index.m3u8
[20:48:09 CEST] <Fyr> looks like
[20:48:23 CEST] <Fyr> -start_number 0 is not necessary.
[20:49:41 CEST] <maziar> Fyr and which more?
[20:50:40 CEST] <maziar> Fyr someone told me "you're missing a few particular options that I'd recommend setting - in particular, I recommend always specifying the video encoder to use, you'll want to set a bitrate (and maybe vbv options depending on use case) , there's rarely a reason to use baseline encoding, very few devices require it and it's much less efficient. "
[20:51:24 CEST] <Fyr> sure
[20:51:31 CEST] <Fyr> I also would use -preset
[20:51:53 CEST] <shincodex> give me your money
[20:52:35 CEST] <maziar> Fyr would you please kindly give me a sample ?
[20:53:02 CEST] <Fyr> sorry, I've never used HLS format.
[20:57:23 CEST] <maziar> Fyr thank you so much
[20:57:35 CEST] <maziar>  i need help :(
[21:02:06 CEST] <Fyr> maziar, does this command not work as it's supposed to?
[21:03:17 CEST] <maziar> Fyr this work : ffmpeg -i input.mp4 -profile:v baseline -level 3.0 -start_number 0 -hls_time 3 -hls_list_size 0 -f hls index.m3u8   ,,,,,,,,, but this does not change the quality
[21:03:42 CEST] <Fyr> what kind of change do you expect?
[21:04:21 CEST] <maziar> for example convert a MP4 with 1080p to a HLS with 480p
[21:04:52 CEST] <Fyr> then use scale 480:-1
[21:05:13 CEST] <maziar> Fyr just this?
[21:05:37 CEST] <maziar> Fyr i will be back in 5 minute i should go to ...'
[21:05:37 CEST] <Fyr> -vf scale 480:-1
[21:07:54 CEST] <thebombzen_> isn't 480:-1 480 wide and whatever height? rather than 480p?
[21:08:17 CEST] <Fyr> yeah, maybe
[21:08:39 CEST] <thebombzen_> you'd need -1:480 for 480p
[21:09:22 CEST] <thebombzen_> although ideally you'd use -2:480 to force the width to be even
[21:42:51 CEST] <durandal_1707> Fyr: I'm developer
[21:43:02 CEST] <Fyr> perfect!
[21:43:16 CEST] <Fyr> when will you push the changes?
[21:44:21 CEST] <durandal_1707> when I find way to improve it
[21:51:48 CEST] <thebombzen_> how do you blockquote in TRAC? I'm trying to edit the wiki page and I don't remember how to use MediaWiki
[21:53:46 CEST] <Fyr> thebombzen,
[21:53:46 CEST] <Fyr> {{{
[21:53:46 CEST] <Fyr> }}}
[21:53:46 CEST] <Fyr> ?
[21:53:59 CEST] <thebombzen_> that does code afaik. is it different from blockquote?
[21:54:03 CEST] <thebombzen_> or is it the same?
[21:54:29 CEST] <Fyr> thebombzen, http://trac.ffmpeg.org/wiki/WikiFormatting
[21:54:39 CEST] <Fyr> search "blockquote"
[21:54:40 CEST] <thebombzen_> haha didn't realize that was an article. RTFM apparently
[21:59:23 CEST] <thebombzen_> just documented force_original_aspect_ratio on https://trac.ffmpeg.org/wiki/Scaling%20(resizing)%20with%20ffmpeg
[22:00:30 CEST] <thebombzen_> not sure though if what I wrote is considered "okay" so I'd appreciate it if someone could doublecheck to make sure I didn't do anything wrong with it. just added the last paragraph
[22:06:03 CEST] <maziar> thebombzen_ !ping
[22:06:19 CEST] <thebombzen_> yes?
[22:15:01 CEST] <Ravens-S> How would one be able to mass convert an entire folder from .avi to .mp4?
[22:15:16 CEST] <Fyr> with a script
[22:15:38 CEST] <Fyr> either bat/bash/python/perl script
[22:19:06 CEST] <Ravens-S> Looking to try and do it in a batch
[22:20:17 CEST] <maziar> thebombzen_ sorry please explain it to me about  "1:480 "  "480" "-2:480:
[22:20:43 CEST] <thebombzen_> so if you use -vf scale=-1:480 it will resize it to 480p
[22:20:55 CEST] <thebombzen_> and the width will be what's needed to preserve the aspect ratio
[22:21:08 CEST] <thebombzen_> if you use -vf scale=-2:480 it will do that too, but it will force the width to be an even number.
[22:21:42 CEST] <thebombzen_> so if you had a 1920x1080 video and ran -vf scale=-1:480, it would resize it to 853x480, but if you did -vf scale=-2:480, it would make it 854x480
[22:21:44 CEST] <Ravens-S> I am looking to create a file that request for the input location of the files you wish to convert and the output location of where you want the files and then have FFMPEG convert the whole folder
[22:22:18 CEST] <thebombzen_> even numbers are better, in that some video codecs require them, and they also work better with a yuv420p pixel format
[22:23:25 CEST] <thebombzen_> Ravens-S: you could do something like this;
[22:24:11 CEST] <maziar> thebombzen_  then you suggested -vf scale=-2:480 ?
[22:26:30 CEST] <thebombzen_> Ravens-S: say, if you wanted to convert a folder of PNGs to JPGs, try this
[22:26:55 CEST] <furq> thebombzen_: yuv420p requires an even width and height
[22:27:10 CEST] <thebombzen_> furq in the past it's just whined at me
[22:27:24 CEST] <thebombzen_> or silently converted. I haven't seen it now
[22:27:39 CEST] <thebombzen_> Ravens-S: find FolderName/ -maxdepth 1 -type f -name '*.png' | parallel ffmpeg -i {} {.}.jpg
[22:27:46 CEST] <thebombzen_> that would be an exmaple of how you coudl batch convert files
[22:30:01 CEST] <furq> they said batch, so i assume that's not going to work
[22:30:09 CEST] <furq> although i'm not sure why you wouldn't do that with -exec
[22:35:17 CEST] <Ravens-S> It was an idea that I had and I want to see if I can make it work
[22:35:41 CEST] <Ravens-S> Ill have to try some of what you are saying out
[22:36:54 CEST] <Bray90820> I'm converting videos to mp4 with this command
[22:36:54 CEST] <Bray90820> ffmpeg -i "video.mkv" -c:a copy "video.mp4"
[22:37:04 CEST] <Bray90820> How would I choose audio track 2 instead of 1
[22:37:15 CEST] <furq> -c:a copy -map 0:v -map 0:a:2
[22:37:29 CEST] <furq> or -map 0:a:1 rather
[22:37:30 CEST] <Bray90820> Thanks I'll try it
[22:46:13 CEST] <Ravens-S> Bray90820 I know you can use the command of ffmpeg -i "video.mkv" -c:a copy "video.mp4" but what I am trying to do is have a batch file that ask you the location of the folder you want to convert and then have it automatically convert each file in that folder.
[22:46:38 CEST] <thebombzen_> furq: parallel allows you to use the {.}.jpg notation
[22:46:49 CEST] <thebombzen_> parallel also... parallizes
[22:46:54 CEST] <Bray90820> Ravens-S: Did you mean to ping me?
[22:47:25 CEST] <Ravens-S> Sorry i did not know that pinged you
[22:47:28 CEST] <thebombzen_> so it'll run two ffmpeg's at once. this is nice for encoders/decoders that don't support threading (like afaik png and mjpeg)
[22:48:01 CEST] <thebombzen_> also furq to me batch process means do a bunch of conversions at once haha. I didn't raelize he mean Windows Batch File
[22:48:02 CEST] <Bray90820> It's ok
[22:54:25 CEST] <Bray90820> furq: I don't think I did it right this is the code I used
[22:54:27 CEST] <Bray90820> ffmpeg -i "video.mkv" -c:a copy "video.mp4" -map 0:v -map 0:a:1
[22:55:25 CEST] <Bray90820> I still took audio track 1
[22:55:36 CEST] <Bray90820> *It
[23:07:16 CEST] <maziar> no matter -vf scale=-2:480 or -vf scale=-2:1080 it will resize video to same size, i mean 1080 and 480 size will be same with this command, and seems its not correct :  ffmpeg -i input.mp4 -map 0 -vf scale=-1:1080 -c:a copy -profile:v baseline -level 3.0 -start_number 0 -hls_time 3 -hls_list_size 0 -f hls 1080/low_1080.m3u8
[23:18:00 CEST] Last message repeated 1 time(s).
[23:18:54 CEST] <Kadigan> Hi. Can I use some part of the ffmpeg suite to grab frames from a USB framegrabber and output them directly to a preview?
[23:19:04 CEST] <thebombzen_> maziar: post the exact command you're using and and output to a paste site like http://pastebin.com/, and give a link
[23:19:19 CEST] <thebombzen_> the full uncut output
[23:19:37 CEST] <thebombzen_> Kadigan: what do you mean by a "USB framegrabber"?
[23:20:03 CEST] <Kadigan> thebombzen_: a device like, for example, a Pinnacle 510-USB, or a Logilink Grabber USB
[23:20:34 CEST] <Kadigan> Something that takes Composite or S-Video w/ analog audio, and turns that into digital frames to be sucked up through dshow or something.
[23:21:09 CEST] <thebombzen_> if DirectShow can read it then FFmpeg can read it too
[23:21:11 CEST] <thebombzen_> see: https://trac.ffmpeg.org/wiki/DirectShow
[23:21:15 CEST] <Kadigan> I think it would also be important to select the input pin, because I believe it starts in S-Video :/
[23:21:55 CEST] <thebombzen_> FFmpeg can read from DirectShow inputs. If you're trying to display it, you could display it with ffplay, or you could pipe it into another reader like MPV, ImageMagick, or IrfanView
[23:22:48 CEST] <thebombzen_> You could also just dump the output to a file.
[23:23:05 CEST] <maziar> thebombzen_ http://pastebin.com/p01mwrGE this is my exact command
[23:23:21 CEST] <thebombzen_> >[17:19:17] <thebombzen_> the full uncut output
[23:23:24 CEST] <Kadigan> thebombzen_: okay, I think I could figure out how to use ffmpeg to capture that data. How can I now put it on the screen?
[23:23:44 CEST] <DHE> he just answered that
[23:23:52 CEST] <Kadigan> Ah, apologies.
[23:24:06 CEST] <thebombzen_> Sometimes you can just drop in ffmpeg -> ffplay and it works
[23:24:18 CEST] <thebombzen_> although ffplay supports fewer commandline options than ffmpeg so you have to be careful
[23:24:40 CEST] <thebombzen_> if you run into issues you could transcode it with ffmpeg to something really primitive like ffvhuff and pipe it into ffplay
[23:24:56 CEST] <thebombzen_> i.e ffmpeg -i <Input> -c:v ffvhuff -f matroska - | ffplay -f matroska -
[23:25:36 CEST] <thebombzen_> You might also want to consider using MPV directly because it's got Unbuffered I/O that FFmpeg doesn't. MPV reads from webcams better than FFmpeg does
[23:26:06 CEST] <Kadigan> Ah, damn... Video grabbers are, in my experience, notorious for being nasty little s**ts to deal with. :/ I tried to run the command, and I got "video=Pinnacle 510-USB: Input/output error"
[23:26:08 CEST] <thebombzen_> At least this is true with Video4Linux2. I haven't tested MPV on windows though so I dn't know exactly.
[23:26:12 CEST] <DHE> ffmpeg isnt' really a "real-time" processes. it's more interested in getting the job done consistently
[23:26:40 CEST] <maziar> thebombzen_ this is full http://pastebin.com/0Fd31PbE
[23:27:19 CEST] <Kadigan> Hell, the previous one I had, which was a PCI card, basically needed two blue-screens to get the driver in correctly - for some reason it wouldn't go w/o them... If you got blue-screens installing the driver, you were going in the right direction. -_-
[23:27:43 CEST] <thebombzen_> maziar: you're complaining that -1:480 and -1:1080 do the same thing
[23:27:50 CEST] <thebombzen_> but you only post the output of one of those commands
[23:27:59 CEST] <thebombzen_> how do you expect us to help you diagnose the issue?
[23:29:16 CEST] <maziar> thebombzen_ you mean all -1:480 and -1:1080 ?  you mean i should cover both of them ?
[23:29:31 CEST] <thebombzen_> well if your question is "why do these two commands do the same thing"
[23:29:36 CEST] <thebombzen_> then yes you should post the output of both commands
[23:29:47 CEST] <thebombzen_> unless I misunderstood what you were asking
[23:30:03 CEST] <maziar> thebombzen_ sorry for my missunderstanding
[23:30:20 CEST] <thebombzen_> OH
[23:30:35 CEST] <thebombzen_> I see. You're asking "why does -vf scale -1:1080" not change the side of the video?
[23:31:12 CEST] <thebombzen_> the answer to THAT question is that -vf scale=-1:1080 resizes the video TO 1080p, not FROM 1080p. FFmepg already knows what size it starts at.
[23:31:30 CEST] <thebombzen_> If you started with a video that's 1080p and you resize it to 1080p, then the size won't change.
[23:31:53 CEST] <thebombzen_> In general for most intents and purposes you don't have to tell FFmpeg what the size of the input video is. That's listed in the video metadata.
[23:33:16 CEST] <maziar> thebombzen_ please kindly check this and confirm is this okay or not : http://pastebin.com/QptyWx5T
[23:33:17 CEST] <thebombzen_> Also, if you start with a 480p video and use -vf scale=-1:1080, it will scale it UP to 1080p, so the output will be 1080p.
[23:33:45 CEST] <furq> Stream #0:0(und): Video: h264 (libx264), yuv420p, 910x480 [SAR 4096:4095 DAR 256:135], q=-1--1, 24 fps, 90k tbn, 24 tbc (default)
[23:33:47 CEST] <thebombzen_> maziar: that last command looks like it works fine
[23:33:48 CEST] <furq> this is 480p
[23:33:50 CEST] <furq> so what's the problem
[23:33:58 CEST] <thebombzen_> now I'm really confused what your'e trying to do
[23:34:52 CEST] <maziar> thebombzen_ i want to convert a 1080 MP4 to 1080 HLS and 480 HLS but with this commands all size is same
[23:34:58 CEST] <maziar> look at my servers vide
[23:35:15 CEST] <thebombzen_> If you want to convert it to two different videos, try this:
[23:35:22 CEST] <maziar> thebombzen_ this is for 1080 : 85.13.231.218/player/x1.html
[23:35:56 CEST] <maziar> thebombzen_ and this is for 480 185.13.231.218/player/play.html
[23:36:07 CEST] <maziar> thebombzen_ why their size is same ?
[23:36:18 CEST] <thebombzen_> ffmpeg -i input.mp4 -vf scale=-1:1080 <conversion options> output_1080.hls -vf scale=-1:480 <conversion options> output_480.hls
[23:36:23 CEST] <maziar> thebombzen_ this is for 1080 : http://185.13.231.218/player/x1.html
[23:36:26 CEST] <thebombzen_> that will convert it to two different files at once
[23:36:46 CEST] <maziar> thebombzen_ and this is for 480 http://185.13.231.218/player/play.html
[23:38:06 CEST] <thebombzen_> my verdict on that is i"m not going to try to dubug you're autogenerated Flash code
[23:38:11 CEST] <thebombzen_> use HTML5 <video>
[23:38:47 CEST] <thebombzen_> See: http://www.w3schools.com/html/html5_video.asp
[23:38:50 CEST] <maziar> thebombzen_  would you please separated this two command, for example i just want to convert a 1080 MP4 to 1080 HLS , what is the best command ? i used this : ffmpeg -i input.mp4 -map 0 -vf scale=-1:1080 -c:a copy -profile:v baseline -level 3.0 -start_number 0 -hls_time 3 -hls_list_size 0 -f hls 1080/low_1080.m3u8
[23:39:08 CEST] <thebombzen_> I literally just told you
[23:39:10 CEST] <thebombzen_> but okay
[23:39:24 CEST] <thebombzen_> I'll copy/paste it for your convenience
[23:39:29 CEST] <thebombzen_> [17:36:16] <thebombzen_> ffmpeg -i input.mp4 -vf scale=-1:1080 <conversion options> output_1080.hls -vf scale=-1:480 <conversion options> output_480.hls
[23:39:49 CEST] <thebombzen_> and oh look it appears I have to go! try scrolling up when I'm not around to help you
[23:39:55 CEST] <maziar> thebombzen_ its not work
[23:40:45 CEST] <Kadigan> Okay, I give up. :D I can't do it, and if I continue down this path I'll do it and it'll be 4:30 AM. Maybe. Thanks for the assist however.
[23:42:11 CEST] <maziar> thebombzen when i convert a MP4 to HLS i just want to change the format not the size, why size is changed?
[23:46:59 CEST] <maziar> someone please kindly help me, for example want to convert a MP4 1080 to HLS 720p, how should i do it, why there is no good sample and documents ?
[23:47:40 CEST] <__jack__> maziar: didn't I answer you hours ago ? :o
[23:49:10 CEST] <maziar> __jack__ its not work, when you want to convert to 1080, 720p, 480p, it will resize all of format to same size , for example check this URLs : 480 http://185.13.231.218/player/play.html    ,,,,,,, 1080 : http://185.13.231.218/player/x1.html   why should their size be same ?
[23:49:59 CEST] <__jack__> no playable sources found
[23:52:48 CEST] <maziar> __jack__ which one ?
[23:53:24 CEST] <maziar> __jack__ you should use chrome
[23:53:44 CEST] <__jack__> I am :)
[23:53:47 CEST] <__jack__> (and both)
[23:54:03 CEST] <maziar> __jack__ its work for me
[23:55:40 CEST] <__jack__> maziar: that code works (480 and 720 are directories):
[23:55:41 CEST] <__jack__> ffmpeg -i original.mkv -map 0:a -map 0:v -vf scale=-2:480 -c:a copy 480/play.m3u8 -map 0:a -map 0:v -vf scale=-2:720 -c:a copy 720/play.m3u8
[23:56:11 CEST] <__jack__> in 480/, you'll get a m3u8 and the related chunks, all of them being 480p
[23:56:17 CEST] <__jack__> same in 720, but with 720p
[23:57:35 CEST] <maziar> __jack__ just wait a minute to check
[00:00:00 CEST] --- Sat Jul 16 2016


More information about the Ffmpeg-devel-irc mailing list