ffprobe

get video fps using FFProbe

烈酒焚心 提交于 2019-12-05 12:36:29
I am new in ffprobe my aim is get video fps and store into java program. my code store xml files but i want store directly like int fps=30; ffprobe -v quiet -print_format xml -show_format -show_streams "/video/small/small.avi" > "/video/small/test.xml" this is my code. This will print the video FPS: ffprobe -v error -select_streams v -of default=noprint_wrappers=1:nokey=1 -show_entries stream=r_frame_rate file.mp4 I found calculate fps in another method that is.. String query = "ffmpeg -i foo.avi 2>&1 | sed -n 's/.*, \\(.*\\) fp.*/\\1/p' > fps.txt"; String[] command = {"gnome-terminal", "-x",

Get mime type for MediaSource.isTypeSupported

你。 提交于 2019-12-05 04:32:22
How do I get the Mime type I need to pass to MediaSource.isTypeSupported with ffprobe/ffmpeg? For instance, on my computer, that returns true : MediaSource.isTypeSupported('video/mp4; codecs="avc1.64000d,mp4a.40.2"') while that doesn't MediaSource.isTypeSupported('video/mp4') I'm not sure how to get what would correspond to the avc1.64000d,mp4a.40.2 part for a given video. Here is a larger list of what this part may look like. ffprobe -show_streams -i video.mp4 returns a number of interesting informations, including codec_type=video codec_time_base=1/40 codec_tag_string=avc1 codec_tag

FFmpeg check audio channels for silence

会有一股神秘感。 提交于 2019-12-05 02:27:56
问题 I have two .mp4 files, both having 8 (7.1) audio channels. But in fact, I've been told that one has a stereo audio channel + 2 SAP (secondary audio on channels 7-8), and the other one has 6 (5.1) audio channels + 2 SAP (on channels 7-8). So basically the later one has some [real] audio channels such as Center channel where that doesn't exist in the former stereo one (although it has those channels, but apparently they are silent/mute). I've been trying to see some differentiating metadata to

FFmpeg check channels of a 7.1 audio for silence

余生长醉 提交于 2019-12-04 22:06:10
This is a follow-up question from my previous question asked here , where I needed to look for silence within a specific audio track. Here is the ffmpeg life-saver solution where helps to get some metadata: ffmpeg -i file -map 0:a:1 -af astats -f null - But I have other type of input .mp4 files where they have one single track of 8 (i.e. 7.1) audio channels. Apparently these files are transcoded from an original file (somehow the 4 track stereos are squished into these files). Now similar to my previous, I need to know if the original file was 2-channel stereo or 5.1 (6) channel. How to know

Python accessing data in JSON object

痴心易碎 提交于 2019-12-04 18:05:21
问题 so I do this in my script: import json info = json.loads(get_info()) print info Which outputs: richard@richard-desktop:~/projects/hello-python$ python main.py { "streams": [ { "index": 0, "codec_name": "mpeg2video", "codec_long_name": "MPEG-2 video", "codec_type": "video", "codec_time_base": "1001/48000", "codec_tag_string": "[0][0][0][0]", "codec_tag": "0x0000", "width": 1920, "height": 1080, "has_b_frames": 1, "sample_aspect_ratio": "1:1", "display_aspect_ratio": "16:9", "pix_fmt": "yuv422p

Python accessing data in JSON object

我的未来我决定 提交于 2019-12-03 12:17:49
so I do this in my script: import json info = json.loads(get_info()) print info Which outputs: richard@richard-desktop:~/projects/hello-python$ python main.py { "streams": [ { "index": 0, "codec_name": "mpeg2video", "codec_long_name": "MPEG-2 video", "codec_type": "video", "codec_time_base": "1001/48000", "codec_tag_string": "[0][0][0][0]", "codec_tag": "0x0000", "width": 1920, "height": 1080, "has_b_frames": 1, "sample_aspect_ratio": "1:1", "display_aspect_ratio": "16:9", "pix_fmt": "yuv422p", "level": 2, "timecode": "00:59:59:00", "id": "0x1e0", "r_frame_rate": "24000/1001", "avg_frame_rate"

ffprobe Fastest way to read video packets

杀马特。学长 韩版系。学妹 提交于 2019-12-02 13:31:24
I've been using ffprobe to read packets from video streams for analysis. However it's painfully slow. A 30min 720p video takes roughly 8min to read. I'm using the following command at the moment: ffprobe.exe -i video.mp4 -show_entries packet=size,pts_time,flags,duration_time This gives me the following information for every packet: [PACKET] pts_time=1981.392000 duration_time=0.032000 size=1536 flags=K_ [/PACKET] I did read a fair bit in the documentation but it looks like this is just it or is there a way to make this faster? Or would there be any alternative CLI tool to get the above

extract audio with youtube-dl on windows

那年仲夏 提交于 2019-12-01 06:10:34
I want to extract audio from a video downloaded with youtube-dl on windows. I got youtube-dl working, but am unable to extract the audio. This problem is caused due to not having the correct audio codes installed. When i try to extract audio it tells me the following: ' WARNING: unable to obtain file audio codes with ffprobe ' youtube-dl man sais the following: -x -extract-audio convert video files to audio-only files (requires ffmpeg or avconv and ffprobe or avprobe) How do I install ffprobe or ffmpeg? Do I install this on windows, or do I install this as a python extension? I have no idea,

Getting metadata for MOV video

梦想与她 提交于 2019-11-30 23:30:43
I' ve a .MOV video sent by a phone messanger app. Can I retrieve the real creation data of the file and the author? I tried with ffprobe, mediainfo and similar tool but give me only the date when I download it. I wrote a quick Python script that can obtain the creation and modification timestamps, since those are easy to find. Finding the author is a bit harder because it can be stored in several different ways. Example usage: $ ./mov-timestamps.py file.mov creation date: 2013-03-29 16:14:01 modification date: 2013-03-29 16:14:13 Sometimes you might see a date of 1/1/1904. That means the

Find if video file has audio present in it [duplicate]

感情迁移 提交于 2019-11-30 14:46:18
问题 This question already has answers here : Using ffprobe to check audio-only files (4 answers) Closed last year . I'm trying to figure out if a video has audio present in it so as to extract the mp3 using ffmpeg. When the video contains no audio channels, ffmpeg creates an empty mp3 file which I'm using to figure out if audio was present in the video in the first place. I'm sure there is a better way to identify if audio is present in a video. Will avprobe help with this? Can anyone point me to