Re: [FFmpeg-user] Change frame rate without dropping/adding frames
Ah yes of course, I had the numbers mixed up in my head. Thanks Nick. Now when I do the conversion, I get all these non-monotonous DTS warnings. Is there any solution to that, other than reducing the loglevel? The output file seems to be correct, albeit without a timecode track. Timecode is not imperative after this kind of conversion, but I do think it would be preferable to stamp the first frame the same as the source. $ ffmpeg -r 12 -i leader.mp4 -an -vcodec copy -f avi leader-slow.avi ffmpeg version 2.4.git-e113692 Copyright (c) 2000-2014 the FFmpeg developers built on Oct 4 2014 21:20:35 with Apple LLVM version 6.0 (clang-600.0.51) (based on LLVM 3.5svn) configuration: --prefix=/opt/local --enable-swscale --enable-avfilter --enable-avresample --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-libtheora --enable-libschroedinger --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libspeex --enable-libass --enable-libbluray --enable-lzma --enable-gnutls --enable-fontconfig --enable-libfreetype --enable-libfribidi --disable-indev=jack --disable-outdev=xv --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/clang --enable-vda --arch=x86_64 --enable-yasm --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid --enable-nonfree --enable-libfdk-aac --enable-libfaac libavutil 54. 7.101 / 54. 7.101 libavcodec 56. 1.101 / 56. 1.101 libavformat56. 5.100 / 56. 5.100 libavdevice56. 1.100 / 56. 1.100 libavfilter 5. 1.102 / 5. 1.102 libavresample 2. 1. 0 / 2. 1. 0 libswscale 3. 1.100 / 3. 1.100 libswresample 1. 1.100 / 1. 1.100 libpostproc53. 1.100 / 53. 1.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'leader.mp4': Metadata: major_brand : M4V minor_version : 1 compatible_brands: M4V mp42isom creation_time : 2015-01-16 00:15:42 Duration: 00:00:08.09, start: 0.00, bitrate: 2369 kb/s Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 2181 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default) Metadata: creation_time : 2015-01-16 00:15:42 handler_name: Mainconcept MP4 Video Media Handler encoder : AVC Coding Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 189 kb/s (default) Metadata: creation_time : 2015-01-16 00:15:42 handler_name: Mainconcept MP4 Sound Media Handler Output #0, avi, to 'leader-slow.avi': Metadata: major_brand : M4V minor_version : 1 compatible_brands: M4V mp42isom ISFT: Lavf56.5.100 Stream #0:0(eng): Video: h264 (avc1 / 0x31637661), yuv420p, 1920x1080, q=2-31, 2181 kb/s, 23.98 fps, 12 tbn, 12 tbc (default) Metadata: creation_time : 2015-01-16 00:15:42 handler_name: Mainconcept MP4 Video Media Handler encoder : AVC Coding Stream mapping: Stream #0:0 -> #0:0 (copy) Press [q] to stop, [?] for help [avi @ 0x7fb56392ec00] Non-monotonous DTS in output stream 0:0; previous: 1, current: 1; changing to 2. This may result in incorrect timestamps in the output file. [avi @ 0x7fb56392ec00] Non-monotonous DTS in output stream 0:0; previous: 2, current: 2; changing to 3. This may result in incorrect timestamps in the output file. [avi @ 0x7fb56392ec00] Non-monotonous DTS in output stream 0:0; previous: 3, current: 2; changing to 4. This may result in incorrect timestamps in the output file. [avi @ 0x7fb56392ec00] Non-monotonous DTS in output stream 0:0; previous: 4, current: 3; changing to 5. This may result in incorrect timestamps in the output file. [avi @ 0x7fb56392ec00] Non-monotonous DTS in output stream 0:0; previous: 5, current: 3; changing to 6. This may result in incorrect timestamps in the output file. [avi @ 0x7fb56392ec00] Non-monotonous DTS in output stream 0:0; previous: 6, current: 4; changing to 7. This may result in incorrect timestamps in the output file. [avi @ 0x7fb56392ec00] Non-monotonous DTS in output stream 0:0; previous: 7, current: 4; changing to 8. This may result in incorrect timestamps in the output file. [avi @ 0x7fb56392ec00] Non-monotonous DTS in output stream 0:0; previous: 8, current: 5; changing to 9. This may result in incorrect timestamps in the output file. [avi @ 0x7fb56392ec00] Non-monotonous DTS in output stream 0:0; previous: 9, current: 5; changing to 10. This may result in incorrect timestamps in the output file. [avi @ 0x7fb56392ec00] Non-monotonous DTS in output stream 0:0; previous: 10, current: 6; changing to 11. This may result in incorrect timestamps in the output file. [avi @ 0x7fb56392ec00] Non-monotonous DTS in output stream 0:0; previous: 11, current: 6; changing to 12. This may result in incorrect timestamps in the output file. [avi @ 0x7fb56392ec00] Non-monotonous DTS in output stream 0:0; previous: 12, current: 7; changing to 13. This may result in incorrect timestamps in the outp
Re: [FFmpeg-user] Change frame rate without dropping/adding frames
> On Thursday, January 15, 2015 7:30 PM, Elliott Balsley > wrote: > > After a long break from this issue, I have a new problem. For > example, I want to take a 24fps video and make it play slow-mo at > 12fps. The input option -r is dropping frames, rather than slowing > down the playback speed. I don't have my main computer right now, > which uses the latest git master; I'm just using my laptop which uses > a macports build, so maybe that's the reason? Or am I using this > command wrong? > > $ ffmpeg -r 24 -i /temp/leader.mp4 -r 12 test.mov You are using the command wrong. That says "use this input as if it were 24fps. Do stuff with that, and then encode the resulting video as 12fps, discarding/dupping frames if needed." Two options that should work: ffmpeg -r 12 -i /temp/leader.mp4 test.mov or ffmpeg -i /temp/leader.mp4 -vf setpts=2.0*PTS test.mov -Nick ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Re: [FFmpeg-user] Change frame rate without dropping/adding frames
After a long break from this issue, I have a new problem. For example, I want to take a 24fps video and make it play slow-mo at 12fps. The input option -r is dropping frames, rather than slowing down the playback speed. I don't have my main computer right now, which uses the latest git master; I'm just using my laptop which uses a macports build, so maybe that's the reason? Or am I using this command wrong? $ ffmpeg -r 24 -i /temp/leader.mp4 -r 12 test.mov ffmpeg version 2.4.git-e113692 Copyright (c) 2000-2014 the FFmpeg developers built on Oct 4 2014 21:20:35 with Apple LLVM version 6.0 (clang-600.0.51) (based on LLVM 3.5svn) configuration: --prefix=/opt/local --enable-swscale --enable-avfilter --enable-avresample --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-libtheora --enable-libschroedinger --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libspeex --enable-libass --enable-libbluray --enable-lzma --enable-gnutls --enable-fontconfig --enable-libfreetype --enable-libfribidi --disable-indev=jack --disable-outdev=xv --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/clang --enable-vda --arch=x86_64 --enable-yasm --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid --enable-nonfree --enable-libfdk-aac --enable-libfaac libavutil 54. 7.101 / 54. 7.101 libavcodec 56. 1.101 / 56. 1.101 libavformat56. 5.100 / 56. 5.100 libavdevice56. 1.100 / 56. 1.100 libavfilter 5. 1.102 / 5. 1.102 libavresample 2. 1. 0 / 2. 1. 0 libswscale 3. 1.100 / 3. 1.100 libswresample 1. 1.100 / 1. 1.100 libpostproc53. 1.100 / 53. 1.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/temp/leader.mp4': Metadata: major_brand : M4V minor_version : 1 compatible_brands: M4V mp42isom creation_time : 2015-01-16 00:15:42 Duration: 00:00:08.09, start: 0.00, bitrate: 2369 kb/s Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 2181 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default) Metadata: creation_time : 2015-01-16 00:15:42 handler_name: Mainconcept MP4 Video Media Handler encoder : AVC Coding Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 189 kb/s (default) Metadata: creation_time : 2015-01-16 00:15:42 handler_name: Mainconcept MP4 Sound Media Handler File 'test.mov' already exists. Overwrite ? [y/N] y [libx264 @ 0x7fd9ab017000] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2 [libx264 @ 0x7fd9ab017000] profile High, level 4.0 [libx264 @ 0x7fd9ab017000] 264 - core 142 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 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=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=12 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00 Output #0, mov, to 'test.mov': Metadata: major_brand : M4V minor_version : 1 compatible_brands: M4V mp42isom encoder : Lavf56.5.100 Stream #0:0(eng): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1920x1080, q=-1--1, 12 fps, 12288 tbn, 12 tbc (default) Metadata: creation_time : 2015-01-16 00:15:42 handler_name: Mainconcept MP4 Video Media Handler encoder : Lavc56.1.101 libx264 Stream #0:1(eng): Audio: aac (libfaac) (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 128 kb/s (default) Metadata: creation_time : 2015-01-16 00:15:42 handler_name: Mainconcept MP4 Sound Media Handler encoder : Lavc56.1.101 libfaac Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264)) Stream #0:1 -> #0:1 (aac (native) -> aac (libfaac)) Press [q] to stop, [?] for help frame= 99 fps= 76 q=-1.0 Lsize= 335kB time=00:00:08.08 bitrate= 339.8kbits/s dup=0 drop=94 video:327kB audio:4kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.351535% [libx264 @ 0x7fd9ab017000] frame I:2 Avg QP:20.20 size: 14859 [libx264 @ 0x7fd9ab017000] frame P:77Avg QP:19.99 size: 3863 [libx264 @ 0x7fd9ab017000] frame B:20Avg QP:12.33 size: 339 [libx264 @ 0x7fd9ab017000] consecutive B-frames: 72.7% 0.0% 3.0% 24.2% [libx264 @ 0x7fd9ab017000] mb I I16..4: 25.2% 65.1% 9.6% [libx264 @ 0x7fd9ab017000] mb P I16..4: 1.8% 8.8% 2.0% P16..4: 0.6% 0.1% 0.1% 0.0% 0.0%skip:86.6% [libx264 @ 0x7fd9ab017000] mb B I16..4: 0.0% 0.0% 0.1% B16..8: 0.2% 0.0% 0.0% direct: 0.0% skip:99.7% L0:55.
[FFmpeg-user] HELP WITH H264
Hi everyone! I am trying to encode an mpeg4 with the following characteristics, but have not had much success pasting codes together. Could someone please help me. Advanced Video Coding (AVC) MPEG-4, Part 10, (H.264 ) 720x480 NTSC 16:9 Anamorphic Main Profile, Level 3.0 CABAC Constant bit rate encoding 2.0 Mb/s VBV value 130202 Bytes or less Closed GOP GOP size equal to 1⁄2 second Every I-frame must be in an IDR. IDR Frequency set to 1. Streaming format SPS and other sequence headers shall be repeated throughout the stream to facilitate fast decoder synchronization during random access. B-Frames shall be used when Main Profile is chosen No referenced B-Frames Number of B-frames set to 2 or 3 Number of reference frames set to 2 Encode without weighted prediction Encoding from 29.97 frames/s progressive scan Number of slices set to 1, 2, or 4 Deblocking filter shall be enabled Video-Audio Elementary Stream MP3 audio elementary streams With three different audio streams in the video file. PAT PID = 0x00 PMT PID = 0x3F PCR PID = 0x30 Audio 1 PID = 0x30 Audio 2 PID = 0x31 Audio 3 PID = 0x32 Audio at a constant bit rate 256 Kb/s joint stereo 48 kHz THANK YOU!! ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Re: [FFmpeg-user] MPEG-2 CBR
On 1/15/15, Janez Miklavcic wrote: > Thank you for your help! > > The fact is taht when using hardware encoder and you set mux rate to > 20Mbit/s and video to 2Mbit/s the "space" between 2 Mbit and 20 Mbit/s will > be filled with null packets, this is not in this case. > Now I reduced Mux rate and it is not exceeded by the tests I did with TS > reader. But still this encoder doesn't behave like a hardware one, but no > problem. > Please note, that I use this multicast stream for input into the hardware > multiplexer. > > The other problem that I have with the same video settings is when I add > audio stream. When I add audio stream there are problems on sound all the > time. > If I use the same settings but without video input it works without a > problem. > The problem is only on hardware (all that I tested), it works on VLC with > no problem. > > > Here is commandline: > > f:/ffmpeg/bin/ffmpeg.exe -f dshow -video_size 720x576 -framerate 2 > -pixel_format bgr24 -i video="VidBlaster VVD" -i udp://232.8.8.11:5002 > -acodec mp2 -ar 48000 -b:a 192k -mpegts_service_id 0x002 -vcodec mpeg2video > -b:v 500k -minrate:v 500k -maxrate:v 500k -bufsize:v 1024k -s: 720x576 -f > mpegts -r 10 -g 30 -muxrate 1.5M -mpegts_pmt_start_pid 0x3E8 > -mpegts_start_pid 0x3E9 -metadata service_name="POLANC TV INFO" -metadata > service_provider="SVISLAR telekom d.o.o." udp:// > 232.8.8.8:55002?pkt_size=188&buffer_size=6M You're sending and receiving over udp, possibly packet loss explains your problem somehow...is there a way to tell if the packet loss is incoming or outgoing? > > > 2015-01-15 13:17 GMT+01:00 Claudiu Rad-Lohanel : > >> >> On 1/15/2015 1:30 PM, Janez Miklavcic wrote: >> >>> f:/ffmpeg/bin/ffmpeg.exe -f dshow -video_size 720x576 -framerate 25 >>> -pixel_format bgr24 -i video="VidBlaster VVD" -mpegts_service_id 0x002 >>> -metadata service_name="POLANC TV INFO" -metadata >>> service_provider="SVISLAR >>> telekom d.o.o." -vcodec mpeg2video -b:v 2000k -minrate:v 2000k >>> -maxrate:v >>> 2000k -bufsize 20k -q 3 -s: 720x576 -r 25 -g 50 -f mpegts >>> -mpegts_pmt_start_pid 0x3E8 -mpegts_start_pid 0x3E9 -muxrate 20M udp:// >>> 232.8.8.8:55002?pkt_size=188 >>> >> >> what's this? what would you expect it to do if you tell it to go at >> 20Mbit? >> >> -muxrate 20M >> >> >> >>> Although bitrate is set to 2Mbit/s it jumps to 20 Mbit/s. >>> >>> Thnaks, >>> Janez >>> >>> 2015-01-15 12:03 GMT+01:00 Roger Pack : >>> >>> On 1/14/15, Janez Miklavcic wrote: > Dear All, > > I've been trying to achive constant video bitrate for mpeg-2 with > different > settings of ffmpeg (windows) but no success. > The source was dshow. > I've been testing video bitrate with TS reader. > Can you tell me if video CBR in MPEG-2 is possible or not and if yes > can > you send me the settings. > uncut command line and console output of failing example please? ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user ___ >>> ffmpeg-user mailing list >>> ffmpeg-user@ffmpeg.org >>> http://ffmpeg.org/mailman/listinfo/ffmpeg-user >>> >> >> -- >> jazzman >> >> >> ___ >> ffmpeg-user mailing list >> ffmpeg-user@ffmpeg.org >> http://ffmpeg.org/mailman/listinfo/ffmpeg-user >> > ___ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-user > ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Re: [FFmpeg-user] output jpeg quality
On 15 Jan 2015, Lou wrote: > On 14 Jan 2015, Green Koopa wrote: > > -q did set the jpeg compression level, making it consistent across > > frames. > > (It had no affect on the png compression level.) Thanks for the tips Lou. > > For PNG you can use -compression_level. Range is 0-100. Default is 100 > (highest compression, IIRC). Thanks again Lou. Any tips on where I could have learned that without bothering everyone with basic questions? ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Re: [FFmpeg-user] output jpeg quality
On Wed, Jan 14, 2015, at 11:05 PM, Green Koopa wrote: > -q did set the jpeg compression level, making it consistent across > frames. > (It had no affect on the png compression level.) Thanks for the tips Lou. For PNG you can use -compression_level. Range is 0-100. Default is 100 (highest compression, IIRC). ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Re: [FFmpeg-user] MPEG-2 CBR
Thank you for your help! The fact is taht when using hardware encoder and you set mux rate to 20Mbit/s and video to 2Mbit/s the "space" between 2 Mbit and 20 Mbit/s will be filled with null packets, this is not in this case. Now I reduced Mux rate and it is not exceeded by the tests I did with TS reader. But still this encoder doesn't behave like a hardware one, but no problem. Please note, that I use this multicast stream for input into the hardware multiplexer. The other problem that I have with the same video settings is when I add audio stream. When I add audio stream there are problems on sound all the time. If I use the same settings but without video input it works without a problem. The problem is only on hardware (all that I tested), it works on VLC with no problem. Here is commandline: f:/ffmpeg/bin/ffmpeg.exe -f dshow -video_size 720x576 -framerate 2 -pixel_format bgr24 -i video="VidBlaster VVD" -i udp://232.8.8.11:5002 -acodec mp2 -ar 48000 -b:a 192k -mpegts_service_id 0x002 -vcodec mpeg2video -b:v 500k -minrate:v 500k -maxrate:v 500k -bufsize:v 1024k -s: 720x576 -f mpegts -r 10 -g 30 -muxrate 1.5M -mpegts_pmt_start_pid 0x3E8 -mpegts_start_pid 0x3E9 -metadata service_name="POLANC TV INFO" -metadata service_provider="SVISLAR telekom d.o.o." udp:// 232.8.8.8:55002?pkt_size=188&buffer_size=6M 2015-01-15 13:17 GMT+01:00 Claudiu Rad-Lohanel : > > On 1/15/2015 1:30 PM, Janez Miklavcic wrote: > >> f:/ffmpeg/bin/ffmpeg.exe -f dshow -video_size 720x576 -framerate 25 >> -pixel_format bgr24 -i video="VidBlaster VVD" -mpegts_service_id 0x002 >> -metadata service_name="POLANC TV INFO" -metadata >> service_provider="SVISLAR >> telekom d.o.o." -vcodec mpeg2video -b:v 2000k -minrate:v 2000k -maxrate:v >> 2000k -bufsize 20k -q 3 -s: 720x576 -r 25 -g 50 -f mpegts >> -mpegts_pmt_start_pid 0x3E8 -mpegts_start_pid 0x3E9 -muxrate 20M udp:// >> 232.8.8.8:55002?pkt_size=188 >> > > what's this? what would you expect it to do if you tell it to go at 20Mbit? > > -muxrate 20M > > > >> Although bitrate is set to 2Mbit/s it jumps to 20 Mbit/s. >> >> Thnaks, >> Janez >> >> 2015-01-15 12:03 GMT+01:00 Roger Pack : >> >> On 1/14/15, Janez Miklavcic wrote: >>> Dear All, I've been trying to achive constant video bitrate for mpeg-2 with >>> different >>> settings of ffmpeg (windows) but no success. The source was dshow. I've been testing video bitrate with TS reader. Can you tell me if video CBR in MPEG-2 is possible or not and if yes can you send me the settings. >>> uncut command line and console output of failing example please? >>> ___ >>> ffmpeg-user mailing list >>> ffmpeg-user@ffmpeg.org >>> http://ffmpeg.org/mailman/listinfo/ffmpeg-user >>> >>> ___ >> ffmpeg-user mailing list >> ffmpeg-user@ffmpeg.org >> http://ffmpeg.org/mailman/listinfo/ffmpeg-user >> > > -- > jazzman > > > ___ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-user > ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Re: [FFmpeg-user] MPEG-2 CBR
On 1/15/2015 1:30 PM, Janez Miklavcic wrote: f:/ffmpeg/bin/ffmpeg.exe -f dshow -video_size 720x576 -framerate 25 -pixel_format bgr24 -i video="VidBlaster VVD" -mpegts_service_id 0x002 -metadata service_name="POLANC TV INFO" -metadata service_provider="SVISLAR telekom d.o.o." -vcodec mpeg2video -b:v 2000k -minrate:v 2000k -maxrate:v 2000k -bufsize 20k -q 3 -s: 720x576 -r 25 -g 50 -f mpegts -mpegts_pmt_start_pid 0x3E8 -mpegts_start_pid 0x3E9 -muxrate 20M udp:// 232.8.8.8:55002?pkt_size=188 what's this? what would you expect it to do if you tell it to go at 20Mbit? -muxrate 20M Although bitrate is set to 2Mbit/s it jumps to 20 Mbit/s. Thnaks, Janez 2015-01-15 12:03 GMT+01:00 Roger Pack : On 1/14/15, Janez Miklavcic wrote: Dear All, I've been trying to achive constant video bitrate for mpeg-2 with different settings of ffmpeg (windows) but no success. The source was dshow. I've been testing video bitrate with TS reader. Can you tell me if video CBR in MPEG-2 is possible or not and if yes can you send me the settings. uncut command line and console output of failing example please? ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user -- jazzman ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Re: [FFmpeg-user] MPEG-2 CBR
f:/ffmpeg/bin/ffmpeg.exe -f dshow -video_size 720x576 -framerate 25 -pixel_format bgr24 -i video="VidBlaster VVD" -mpegts_service_id 0x002 -metadata service_name="POLANC TV INFO" -metadata service_provider="SVISLAR telekom d.o.o." -vcodec mpeg2video -b:v 2000k -minrate:v 2000k -maxrate:v 2000k -bufsize 20k -q 3 -s: 720x576 -r 25 -g 50 -f mpegts -mpegts_pmt_start_pid 0x3E8 -mpegts_start_pid 0x3E9 -muxrate 20M udp:// 232.8.8.8:55002?pkt_size=188 Although bitrate is set to 2Mbit/s it jumps to 20 Mbit/s. Thnaks, Janez 2015-01-15 12:03 GMT+01:00 Roger Pack : > On 1/14/15, Janez Miklavcic wrote: > > Dear All, > > > > I've been trying to achive constant video bitrate for mpeg-2 with > different > > settings of ffmpeg (windows) but no success. > > The source was dshow. > > I've been testing video bitrate with TS reader. > > Can you tell me if video CBR in MPEG-2 is possible or not and if yes can > > you send me the settings. > > uncut command line and console output of failing example please? > ___ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-user > ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Re: [FFmpeg-user] MPEG-2 CBR
On 1/14/15, Janez Miklavcic wrote: > Dear All, > > I've been trying to achive constant video bitrate for mpeg-2 with different > settings of ffmpeg (windows) but no success. > The source was dshow. > I've been testing video bitrate with TS reader. > Can you tell me if video CBR in MPEG-2 is possible or not and if yes can > you send me the settings. uncut command line and console output of failing example please? ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Re: [FFmpeg-user] Usages about multi outputs
On Thu, Jan 15, 2015 at 18:06:26 +0800, xiaoyao...@163.com wrote: > Perfect! It works with small change from -map "0:a" to -map 0:a. Actually, you meant my -map "[0:a]". Sorry, my bad. There _should_ also be some way to encode your audio only once, since both your encodings are identical. Someone else will have to answer that... I can't think of a way right now with only one ffmpeg call. > Thanks a lot! You're welcome, Moritz ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Re: [FFmpeg-user] Usages about multi outputs
Thanks Moritz, Perfect! It works with small change from -map "0:a" to -map 0:a. Thanks a lot! From: Moritz Barsnick Date: 2015-01-15 17:53 To: FFmpeg user discussions Subject: Re: [FFmpeg-user] Usages about multi outputs On Thu, Jan 15, 2015 at 10:27:02 +0100, Moritz Barsnick wrote: > On Thu, Jan 15, 2015 at 16:35:20 +0800, xiaoyao...@163.com wrote: > > ./ffmpeg -i input.mp4 -i logo.png -filter_complex > > "yadif=deint=1,subtitles=subtitle.ass,delogo=x=60:y=60:w=100:h=77:band=10,overlay=10:10,split=2[a][b]" > > -map "[a]" -map 0:a -filter_complex scale=640:-1 -pass 1 -vcodec libx264 > > -r 25 -b:v 230k -profile:v high -c:a libfdk_aac -b:a 64k -ar 44100 > > -profile:a aac_he output1.mp4 -map "[b]" -map 0:a -filter_complex > > scale=960:-1 -pass 1 -vcodec libx264 -r 25 -b:v 550k -profile:v high -c:a > > libfdk_aac -b:a 64k -ar 44100 -profile:a aac_he output2.mp4 Here, I have tried to combine those three filters for you properly. Just guessing, but this should work: $ ./ffmpeg -i input.mp4 -i logo.png -filter_complex "yadif=deint=1,subtitles=subtitle.ass,delogo=x=60:y=60:w=100:h=77:band=10,overlay=10:10,split=2[a][b]; [a]scale=640:-1[a2]; [b]scale=960:-1[b2]" -map "[a2]" -map "[0:a]" -pass 1 -vcodec libx264 -r 25 -b:v 230k -profile:v high -c:a libfdk_aac -b:a 64k -ar 44100 -profile:a aac_he output1.mp4 -map "[b2]" -map "0:a" -pass 1 -vcodec libx264 -r 25 -b:v 550k -profile:v high -c:a libfdk_aac -b:a 64k -ar 44100 -profile:a aac_he output2.mp4 Moritz ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Re: [FFmpeg-user] Usages about multi outputs
On Thu, Jan 15, 2015 at 10:27:02 +0100, Moritz Barsnick wrote: > On Thu, Jan 15, 2015 at 16:35:20 +0800, xiaoyao...@163.com wrote: > > ./ffmpeg -i input.mp4 -i logo.png -filter_complex > > "yadif=deint=1,subtitles=subtitle.ass,delogo=x=60:y=60:w=100:h=77:band=10,overlay=10:10,split=2[a][b]" > > -map "[a]" -map 0:a -filter_complex scale=640:-1 -pass 1 -vcodec libx264 > > -r 25 -b:v 230k -profile:v high -c:a libfdk_aac -b:a 64k -ar 44100 > > -profile:a aac_he output1.mp4 -map "[b]" -map 0:a -filter_complex > > scale=960:-1 -pass 1 -vcodec libx264 -r 25 -b:v 550k -profile:v high -c:a > > libfdk_aac -b:a 64k -ar 44100 -profile:a aac_he output2.mp4 Here, I have tried to combine those three filters for you properly. Just guessing, but this should work: $ ./ffmpeg -i input.mp4 -i logo.png -filter_complex "yadif=deint=1,subtitles=subtitle.ass,delogo=x=60:y=60:w=100:h=77:band=10,overlay=10:10,split=2[a][b]; [a]scale=640:-1[a2]; [b]scale=960:-1[b2]" -map "[a2]" -map "[0:a]" -pass 1 -vcodec libx264 -r 25 -b:v 230k -profile:v high -c:a libfdk_aac -b:a 64k -ar 44100 -profile:a aac_he output1.mp4 -map "[b2]" -map "0:a" -pass 1 -vcodec libx264 -r 25 -b:v 550k -profile:v high -c:a libfdk_aac -b:a 64k -ar 44100 -profile:a aac_he output2.mp4 Moritz ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Re: [FFmpeg-user] Usages about multi outputs
Thanks Moritz, Below are the all outputs. Maybe one filter_complex can feed all filters, but I do not have much experience about how to make it. [root@cdn ffmpeg_dev]# ./ffmpeg -input.mp4 -i logo.png -filter_complex "yadif=deint=1,subtitles=subtitle.ass,delogo=x=60:y=60:w=100:h=77:band=10,overlay=10:10,split=2[a][b]" -map "[a]" -map 0:a -filter_complex scale=640:-1:sws_flags=lanczos -pass 1 -vcodec libx264 -r 25 -b:v 230k -profile:v high -c:a libfdk_aac -b:a 64k -ar 44100 -profile:a aac_he output1.mp4 -map "[b]" -map 0:a -filter_complex scale=960:-1:sws_flags=lanczos -pass 1 -vcodec libx264 -r 25 -b:v 550k -profile:v high -c:a libfdk_aac -b:a 64k -ar 44100 -profile:a aac_he output2.mp4 ffmpeg version 2.5 Copyright (c) 2000-2014 the FFmpeg developers built on Jan 14 2015 18:30:31 with gcc 4.4.6 (GCC) 20110731 (Red Hat 4.4.6-3) configuration: --prefix=/root/ffmpeg_build --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin --enable-gpl --enable-nonfree --enable-libfdk_aac --enable-memalign-hack --enable-version3 --enable-libass --enable-libx264 --enable-static libavutil 54. 15.100 / 54. 15.100 libavcodec 56. 13.100 / 56. 13.100 libavformat 56. 15.102 / 56. 15.102 libavdevice 56. 3.100 / 56. 3.100 libavfilter 5. 2.103 / 5. 2.103 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 1.100 / 1. 1.100 libpostproc 53. 3.100 / 53. 3.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 creation_time : 1970-01-01 00:00:00 encoder : Lavf52.78.5 Duration: 00:02:29.93, start: 0.00, bitrate: 10338 kb/s Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x800, 10338 kb/s, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default) Metadata: creation_time : 1970-01-01 00:00:00 handler_name : VideoHandler Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 64 kb/s (default) Metadata: creation_time : 1970-01-01 00:00:00 handler_name : SoundHandler Input #1, png_pipe, from 'logo.png': Duration: N/A, bitrate: N/A Stream #1:0: Video: png, rgba, 90x120, 25 tbr, 25 tbn, 25 tbc Cannot find a matching stream for unlabeled input pad 0 on filter Parsed_scale_0 xiaoyao...@163.com From: Moritz Barsnick Date: 2015-01-15 17:27 To: FFmpeg user discussions Subject: Re: [FFmpeg-user] Usages about multi outputs On Thu, Jan 15, 2015 at 16:35:20 +0800, xiaoyao...@163.com wrote: > There is error outputs like below: Please post the complete, uncut output from your command. For debugging filter chains, it helps to add "-loglevel debug", so please also add that. The issue is probably that you cannot specify more than one "-filter_complex" (I think). You should be able to specify your complete filters for multiple outputs in one "-filter_complex". Moritz ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Re: [FFmpeg-user] cutting and splicing
On date Thursday 2015-01-15 01:11:00 -0800, Green Koopa wrote: > In short order I got ffmpeg to read a video, apply a few filters (crop, > color adjustments, sharpness, volume), and output a new file. The extensive > documentation is a blessing to this new user. > > After applying the filters, I would like to edit the video to shorten it. > Specifically, I would like to take two non-overlapping segments from the > middle of the video and concatenate them, ideally with a fade or other > transition. > > I see -ss, -t, and -to for cutting an input file and the Concat demuxer for > merging files. Would this method necessitate writing my filtered file out? > I don't see how it could allow for a transition effect. I suggest to use a separate ffmpeg command to cut each segment (with -ss/-t/-to) and use fade/afade start time and duration options. Then use the concat muxer to concatenate the segments together. Note that at the moment it is not possible to select multiple segments with a single ffmpeg command (e.g. by specifying several seek commands), and [a]select requires the transcoding of the whole file. ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Re: [FFmpeg-user] Usages about multi outputs
On Thu, Jan 15, 2015 at 16:35:20 +0800, xiaoyao...@163.com wrote: > There is error outputs like below: Please post the complete, uncut output from your command. For debugging filter chains, it helps to add "-loglevel debug", so please also add that. The issue is probably that you cannot specify more than one "-filter_complex" (I think). You should be able to specify your complete filters for multiple outputs in one "-filter_complex". Moritz ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
[FFmpeg-user] cutting and splicing
In short order I got ffmpeg to read a video, apply a few filters (crop, color adjustments, sharpness, volume), and output a new file. The extensive documentation is a blessing to this new user. After applying the filters, I would like to edit the video to shorten it. Specifically, I would like to take two non-overlapping segments from the middle of the video and concatenate them, ideally with a fade or other transition. I see -ss, -t, and -to for cutting an input file and the Concat demuxer for merging files. Would this method necessitate writing my filtered file out? I don't see how it could allow for a transition effect. I also see the select, split, and overlay filters. I'm not sure what else I would need or how to put it all together. I have much experience with images (imagemagick is great), but I don't fully grasp how to place clips in time or how to keep audio in sync. I couldn't find any examples of this. Where do I read next? I really appreciate any help! ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
[FFmpeg-user] Usages about multi outputs
Hi, I am not sure if anyone asked this kind of question before. Now I want to build a system with one In and N outs with FFMPEG. The system likes below: In>deinterlace--->subtitle>delogo--->logo |- scale 0--->venc_0 + aenc_0--->out 0 |--scale 1--->venc _1 + aenc_1--->out 1 I tried to build the system with below command, but it failed., and I escaped the encoding parameters for simple. ./ffmpeg -i input.mp4 -i logo.png -filter_complex "yadif=deint=1,subtitles=subtitle.ass,delogo=x=60:y=60:w=100:h=77:band=10,overlay=10:10,split=2[a][b]" -map "[a]" -map 0:a -filter_complex scale=640:-1 -pass 1 -vcodec libx264 -r 25 -b:v 230k -profile:v high -c:a libfdk_aac -b:a 64k -ar 44100 -profile:a aac_he output1.mp4 -map "[b]" -map 0:a -filter_complex scale=960:-1 -pass 1 -vcodec libx264 -r 25 -b:v 550k -profile:v high -c:a libfdk_aac -b:a 64k -ar 44100 -profile:a aac_he output2.mp4 There is error outputs like below: Cannot find a matching stream for unlabeled input pad 0 on filter Parsed_scale_0 Can anyone give me some suggestion for such usage? Thanks a lot! ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Re: [FFmpeg-user] output jpeg quality
On Thu, Jan 15, 2015 at 00:05:51 -0800, Green Koopa wrote: > When outputting frames like this, is there a way to put the frame > number/time in the output file name? Otherwise, it looks like I have to use > the drawtext filter to add it to the images. Sure. It's mentioned here: https://www.ffmpeg.org/ffmpeg-all.html#image2-2 The output filenames are specified by a pattern, which can be used to produce sequentially numbered series of files. The pattern may contain the string "%d" or "%0Nd", this string specifies the position of the characters representing a numbering in the filenames. If the form "%0Nd" is used, the string representing the number in each filename is 0-padded to N digits. So $ ffmpeg ... -f image2 "img-%03d.jpg" counts from 001. If also supports strftime() style patterns: For example to generate image files from the strftime() "%Y-%m-%d_%H-%M-%S" pattern, the following ffmpeg command can be used: $ ffmpeg -f v4l2 -r 1 -i /dev/video0 -f image2 -strftime 1 "%Y-%m-%d_%H-%M-%S.jpg" Note that the time stamps are current time, not frame "time stamps" such as PTS. also note that the frame numbers are those arriving at the muxer, disregardless of how many frames came in at the demuxer and were added or dropped. HTH, Moritz ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Re: [FFmpeg-user] output jpeg quality
On 12 Jan 2015, Lou wrote: > On 10 Jan 2015, Green Koopa wrote: > > This creates one image for each second of video: > > ffmpeg -i 00020.MTS -vf fps=fps=1 -f image2 stills-%03d.png > > > > When I change the output format to jpeg, it does the same: > > ffmpeg -i 00020.MTS -vf fps=fps=1 -f image2 stills-%03d.jpeg > > But there is a problem. The quality of the jpegs begin okay, but quickly > > deteriorate. By the tenth image or so, they are unusable. This seems > > strange to me, but this is my first day with ffmpeg. > > Does it look better if you use -qscale:v (or -q:v)? It's a linear scale > of 1-31. A doubling of the value will probably (very) roughly halve the > bitrate. 2-5 are good values to try, but you can experiment. > > You don't need the "-f image2". > -q did set the jpeg compression level, making it consistent across frames. (It had no affect on the png compression level.) Thanks for the tips Lou. When outputting frames like this, is there a way to put the frame number/time in the output file name? Otherwise, it looks like I have to use the drawtext filter to add it to the images. ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user