Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
[Turmux][ffmpeg] encounter "can't open stat file" when use "-pass"
15 février 2020, par Jackal ZhaoI installed ffmpeg in turmux, in my home directory, ran:
ffmpeg -y -i /sdcard/FFMPEG/in.mp4 -c:v libx264 -b:v 2600k -pass 2 -c:a copy /sdcard/FFMPEG/out3.mp4
the error bumps:
ratecontrol_init: can't open stats file
if I enter
/sdcard/FFMEPG
folder first, then runffmpeg -y -i /sdcard/FFMPEG/in.mp4 -c:v libx264 -b:v 2600k -pass 2 -c:a copy /sdcard/FFMPEG/out3.mp4
the task will run successfully.then I went back to turmux home directory, ran
ffmpeg -y -i /sdcard/FFMPEG/in.mp4 -c:v libx264 -b:v 2600k -pass 2 -c:a copy /sdcard/FFMPEG/out3.mp4
, error still happens.so I then added
-strict -2 -passlogfile /tmp/mydummy
and ran ranffmpeg -y -i /sdcard/FFMPEG/in.mp4 -c:v libx264 -strict -2 -passlogfile /sdcard/FFMPEG/ -b:v 2600k -pass 2 -c:a copy /sdcard/FFMPEG/out3.mp4
, and same error still happens.My question is, how to use ffmpeg "-pass" in termux successfully without especially entering the target folder?
-
How to process .ts files used by flowplayer ?
15 février 2020, par user1424739Flowplay seems to be used by jove.com
https://www.jove.com/video/59612/3d-kinematic-gait-analysis-for-preclinical-studies-in-rodents
Take the above URL as an example, it will use .ts files like this (via Google Chrome devtools)
https://cloudflare2.jove.com/CDNSource/hls/59612/59612_3.ts
But I am not sure how to make the .ts file viewable locally.
https://askubuntu.com/questions/3645/how-do-i-convert-ts-files-into-something-useful
I tried something like this. But I always get errors.
$ ffmpeg -i 50191_1.ts -c:v libx264 -crf 0 -c:a copy output.mp4 ffmpeg version 4.0.2 Copyright (c) 2000-2018 the FFmpeg developers built with Apple LLVM version 9.1.0 (clang-902.0.39.2) configuration: --prefix=/usr/local/Cellar/ffmpeg/4.0.2 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma libavutil 56. 14.100 / 56. 14.100 libavcodec 58. 18.100 / 58. 18.100 libavformat 58. 12.100 / 58. 12.100 libavdevice 58. 3.100 / 58. 3.100 libavfilter 7. 16.100 / 7. 16.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 1.100 / 5. 1.100 libswresample 3. 1.100 / 3. 1.100 libpostproc 55. 1.100 / 55. 1.100 50191_1.ts: Invalid data found when processing input
Does anybody know how to convert the .ts files?
EDIT: I got something like this.
$ cat 59612_.m3u8 #EXTM3U #EXT-X-VERSION:3 #EXT-X-TARGETDURATION:17 #EXT-X-MEDIA-SEQUENCE:0 #EXT-X-KEY:METHOD=AES-128,URI="https://cloudflare2.jove.com/CDNSource/hls/59612/59612.key" #EXTINF:16.683333, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_0.ts #EXTINF:8.341667, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_1.ts #EXTINF:6.606600, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_2.ts #EXTINF:16.683333, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_3.ts #EXTINF:8.341667, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_4.ts #EXTINF:10.877533, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_5.ts #EXTINF:8.341667, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_6.ts #EXTINF:7.907900, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_7.ts #EXTINF:8.341667, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_8.ts #EXTINF:10.910900, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_9.ts #EXTINF:9.676333, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_10.ts #EXTINF:8.375033, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_11.ts #EXTINF:12.645967, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_12.ts #EXTINF:13.146467, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_13.ts #EXTINF:8.341667, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_14.ts #EXTINF:6.840167, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_15.ts #EXTINF:8.341667, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_16.ts #EXTINF:10.877533, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_17.ts #EXTINF:16.683333, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_18.ts #EXTINF:8.341667, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_19.ts #EXTINF:6.706700, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_20.ts #EXTINF:8.341667, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_21.ts #EXTINF:16.683333, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_22.ts #EXTINF:8.341667, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_23.ts #EXTINF:8.341667, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_24.ts #EXTINF:8.341667, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_25.ts #EXTINF:8.341667, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_26.ts #EXTINF:16.649967, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_27.ts #EXTINF:8.308300, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_28.ts #EXTINF:8.308300, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_29.ts #EXTINF:5.672333, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_30.ts #EXTINF:10.677333, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_31.ts #EXTINF:16.683333, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_32.ts #EXTINF:8.341667, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_33.ts #EXTINF:8.341667, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_34.ts #EXTINF:7.507500, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_35.ts #EXTINF:8.341667, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_36.ts #EXTINF:16.683333, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_37.ts #EXTINF:8.341667, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_38.ts #EXTINF:8.341667, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_39.ts #EXTINF:7.273933, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_40.ts #EXTINF:16.683333, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_41.ts #EXTINF:8.341667, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_42.ts #EXTINF:8.341667, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_43.ts #EXTINF:8.341667, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_44.ts #EXTINF:8.341667, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_45.ts #EXTINF:16.683333, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_46.ts #EXTINF:8.341667, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_47.ts #EXTINF:8.341667, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_48.ts #EXTINF:8.341667, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_49.ts #EXTINF:8.341667, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_50.ts #EXTINF:16.683333, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_51.ts #EXTINF:8.341667, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_52.ts #EXTINF:8.341667, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_53.ts #EXTINF:13.079733, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_54.ts #EXTINF:8.341667, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_55.ts #EXTINF:8.341667, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_56.ts #EXTINF:13.113100, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_57.ts #EXTINF:8.341667, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_58.ts #EXTINF:8.341667, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_59.ts #EXTINF:8.341667, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_60.ts #EXTINF:6.573233, https://cloudflare2.jove.com/CDNSource/hls/59612/59612_61.ts #EXT-X-ENDLIST
-
Convert RTP/UDP Stream to HTTP with ffmpeg
14 février 2020, par inversusAs you may know, Android uses a strange implementation of RTP - It can only play low bitrate RTP streams. On the other hand, it can play Full HD HTTP stream flawlessly.
I'm trying a workaround for this problem: As stated in the title, using ffmpeg to convert the RTP/UDP stream to HTTP.
I've already compile ffmpeg for android, but I'm having difficulties configuring the ffserver.conf.
- Is it possible to achieve what I want with ffmpeg?
- I dont need any transcoding, will it use lots of the processor/memory?
- Can you help me with these configurations?
I receive a udp/rtp multicast stream:
- udp://@239.192.1.31:1234 or rtp://@239.192.1.31:1234 - TV channels
I want to output to HTTP:
Thank you in advance
inversus -
ffmpeg merge multiple (N) mono audio channels of a MXF video to multiple (M) stereo channels of MP4 video
14 février 2020, par LauraI have an MXF file with 16 audio mono streams and I need to recode it in a mp4 file with 2<=n<=16 channels merging input streams, e.g. input channels 1 and 2 on output channel 1 and 9 and 10 on output channel 2. This job will be done with ffmpeg. I read the documentation and found the amerge and amix filters that would be nice, but they output one channel only. Is there any solution for this problem?
Thanks, Laura
Find below the output of ffprobe on mxf file:
{ "streams":[ { "index":0, "codec_name":"mpeg2video", "codec_long_name":"MPEG-2 video", "profile":"4:2:2", "codec_type":"video", "codec_time_base":"1/25", "codec_tag_string":"[0][0][0][0]", "codec_tag":"0x0000", "width":1920, "height":1080, "coded_width":0, "coded_height":0, "has_b_frames":1, "sample_aspect_ratio":"1:1", "display_aspect_ratio":"16:9", "pix_fmt":"yuv422p", "level":2, "color_range":"tv", "color_space":"bt709", "color_transfer":"bt709", "color_primaries":"bt709", "chroma_location":"topleft", "field_order":"tt", "refs":1, "r_frame_rate":"25/1", "avg_frame_rate":"25/1", "time_base":"1/25", "start_pts":0, "start_time":"0.000000", "duration_ts":448, "duration":"17.920000", "bit_rate":"50000000", "disposition":{ "default":0, "dub":0, "original":0, "comment":0, "lyrics":0, "karaoke":0, "forced":0, "hearing_impaired":0, "visual_impaired":0, "clean_effects":0, "attached_pic":0, "timed_thumbnails":0 }, "tags":{ "file_package_umid":"0x060A2B340101010501010D2313000000968F75C6B5B34D649967EEDD0076B989" } }, { "index":1, "codec_name":"pcm_s24le", "codec_long_name":"PCM signed 24-bit little-endian", "codec_type":"audio", "codec_time_base":"1/48000", "codec_tag_string":"[0][0][0][0]", "codec_tag":"0x0000", "sample_fmt":"s32", "sample_rate":"48000", "channels":1, "bits_per_sample":24, "r_frame_rate":"0/0", "avg_frame_rate":"0/0", "time_base":"1/48000", "start_pts":0, "start_time":"0.000000", "duration_ts":860160, "duration":"17.920000", "bit_rate":"1152000", "bits_per_raw_sample":"24", "disposition":{ "default":0, "dub":0, "original":0, "comment":0, "lyrics":0, "karaoke":0, "forced":0, "hearing_impaired":0, "visual_impaired":0, "clean_effects":0, "attached_pic":0, "timed_thumbnails":0 }, "tags":{ "file_package_umid":"0x060A2B340101010501010D2313000000968F75C6B5B34D649967EEDD0076B989" } }, { "index":2, "codec_name":"pcm_s24le", "codec_long_name":"PCM signed 24-bit little-endian", "codec_type":"audio", "codec_time_base":"1/48000", "codec_tag_string":"[0][0][0][0]", "codec_tag":"0x0000", "sample_fmt":"s32", "sample_rate":"48000", "channels":1, "bits_per_sample":24, "r_frame_rate":"0/0", "avg_frame_rate":"0/0", "time_base":"1/48000", "start_pts":0, "start_time":"0.000000", "duration_ts":860160, "duration":"17.920000", "bit_rate":"1152000", "bits_per_raw_sample":"24", "disposition":{ "default":0, "dub":0, "original":0, "comment":0, "lyrics":0, "karaoke":0, "forced":0, "hearing_impaired":0, "visual_impaired":0, "clean_effects":0, "attached_pic":0, "timed_thumbnails":0 }, "tags":{ "file_package_umid":"0x060A2B340101010501010D2313000000968F75C6B5B34D649967EEDD0076B989" } }, { "index":3, "codec_name":"pcm_s24le", "codec_long_name":"PCM signed 24-bit little-endian", "codec_type":"audio", "codec_time_base":"1/48000", "codec_tag_string":"[0][0][0][0]", "codec_tag":"0x0000", "sample_fmt":"s32", "sample_rate":"48000", "channels":1, "bits_per_sample":24, "r_frame_rate":"0/0", "avg_frame_rate":"0/0", "time_base":"1/48000", "start_pts":0, "start_time":"0.000000", "duration_ts":860160, "duration":"17.920000", "bit_rate":"1152000", "bits_per_raw_sample":"24", "disposition":{ "default":0, "dub":0, "original":0, "comment":0, "lyrics":0, "karaoke":0, "forced":0, "hearing_impaired":0, "visual_impaired":0, "clean_effects":0, "attached_pic":0, "timed_thumbnails":0 }, "tags":{ "file_package_umid":"0x060A2B340101010501010D2313000000968F75C6B5B34D649967EEDD0076B989" } }, { "index":4, "codec_name":"pcm_s24le", "codec_long_name":"PCM signed 24-bit little-endian", "codec_type":"audio", "codec_time_base":"1/48000", "codec_tag_string":"[0][0][0][0]", "codec_tag":"0x0000", "sample_fmt":"s32", "sample_rate":"48000", "channels":1, "bits_per_sample":24, "r_frame_rate":"0/0", "avg_frame_rate":"0/0", "time_base":"1/48000", "start_pts":0, "start_time":"0.000000", "duration_ts":860160, "duration":"17.920000", "bit_rate":"1152000", "bits_per_raw_sample":"24", "disposition":{ "default":0, "dub":0, "original":0, "comment":0, "lyrics":0, "karaoke":0, "forced":0, "hearing_impaired":0, "visual_impaired":0, "clean_effects":0, "attached_pic":0, "timed_thumbnails":0 }, "tags":{ "file_package_umid":"0x060A2B340101010501010D2313000000968F75C6B5B34D649967EEDD0076B989" } }, { "index":5, "codec_name":"pcm_s24le", "codec_long_name":"PCM signed 24-bit little-endian", "codec_type":"audio", "codec_time_base":"1/48000", "codec_tag_string":"[0][0][0][0]", "codec_tag":"0x0000", "sample_fmt":"s32", "sample_rate":"48000", "channels":1, "bits_per_sample":24, "r_frame_rate":"0/0", "avg_frame_rate":"0/0", "time_base":"1/48000", "start_pts":0, "start_time":"0.000000", "duration_ts":860160, "duration":"17.920000", "bit_rate":"1152000", "bits_per_raw_sample":"24", "disposition":{ "default":0, "dub":0, "original":0, "comment":0, "lyrics":0, "karaoke":0, "forced":0, "hearing_impaired":0, "visual_impaired":0, "clean_effects":0, "attached_pic":0, "timed_thumbnails":0 }, "tags":{ "file_package_umid":"0x060A2B340101010501010D2313000000968F75C6B5B34D649967EEDD0076B989" } }, { "index":6, "codec_name":"pcm_s24le", "codec_long_name":"PCM signed 24-bit little-endian", "codec_type":"audio", "codec_time_base":"1/48000", "codec_tag_string":"[0][0][0][0]", "codec_tag":"0x0000", "sample_fmt":"s32", "sample_rate":"48000", "channels":1, "bits_per_sample":24, "r_frame_rate":"0/0", "avg_frame_rate":"0/0", "time_base":"1/48000", "start_pts":0, "start_time":"0.000000", "duration_ts":860160, "duration":"17.920000", "bit_rate":"1152000", "bits_per_raw_sample":"24", "disposition":{ "default":0, "dub":0, "original":0, "comment":0, "lyrics":0, "karaoke":0, "forced":0, "hearing_impaired":0, "visual_impaired":0, "clean_effects":0, "attached_pic":0, "timed_thumbnails":0 }, "tags":{ "file_package_umid":"0x060A2B340101010501010D2313000000968F75C6B5B34D649967EEDD0076B989" } }, { "index":7, "codec_name":"pcm_s24le", "codec_long_name":"PCM signed 24-bit little-endian", "codec_type":"audio", "codec_time_base":"1/48000", "codec_tag_string":"[0][0][0][0]", "codec_tag":"0x0000", "sample_fmt":"s32", "sample_rate":"48000", "channels":1, "bits_per_sample":24, "r_frame_rate":"0/0", "avg_frame_rate":"0/0", "time_base":"1/48000", "start_pts":0, "start_time":"0.000000", "duration_ts":860160, "duration":"17.920000", "bit_rate":"1152000", "bits_per_raw_sample":"24", "disposition":{ "default":0, "dub":0, "original":0, "comment":0, "lyrics":0, "karaoke":0, "forced":0, "hearing_impaired":0, "visual_impaired":0, "clean_effects":0, "attached_pic":0, "timed_thumbnails":0 }, "tags":{ "file_package_umid":"0x060A2B340101010501010D2313000000968F75C6B5B34D649967EEDD0076B989" } }, { "index":8, "codec_name":"pcm_s24le", "codec_long_name":"PCM signed 24-bit little-endian", "codec_type":"audio", "codec_time_base":"1/48000", "codec_tag_string":"[0][0][0][0]", "codec_tag":"0x0000", "sample_fmt":"s32", "sample_rate":"48000", "channels":1, "bits_per_sample":24, "r_frame_rate":"0/0", "avg_frame_rate":"0/0", "time_base":"1/48000", "start_pts":0, "start_time":"0.000000", "duration_ts":860160, "duration":"17.920000", "bit_rate":"1152000", "bits_per_raw_sample":"24", "disposition":{ "default":0, "dub":0, "original":0, "comment":0, "lyrics":0, "karaoke":0, "forced":0, "hearing_impaired":0, "visual_impaired":0, "clean_effects":0, "attached_pic":0, "timed_thumbnails":0 }, "tags":{ "file_package_umid":"0x060A2B340101010501010D2313000000968F75C6B5B34D649967EEDD0076B989" } } ], "format":{ "filename":"/media-caches/video-essence/VIDEO/MXF-XDCAM_HD422@50Mbps1080i25_16Ch/941.mxf", "nb_streams":9, "nb_programs":0, "format_name":"mxf", "format_long_name":"MXF (Material eXchange Format)", "start_time":"0.000000", "duration":"17.920000", "size":"135028296", "bit_rate":"60280489", "probe_score":100, "tags":{ "uid":"0a9ef41a-36b4-4066-a8a3-b95f62299b6c", "generation_uid":"e134647e-fea1-4673-91c1-afa277d13c00", "company_name":"Sony", "product_name":"MPC", "product_version":"v1.0", "application_platform":"Sony MXF Development Kit (Win32)", "product_uid":"060e2b34-0401-0103-0e06-0120027f0200", "modification_date":"2012-09-17T11:56:20.000000Z", "material_package_umid":"0x060A2B340101010501010D231300000081C32F48A63347D4890F55D3ADC25B99", "timecode":"00:35:30:08" } } }
-
How to display image for particular time in a video using ffmpeg
14 février 2020, par Pratik BhingardeveI am trying to created a video from the sequence of images. But i have to display each image with different numbers of seconds. How to do this with FFMPEG.
Thanks in advance.