Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
ffmpeg how to ignore (skip) errors when concatenate and speed up multiple video files
3 avril 2016, par user1767834I'm trying to concatenate many files from my car DVR but some time ffmpeg fails with "Invalid argument" error. My list of files in cf.txt looks like:
file '2016_0403_170004_098.MOV' file '2016_0403_170459_099.MOV' file '2016_0403_170630_100.MOV' ...
And I run ffmpeg using next command:
ffmpeg -f concat -i cf.txt -qscale:v 0 -filter:v "setpts=0.05*PTS" -an e:\MOVIE\all.mov
After some outputs ffmpeg crushes with message:
Output #0, mov, to 'e:\MOVIE\all.mov': Metadata: encoder : Lavf56.40.101 Stream #0:0(eng): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1920x1 080, q=-1--1, 30 fps, 15360 tbn, 30 tbc Metadata: creation_time : 2016-04-03 17:06:27 handler_name : DataHandler encoder : Lavc56.60.100 libx264 Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264)) Press [q] to stop, [?] for help Past duration 0.924995 too large frame= 8 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A dup=0 dro frame= 13 fps= 13 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A dup=0 dro frame= 16 fps= 10 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A dup=0 dro frame= 20 fps=9.8 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A dup=0 dro frame= 24 fps=9.4 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A dup=0 dro frame= 28 fps=9.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A dup=0 dro frame= 33 fps=9.1 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A dup=0 dro frame= 38 fps=9.2 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A dup=0 dro frame= 44 fps=9.5 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A dup=0 dro frame= 48 fps=9.4 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A dup=0 dro frame= 53 fps=9.2 q=29.0 size= 350kB time=00:00:00.03 bitrate=85986.4kbits frame= 58 fps=9.2 q=29.0 size= 1195kB time=00:00:00.20 bitrate=48953.0kbits frame= 62 fps=9.1 q=29.0 size= 1959kB time=00:00:00.33 bitrate=48146.4kbits frame= 67 fps=9.1 q=29.0 size= 2607kB time=00:00:00.50 bitrate=42707.9kbits frame= 71 fps=9.0 q=29.0 size= 3136kB time=00:00:00.63 bitrate=40565.1kbits frame= 76 fps=9.0 q=29.0 size= 3817kB time=00:00:00.80 bitrate=39088.0kbits frame= 81 fps=9.1 q=29.0 size= 4361kB time=00:00:00.96 bitrate=36957.1kbits frame= 87 fps=9.2 q=29.0 size= 5093kB time=00:00:01.16 bitrate=35764.3kbits frame= 92 fps=9.3 q=29.0 size= 5748kB time=00:00:01.33 bitrate=35315.2kbits frame= 97 fps=9.3 q=29.0 size= 6332kB time=00:00:01.50 bitrate=34579.5kbits frame= 101 fps=9.2 q=29.0 size= 6810kB time=00:00:01.63 bitrate=34154.9kbits frame= 106 fps=9.3 q=29.0 size= 7534kB time=00:00:01.80 bitrate=34286.2kbits frame= 111 fps=9.3 q=29.0 size= 8158kB time=00:00:01.96 bitrate=33983.4kbits frame= 115 fps=9.2 q=29.0 size= 8721kB time=00:00:02.10 bitrate=34021.8kbits frame= 120 fps=9.3 q=29.0 size= 9405kB time=00:00:02.26 bitrate=33990.6kbits cf.txt: Invalid argument Last message repeated 4 times frame= 124 fps=7.9 q=-1.0 Lsize= 16574kB time=00:00:04.06 bitrate=33386.9kbit s/s dup=0 drop=1496 video:16572kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.014025% [libx264 @ 05ab3520] frame I:1 Avg QP:26.62 size:244606 [libx264 @ 05ab3520] frame P:65 Avg QP:27.06 size:173968 [libx264 @ 05ab3520] frame B:58 Avg QP:29.32 size: 93380 [libx264 @ 05ab3520] consecutive B-frames: 6.5% 93.5% 0.0% 0.0% [libx264 @ 05ab3520] mb I I16..4: 17.6% 60.1% 22.3% [libx264 @ 05ab3520] mb P I16..4: 3.4% 7.5% 4.8% P16..4: 31.0% 21.3% 17.8% 0.0% 0.0% skip:14.2% [libx264 @ 05ab3520] mb B I16..4: 0.3% 0.6% 1.9% B16..8: 26.3% 10.8% 6.7% direct: 6.7% skip:46.7% L0:39.3% L1:33.9% BI:26.8% [libx264 @ 05ab3520] 8x8 transform intra:45.4% inter:37.9% [libx264 @ 05ab3520] coded y,uvDC,uvAC intra: 73.1% 54.6% 21.5% inter: 38.7% 28. 0% 5.2% [libx264 @ 05ab3520] i16 v,h,dc,p: 25% 41% 22% 12% [libx264 @ 05ab3520] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 17% 27% 6% 4% 5% 5% 8% 8% [libx264 @ 05ab3520] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 11% 15% 10% 8% 8% 8% 12% 10% [libx264 @ 05ab3520] i8c dc,h,v,p: 59% 21% 17% 4% [libx264 @ 05ab3520] Weighted P-Frames: Y:9.2% UV:4.6% [libx264 @ 05ab3520] ref P L0: 48.5% 15.0% 21.9% 14.2% 0.3% [libx264 @ 05ab3520] ref B L0: 72.5% 27.5% [libx264 @ 05ab3520] kb/s:32842.44
See line:
cf.txt: Invalid argument
So, I want to ignore this error (and any other if possible) and continue to process the files. Is it possible?
-
Use bluetooth headset device as audio source in ffmpeg
3 avril 2016, par MuratI want use a bluetooth headset as audio source for recording a video. I can use
arecord -D bluetooth -f s16_le -c1 -r8000
command and pipe audio to ffmpeg. But this cause sync problems in audio and video. so i want to capture audio without arecord. How can i define bluetooth device as audio source in ffmpeg command?My asoundrc file:
pcm.bluetooth { type bluetooth profile "auto" } ctl.bluetooth { type bluetooth }
-
ffmpeg produces video I cannot load on latest Safari on iOS
3 avril 2016, par Michael HeubergerWhen I encode two videos (mp4 and webm) with these ffmpeg parameters (based on images), I cannot play the mp4 it produces on latest Safari (inside a
tag) inside my iPhone 6s using the latest iOS too:
ffmpeg -framerate 15.2 -f image2 -thread_queue_size 64 -i /home/michael-heuberger/abcd/frames/%d.webp -y -an -vcodec libx264 -vf scale=trunc(iw/2)*2:trunc(ih/2)*2 -crf 16 -preset fast -profile:v baseline -pix_fmt yuv420p -movflags +faststart /home/michael-heuberger/abcd/videomail_good.mp4 -vcodec libvpx -vf scale=trunc(iw/2)*2:trunc(ih/2)*2 -crf 8 -deadline good -cpu-used 1 -pix_fmt yuv420p -movflags +faststart /home/michael-heuberger/abcd/videomail_good.webm
I think the above parameters should be solid. I am adding baseline and yuv420p, yet no luck on Safari 9. Why?
And here is the whole ffmpeg output (just ignore the paths to the images/videos):
ffmpeg stdout: ffmpeg version 2.7.6-0ubuntu0.15.10.1 Copyright (c) 2000-2016 the FFmpeg developers built with gcc 5.2.1 (Ubuntu 5.2.1-22ubuntu2) 20151010 configuration: --prefix=/usr --extra-version=0ubuntu0.15.10.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --enable-shared --disable-stripping --enable-avresample --enable-avisynth --enable-frei0r --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-openal --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libxvid --enable-libzvbi --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-libssh --enable-libsoxr --enable-libx264 --enable-libopencv --enable-libx265 WARNING: library configuration mismatch avcodec configuration: --prefix=/usr --extra-version=0ubuntu0.15.10.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --enable-shared --disable-stripping --enable-avresample --enable-avisynth --enable-frei0r --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-openal --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libxvid --enable-libzvbi --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-libssh --enable-libsoxr --enable-libx264 --enable-libopencv --enable-libx265 --enable-version3 --disable-doc --disable-programs --disable-avdevice --disable-avfilter --disable-avformat --disable-avresample --disable-postproc --disable-swscale --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libvo_aacenc --enable-libvo_amrwbenc libavutil 54. 27.100 / 54. 27.100 libavcodec 56. 41.100 / 56. 41.100 libavformat 56. 36.100 / 56. 36.100 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 16.101 / 5. 16.101 libavresample 2. 1. 0 / 2. 1. 0 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 2.100 / 1. 2.100 libpostproc 53. 3.100 / 53. 3.100 Input #0, image2, from '/home/michael-heuberger/binarykitchen/code/videomail.io/var/local/tmp/clients/videomail.io/11e5-f576-676eaa40-b0ac-89a86db14ea0/frames/%d.webp': Duration: 00:00:00.59, start: 0.000000, bitrate: N/A Stream #0:0: Video: webp, yuv420p(tv, bt470bg/unknown/unknown), 400x300, 15.17 fps, 15.20 tbr, 15.20 tbn, 15.20 tbc [libx264 @ 0xfc2760] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 [libx264 @ 0xfc2760] profile Constrained Baseline, level 2.1 [libx264 @ 0xfc2760] 264 - core 146 r2555 0c21480 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=0 ref=2 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=6 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=15 scenecut=40 intra_refresh=0 rc_lookahead=30 rc=crf mbtree=1 crf=16.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00 [libvpx @ 0xfc5da0] v1.4.0 Output #0, mp4, to '/home/michael-heuberger/binarykitchen/code/videomail.io/var/local/uploads/videomail.io/videomail/11e5/f5/76/11e5-f576-676eaa40-b0ac-89a86db14ea0/videomail_good.mp4': Metadata: encoder : Lavf56.36.100 Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 400x300, q=-1--1, 15.20 fps, 19456 tbn, 15.20 tbc Metadata: encoder : Lavc56.41.100 libx264 Output #1, webm, to '/home/michael-heuberger/binarykitchen/code/videomail.io/var/local/uploads/videomail.io/videomail/11e5/f5/76/11e5-f576-676eaa40-b0ac-89a86db14ea0/videomail_good.webm': Metadata: encoder : Lavf56.36.100 Stream #1:0: Video: vp8 (libvpx), yuv420p, 400x300, q=-1--1, 200 kb/s, 15.20 fps, 1k tbn, 15.20 tbc Metadata: encoder : Lavc56.41.100 libvpx Stream mapping: Stream #0:0 -> #0:0 (webp (native) -> h264 (libx264)) Stream #0:0 -> #1:0 (webp (native) -> vp8 (libvpx)) Press [q] to stop, [?] for help [mp4 @ 0xfc16c0] Starting second pass: moving the moov atom to the beginning of the file frame= 9 fps=0.0 q=-1.0 Lq=0.0 size= 62kB time=00:00:00.59 bitrate= 856.1kbits/s video:82kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown [libx264 @ 0xfc2760] frame I:1 Avg QP:15.45 size: 10341 [libx264 @ 0xfc2760] frame P:8 Avg QP:15.95 size: 6442 [libx264 @ 0xfc2760] mb I I16..4: 17.1% 0.0% 82.9% [libx264 @ 0xfc2760] mb P I16..4: 6.8% 0.0% 11.3% P16..4: 36.7% 31.6% 10.8% 0.0% 0.0% skip: 2.8% [libx264 @ 0xfc2760] coded y,uvDC,uvAC intra: 67.5% 60.4% 43.0% inter: 60.5% 68.4% 5.4% [libx264 @ 0xfc2760] i16 v,h,dc,p: 32% 29% 21% 18% [libx264 @ 0xfc2760] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 32% 23% 20% 3% 4% 6% 5% 4% 3% [libx264 @ 0xfc2760] i8c dc,h,v,p: 60% 21% 14% 5% [libx264 @ 0xfc2760] ref P L0: 59.3% 40.7% [libx264 @ 0xfc2760] kb/s:836.04
This makes it difficult for me to play videomails recorded on www.videomail.io on iOS devices.
Am I missing something here? Already did lots of research and tried various combinations, no luck.
If you want to reproduce that, easy: just record a video on www.videomail.io and after that, copy the link of the recorded video page to your iPhone or just download it for local investigation.
Any clues very welcome!
-
FFMPEG Incorrect File Output Path
3 avril 2016, par Benny ChenI'am working in windows 7 32bit and trying to stream file with ffmpeg, but the output file keep going on wrong location.
If I use this code:
ffmpeg -i input -c:v copy -c:a copy output.mp4
The output file will be saved in /Users/{username}
If I use absolute path:
ffmpeg -i input -c:v copy -c:a copy c:/output.mp4
or
ffmpeg -i input -c:v copy -c:a copy "c:/output.mp4"
It put the file in /Users/{username}/AppData/Local/VirtualStore
So..it is weird and what the heck is the "VirtualStore" folder still a mystery....
My question is simple, how to put output file in desired path location. Thanks.
-
ffmpeg m3u8 hls to .ts stream
3 avril 2016, par kekitCurrently I have a m3u8 live HLS stream, generated by a tvheadend + some custom software running in a linux machine.
I would also like to create a single .ts http live streaming option, from my m3u8, using the ffmpeg.
Could someone help me with the command?
Regards