Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
Match radial lens distortion of two videos taken with two different actioncams with different FOV
24 mai 2018, par Fabien BillerI have two different actioncams with different
k1
andk2
. How do I calculatek1
andk2
for one video not to be "defished", but have the same amount of distortion as the other video? -
Converting MP4 to HLS via ffmpeg producing stream with start delay
24 mai 2018, par Eugene AlexeevI'm trying to convert mp4 to hls via this FFMpeg command:
ffmpeg -i 1.mp4 -vcodec copy -q:v 5 -hls_time 5 -hls_list_size 0 -f hls 1.m3u8
Command is working fine, without any errors whatsoever. BUT, when I'm trying to play brand-new HLS stream locally I noticed that it has a fixed start delay. I checked metadata of stream with
ffprobe 1.m3u8
And that's what I got:Input #0, hls,applehttp, from '1.m3u8': Duration: 00:00:11.17, start: 1.400000, bitrate: 0 kb/s Program 0 Metadata: variant_bitrate : 0 Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, smpte170m/bt709/bt709), 720x1280, 30 fps, 30 tbr, 90k tbn, 180k tbc Metadata: variant_bitrate : 0
As you can see, parameter
start
has value of1.400000
and I believe that's the reason of this annoying start delay. My question is - how can I get rid of that?I tried to set start time with
-ss
flag but it doesn't affect an output at all. Also input is perfectly fine, I tried to convert it with the same command but to.mp4
and I got correct results. Am I missing something here? I would be very appreciated for any help. Thanks. -
Quick conversion of mp4 to hls using ffmpeg
24 mai 2018, par AbhishekI need to convert huge video(around 2-4GB) using ffmpeg from mp4 to hls format. The following takes very long to run, is there any quick conversion flag in ffmpeg.
ffmpeg -i ad1.mp4 -strict -2 -profile:v baseline -level 3.0 -start_number 0 -hls_list_size 0 -hls_segment_filename 'sample-%06d.ts' -f hls sample.m3u8
-
Why am I getting an exit status of 1 ?
24 mai 2018, par Akaisteph7So, I am writing this code to analyze this video but I am facing this issue when I try to run it in Spyder, Anaconda:
import subprocess from subprocess import call import math ##Converts the given file into a series of images def Video_to_Image_Converter(fileName): res1 = call("ffmpeg -i " + fileName + " -vf fps=1 frame-%d.jpg", shell=True) print(res1) result = subprocess.Popen('ffprobe -i '+ fileName +' -show_entries format=duration -v quiet -of csv="p=0"', stdout=subprocess.PIPE,stderr=subprocess.STDOUT, shell=True) output = result.communicate() print(output) #return math.ceil(float(output[0])) + 1 if __name__ == '__main__': videoLength = Video_to_Image_Converter('sampleVideo.wmv') print(videoLength)
So, this code worked fine in iPython but I started having issues when trying to use Spyder. res1 should have an exit status of 0 if everything went well but it is 1. However, I do not know what went wrong. All it says when running subprocess.check_output on call is:
Command 'ffmpeg -i sampleVideo.wmv -vf fps=1 frame-%d.jpg' returned non-zero exit status 1
Please help.
-
Exec () Creating two different process for FFMPEG
23 mai 2018, par Bruno AndradeI run this command in
exec ()
and it creates two FFMPEG processes one at the same time as the other but with differentPID
. Is this behavior normal? When I run the code directly in theshell
this does not happen.$ffmpeg = "/home/user/bin/ffmpeg -hide_banner -loglevel verbose -n -i https://sitelink/list.m3u8 -map 0:4 -map 0:5 -acodec copy -bsf:a aac_adtstoasc -vcodec copy video.mp4 1> log.txt 2>&1"; exec($ffmpeg, $output, $var);
Example of the two processes created
user+ 24414 24413 0 13:42 pts/2 00:00:00 sh -c /home/user/bin/ffmpeg -hide_banner -loglevel verbose -n -i https://sitelink/list.m3u8 -map 0:4 -map 0:5 -acodec copy -bsf:a aac_adtstoasc -vcodec copy video.mp4 1> log.txt 2>&1 user+ 24415 24414 1 13:42 pts/2 00:00:00 /home/user/bin/ffmpeg -hide_banner -loglevel verbose -n -i https://sitelink/list.m3u8 -map 0:4 -map 0:5 -acodec copy -bsf:a aac_adtstoasc -vcodec copy video.mp4