
Recherche avancée
Médias (1)
-
Sintel MP4 Surround 5.1 Full
13 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
Autres articles (21)
-
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
ANNEXE : Les plugins utilisés spécifiquement pour la ferme
5 mars 2010, parLe site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)
-
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...)
Sur d’autres sites (3652)
-
How to log unconverted files in FFMPEG due to error ?
10 juillet 2017, par eugenemonI am converting 30,000 video files (each with different number of data/video/audio/subtitle streams) using a single batch file. I do not require data/subtitle streams. This is the code I am using for the batch file :
for %%i in (*.dat *.mpg *.mpeg) do ffmpeg -hide_banner -v info -n -i %%i -map 0 -dn -sn -c:v libx264 -crf 20 -c:a aac -b:a 192k "%%~ni.mp4" >> log.txt 2>&1
pauseThe resulting log file that I get is 1.67gb in file size and is extremely difficult for me to go through to find the errors of files that weren’t converted.
An example of a successfully converted file would look like this in the log file :
Input #0, mpeg, from '571317.mpg':
Duration: 00:05:06.02, start: 0.060000, bitrate: 2991 kb/s
Stream #0:0[0x1bf]: Data: dvd_nav_packet
Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, smpte170m, top first), 720x480 [SAR 8:9 DAR 4:3], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0:2[0x81]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
Stream #0:3[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16p, 224 kb/s
Stream mapping:
Stream #0:1 -> #0:0 (mpeg2video (native) -> h264 (libx264))
Stream #0:2 -> #0:1 (ac3 (native) -> aac (native))
Stream #0:3 -> #0:2 (mp2 (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 000000000043c3a0] using SAR=8/9
[libx264 @ 000000000043c3a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 000000000043c3a0] profile High, level 3.0
[libx264 @ 000000000043c3a0] 264 - core 148 r2762 90a61ec - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - 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=6 lookahead_threads=1 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=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=20.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'F:\571317.mp4':
Metadata:
encoder : Lavf57.71.100
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p(top coded first (swapped)), 720x480 [SAR 8:9 DAR 4:3], q=-1--1, 29.97 fps, 30k tbn, 29.97 tbc
Metadata:
encoder : Lavc57.89.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream #0:1: Audio: aac (LC) ([64][0][0][0] / 0x0040), 48000 Hz, stereo, fltp, 192 kb/s
Metadata:
encoder : Lavc57.89.100 aac
Stream #0:2: Audio: aac (LC) ([64][0][0][0] / 0x0040), 48000 Hz, stereo, fltp, 192 kb/s
Metadata:
encoder : Lavc57.89.100 aac
frame= 83 fps=0.0 q=26.0 size= 168kB time=00:00:02.70 bitrate= 508.4kbits/s speed=5.26x
frame= 132 fps=128 q=26.0 size= 660kB time=00:00:04.41 bitrate=1224.4kbits/s speed=4.29x
frame= 182 fps=118 q=26.0 size= 1126kB time=00:00:06.05 bitrate=1522.0kbits/s speed=3.92x
frame= 235 fps=114 q=26.0 size= 1529kB time=00:00:07.78 bitrate=1608.5kbits/s speed=3.78x
frame= 294 fps=114 q=26.0 size= 1867kB time=00:00:09.77 bitrate=1564.9kbits/s speed= 3.8x
frame= 352 fps=114 q=26.0 size= 2175kB time=00:00:11.71 bitrate=1521.5kbits/s speed=3.79x
frame= 408 fps=113 q=26.0 size= 2681kB time=00:00:13.54 bitrate=1621.1kbits/s speed=3.76x
frame= 466 fps=113 q=26.0 size= 3276kB time=00:00:15.50 bitrate=1730.6kbits/s speed=3.77x
[mpeg @ 000000000042a820] New subtitle stream 0:4 at pos:6483982 and DTS:17.1437s
frame= 528 fps=114 q=26.0 size= 3868kB time=00:00:17.57 bitrate=1802.4kbits/s speed=3.79x
frame= 572 fps=111 q=26.0 size= 4508kB time=00:00:19.09 bitrate=1934.4kbits/s speed=3.71x
frame= 611 fps=108 q=26.0 size= 5215kB time=00:00:20.43 bitrate=2090.4kbits/s speed=3.61x
frame= 656 fps=106 q=26.0 size= 6040kB time=00:00:21.86 bitrate=2262.6kbits/s speed=3.54x
frame= 698 fps=104 q=26.0 size= 6724kB time=00:00:23.23 bitrate=2370.8kbits/s speed=3.47x
frame= 743 fps=103 q=26.0 size= 7451kB time=00:00:24.72 bitrate=2468.6kbits/s speed=3.43x
frame= 793 fps=103 q=26.0 size= 8007kB time=00:00:26.45 bitrate=2479.7kbits/s speed=3.43x
frame= 851 fps=103 q=26.0 size= 8495kB time=00:00:28.33 bitrate=2456.3kbits/s speed=3.44x
frame= 904 fps=103 q=26.0 size= 8992kB time=00:00:30.12 bitrate=2445.4kbits/s speed=3.44x
frame= 957 fps=103 q=26.0 size= 9475kB time=00:00:31.91 bitrate=2432.1kbits/s speed=3.44x
frame= 1014 fps=104 q=26.0 size= 9967kB time=00:00:33.81 bitrate=2414.6kbits/s speed=3.46x
frame= 1071 fps=104 q=26.0 size= 10297kB time=00:00:35.73 bitrate=2360.7kbits/s speed=3.47x
frame= 1121 fps=104 q=26.0 size= 10733kB time=00:00:37.39 bitrate=2351.1kbits/s speed=3.46x
frame= 1187 fps=105 q=26.0 size= 11145kB time=00:00:39.57 bitrate=2307.1kbits/s speed=3.49x
frame= 1241 fps=105 q=26.0 size= 11635kB time=00:00:41.36 bitrate=2304.1kbits/s speed=3.48x
frame= 1284 fps=104 q=26.0 size= 12291kB time=00:00:42.79 bitrate=2352.8kbits/s speed=3.45x
frame= 1332 fps=103 q=26.0 size= 13049kB time=00:00:44.37 bitrate=2409.0kbits/s speed=3.44x
frame= 1386 fps=103 q=26.0 size= 13608kB time=00:00:46.22 bitrate=2411.5kbits/s speed=3.45x
frame= 1437 fps=103 q=26.0 size= 14063kB time=00:00:47.95 bitrate=2402.3kbits/s speed=3.44x
frame= 1502 fps=104 q=26.0 size= 14504kB time=00:00:50.09 bitrate=2372.0kbits/s speed=3.47x
frame= 1558 fps=104 q=26.0 size= 14947kB time=00:00:51.94 bitrate=2357.2kbits/s speed=3.47x
frame= 1614 fps=104 q=26.0 size= 15502kB time=00:00:53.80 bitrate=2360.3kbits/s speed=3.48x
frame= 1668 fps=104 q=26.0 size= 16041kB time=00:00:55.63 bitrate=2361.9kbits/s speed=3.48x
frame= 1725 fps=105 q=26.0 size= 16509kB time=00:00:57.49 bitrate=2352.2kbits/s speed=3.48x
frame= 1779 fps=105 q=26.0 size= 16980kB time=00:00:59.30 bitrate=2345.4kbits/s speed=3.48x
frame= 1832 fps=104 q=26.0 size= 17487kB time=00:01:01.16 bitrate=2342.2kbits/s speed=3.49x
frame= 1886 fps=104 q=26.0 size= 17921kB time=00:01:02.93 bitrate=2332.8kbits/s speed=3.49x
frame= 1947 fps=105 q=26.0 size= 18284kB time=00:01:04.93 bitrate=2306.6kbits/s speed= 3.5x
frame= 2009 fps=105 q=26.0 size= 18775kB time=00:01:06.98 bitrate=2296.1kbits/s speed=3.51x
frame= 2060 fps=105 q=26.0 size= 19307kB time=00:01:08.71 bitrate=2301.7kbits/s speed=3.51x
frame= 2113 fps=105 q=26.0 size= 19916kB time=00:01:10.48 bitrate=2314.7kbits/s speed=3.51x
frame= 2169 fps=105 q=26.0 size= 20374kB time=00:01:12.36 bitrate=2306.5kbits/s speed=3.51x
frame= 2235 fps=106 q=26.0 size= 20667kB time=00:01:14.58 bitrate=2270.0kbits/s speed=3.53x
frame= 2286 fps=106 q=26.0 size= 21142kB time=00:01:16.22 bitrate=2272.2kbits/s speed=3.52x
frame= 2340 fps=106 q=26.0 size= 21715kB time=00:01:18.05 bitrate=2278.9kbits/s speed=3.52x
frame= 2391 fps=105 q=26.0 size= 22368kB time=00:01:19.74 bitrate=2297.8kbits/s speed=3.52x
frame= 2439 fps=105 q=26.0 size= 23051kB time=00:01:21.32 bitrate=2322.0kbits/s speed=3.51x
frame= 2484 fps=105 q=26.0 size= 23719kB time=00:01:22.83 bitrate=2345.7kbits/s speed=3.49x
frame= 2528 fps=104 q=26.0 size= 24432kB time=00:01:24.33 bitrate=2373.3kbits/s speed=3.48x
frame= 2568 fps=104 q=26.0 size= 25074kB time=00:01:25.67 bitrate=2397.5kbits/s speed=3.46x
frame= 2623 fps=104 q=26.0 size= 25575kB time=00:01:27.50 bitrate=2394.2kbits/s speed=3.46x
frame= 2681 fps=104 q=26.0 size= 26025kB time=00:01:29.38 bitrate=2385.1kbits/s speed=3.47x
frame= 2734 fps=104 q=26.0 size= 26428kB time=00:01:31.17 bitrate=2374.4kbits/s speed=3.47x
frame= 2787 fps=104 q=26.0 size= 26856kB time=00:01:32.97 bitrate=2366.4kbits/s speed=3.47x
frame= 2845 fps=104 q=26.0 size= 27262kB time=00:01:34.86 bitrate=2354.0kbits/s speed=3.47x
frame= 2905 fps=104 q=26.0 size= 27649kB time=00:01:36.87 bitrate=2338.1kbits/s speed=3.48x
frame= 2958 fps=104 q=26.0 size= 28314kB time=00:01:38.66 bitrate=2350.8kbits/s speed=3.48x
frame= 3014 fps=104 q=26.0 size= 28794kB time=00:01:40.52 bitrate=2346.6kbits/s speed=3.48x
frame= 3075 fps=105 q=26.0 size= 29217kB time=00:01:42.57 bitrate=2333.5kbits/s speed=3.49x
frame= 3129 fps=105 q=26.0 size= 29695kB time=00:01:44.36 bitrate=2330.9kbits/s speed=3.49x
frame= 3182 fps=105 q=26.0 size= 30167kB time=00:01:46.15 bitrate=2328.0kbits/s speed=3.49x
frame= 3240 fps=105 q=26.0 size= 30653kB time=00:01:48.09 bitrate=2323.0kbits/s speed=3.49x
frame= 3296 fps=105 q=26.0 size= 31139kB time=00:01:49.97 bitrate=2319.6kbits/s speed= 3.5x
frame= 3356 fps=105 q=26.0 size= 31690kB time=00:01:51.93 bitrate=2319.2kbits/s speed= 3.5x
frame= 3417 fps=105 q=26.0 size= 32178kB time=00:01:54.00 bitrate=2312.2kbits/s speed=3.51x
frame= 3466 fps=105 q=26.0 size= 32767kB time=00:01:55.60 bitrate=2321.9kbits/s speed= 3.5x
frame= 3516 fps=105 q=26.0 size= 33321kB time=00:01:57.29 bitrate=2327.3kbits/s speed= 3.5x
frame= 3566 fps=105 q=26.0 size= 33858kB time=00:01:58.95 bitrate=2331.7kbits/s speed=3.49x
frame= 3612 fps=104 q=26.0 size= 34515kB time=00:02:00.49 bitrate=2346.6kbits/s speed=3.49x
frame= 3656 fps=104 q=26.0 size= 35268kB time=00:02:02.00 bitrate=2368.0kbits/s speed=3.48x
frame= 3699 fps=104 q=26.0 size= 36006kB time=00:02:03.34 bitrate=2391.3kbits/s speed=3.46x
frame= 3742 fps=104 q=26.0 size= 36684kB time=00:02:04.84 bitrate=2407.1kbits/s speed=3.46x
frame= 3792 fps=103 q=26.0 size= 37287kB time=00:02:06.44 bitrate=2415.7kbits/s speed=3.45x
frame= 3844 fps=103 q=26.0 size= 37684kB time=00:02:08.25 bitrate=2407.0kbits/s speed=3.45x
frame= 3902 fps=104 q=26.0 size= 38066kB time=00:02:10.19 bitrate=2395.1kbits/s speed=3.45x
frame= 3960 fps=104 q=26.0 size= 38549kB time=00:02:12.07 bitrate=2391.0kbits/s speed=3.46x
frame= 4014 fps=104 q=26.0 size= 39081kB time=00:02:13.90 bitrate=2390.8kbits/s speed=3.46x
frame= 4071 fps=104 q=26.0 size= 39649kB time=00:02:15.80 bitrate=2391.6kbits/s speed=3.46x
frame= 4126 fps=104 q=26.0 size= 40192kB time=00:02:17.62 bitrate=2392.4kbits/s speed=3.46x
frame= 4180 fps=104 q=26.0 size= 40736kB time=00:02:19.47 bitrate=2392.6kbits/s speed=3.46x
frame= 4237 fps=104 q=26.0 size= 41279kB time=00:02:21.35 bitrate=2392.3kbits/s speed=3.47x
frame= 4292 fps=104 q=26.0 size= 41799kB time=00:02:23.25 bitrate=2390.3kbits/s speed=3.47x
frame= 4346 fps=104 q=26.0 size= 42355kB time=00:02:25.00 bitrate=2392.9kbits/s speed=3.47x
frame= 4387 fps=104 q=26.0 size= 42997kB time=00:02:26.36 bitrate=2406.5kbits/s speed=3.46x
frame= 4430 fps=103 q=26.0 size= 43698kB time=00:02:27.79 bitrate=2422.1kbits/s speed=3.45x
frame= 4478 fps=103 q=26.0 size= 44374kB time=00:02:29.35 bitrate=2433.9kbits/s speed=3.44x
frame= 4541 fps=103 q=26.0 size= 44857kB time=00:02:31.46 bitrate=2426.1kbits/s speed=3.45x
frame= 4607 fps=104 q=26.0 size= 45173kB time=00:02:33.68 bitrate=2407.9kbits/s speed=3.46x
frame= 4670 fps=104 q=26.0 size= 45525kB time=00:02:35.77 bitrate=2394.1kbits/s speed=3.47x
frame= 4732 fps=104 q=26.0 size= 45985kB time=00:02:37.84 bitrate=2386.6kbits/s speed=3.47x
frame= 4791 fps=104 q=26.0 size= 46416kB time=00:02:39.80 bitrate=2379.4kbits/s speed=3.48x
frame= 4853 fps=104 q=26.0 size= 46853kB time=00:02:41.89 bitrate=2370.8kbits/s speed=3.48x
frame= 4914 fps=105 q=26.0 size= 47318kB time=00:02:43.88 bitrate=2365.3kbits/s speed=3.49x
frame= 4972 fps=105 q=26.0 size= 47760kB time=00:02:45.84 bitrate=2359.1kbits/s speed=3.49x
frame= 5030 fps=105 q=26.0 size= 48130kB time=00:02:47.82 bitrate=2349.3kbits/s speed= 3.5x
frame= 5092 fps=105 q=26.0 size= 48527kB time=00:02:49.87 bitrate=2340.1kbits/s speed= 3.5x
frame= 5147 fps=105 q=23.0 size= 48906kB time=00:02:51.73 bitrate=2332.9kbits/s speed= 3.5x
frame= 5212 fps=105 q=26.0 size= 49346kB time=00:02:53.90 bitrate=2324.5kbits/s speed=3.51x
frame= 5270 fps=105 q=26.0 size= 49746kB time=00:02:55.82 bitrate=2317.7kbits/s speed=3.51x
frame= 5322 fps=105 q=26.0 size= 50410kB time=00:02:57.51 bitrate=2326.3kbits/s speed=3.51x
frame= 5369 fps=105 q=26.0 size= 51006kB time=00:02:59.11 bitrate=2332.8kbits/s speed=3.51x
frame= 5421 fps=105 q=26.0 size= 51600kB time=00:03:00.88 bitrate=2336.9kbits/s speed=3.51x
frame= 5478 fps=105 q=26.0 size= 52072kB time=00:03:02.76 bitrate=2334.0kbits/s speed=3.51x
frame= 5550 fps=105 q=26.0 size= 52432kB time=00:03:05.17 bitrate=2319.6kbits/s speed=3.52x
frame= 5614 fps=106 q=26.0 size= 52805kB time=00:03:07.34 bitrate=2309.0kbits/s speed=3.52x
frame= 5663 fps=106 q=26.0 size= 53439kB time=00:03:08.94 bitrate=2316.9kbits/s speed=3.52x
frame= 5710 fps=105 q=26.0 size= 53940kB time=00:03:10.54 bitrate=2319.0kbits/s speed=3.52x
frame= 5770 fps=105 q=26.0 size= 54347kB time=00:03:12.55 bitrate=2312.1kbits/s speed=3.52x
frame= 5830 fps=106 q=26.0 size= 54816kB time=00:03:14.49 bitrate=2308.8kbits/s speed=3.52x
frame= 5876 fps=105 q=26.0 size= 55518kB time=00:03:16.01 bitrate=2320.3kbits/s speed=3.52x
frame= 5921 fps=105 q=26.0 size= 56249kB time=00:03:17.52 bitrate=2332.8kbits/s speed=3.51x
frame= 5976 fps=105 q=26.0 size= 56854kB time=00:03:19.33 bitrate=2336.5kbits/s speed=3.51x
frame= 6029 fps=105 q=26.0 size= 57370kB time=00:03:21.19 bitrate=2335.9kbits/s speed=3.51x
frame= 6081 fps=105 q=26.0 size= 57807kB time=00:03:22.90 bitrate=2333.9kbits/s speed=3.51x
frame= 6139 fps=105 q=26.0 size= 58145kB time=00:03:24.82 bitrate=2325.6kbits/s speed=3.51x
frame= 6189 fps=105 q=26.0 size= 58602kB time=00:03:26.48 bitrate=2324.9kbits/s speed=3.51x
frame= 6246 fps=105 q=26.0 size= 59082kB time=00:03:28.38 bitrate=2322.6kbits/s speed=3.51x
frame= 6304 fps=105 q=26.0 size= 59519kB time=00:03:30.34 bitrate=2318.0kbits/s speed=3.52x
frame= 6359 fps=105 q=26.0 size= 60028kB time=00:03:32.13 bitrate=2318.0kbits/s speed=3.51x
frame= 6418 fps=105 q=26.0 size= 60486kB time=00:03:34.12 bitrate=2314.1kbits/s speed=3.52x
frame= 6478 fps=106 q=26.0 size= 60947kB time=00:03:36.10 bitrate=2310.3kbits/s speed=3.52x
frame= 6537 fps=106 q=26.0 size= 61412kB time=00:03:38.09 bitrate=2306.8kbits/s speed=3.52x
frame= 6596 fps=106 q=26.0 size= 61938kB time=00:03:40.07 bitrate=2305.6kbits/s speed=3.53x
frame= 6658 fps=106 q=26.0 size= 62386kB time=00:03:42.14 bitrate=2300.6kbits/s speed=3.53x
frame= 6727 fps=106 q=26.0 size= 62836kB time=00:03:44.46 bitrate=2293.2kbits/s speed=3.54x
frame= 6780 fps=106 q=26.0 size= 63400kB time=00:03:46.17 bitrate=2296.3kbits/s speed=3.54x
frame= 6830 fps=106 q=26.0 size= 63962kB time=00:03:47.88 bitrate=2299.3kbits/s speed=3.53x
frame= 6884 fps=106 q=26.0 size= 64394kB time=00:03:49.67 bitrate=2296.8kbits/s speed=3.53x
frame= 6940 fps=106 q=26.0 size= 64782kB time=00:03:51.53 bitrate=2292.1kbits/s speed=3.53x
frame= 6994 fps=106 q=26.0 size= 65278kB time=00:03:53.36 bitrate=2291.5kbits/s speed=3.53x
frame= 7048 fps=106 q=26.0 size= 65778kB time=00:03:55.11 bitrate=2291.9kbits/s speed=3.53x
frame= 7104 fps=106 q=26.0 size= 66288kB time=00:03:56.99 bitrate=2291.4kbits/s speed=3.53x
frame= 7162 fps=106 q=26.0 size= 66668kB time=00:03:58.93 bitrate=2285.8kbits/s speed=3.54x
frame= 7223 fps=106 q=26.0 size= 66988kB time=00:04:00.98 bitrate=2277.2kbits/s speed=3.54x
frame= 7285 fps=106 q=26.0 size= 67304kB time=00:04:03.05 bitrate=2268.5kbits/s speed=3.54x
frame= 7341 fps=106 q=26.0 size= 67682kB time=00:04:04.97 bitrate=2263.3kbits/s speed=3.54x
frame= 7399 fps=106 q=26.0 size= 68156kB time=00:04:06.82 bitrate=2262.0kbits/s speed=3.55x
frame= 7459 fps=106 q=26.0 size= 68626kB time=00:04:08.85 bitrate=2259.1kbits/s speed=3.55x
frame= 7519 fps=106 q=26.0 size= 69070kB time=00:04:10.85 bitrate=2255.5kbits/s speed=3.55x
frame= 7572 fps=106 q=26.0 size= 69583kB time=00:04:12.65 bitrate=2256.2kbits/s speed=3.55x
frame= 7624 fps=106 q=26.0 size= 70046kB time=00:04:14.37 bitrate=2255.7kbits/s speed=3.55x
frame= 7678 fps=106 q=26.0 size= 70486kB time=00:04:16.14 bitrate=2254.2kbits/s speed=3.55x
frame= 7726 fps=106 q=26.0 size= 70960kB time=00:04:17.74 bitrate=2255.3kbits/s speed=3.54x
frame= 7768 fps=106 q=26.0 size= 71567kB time=00:04:19.15 bitrate=2262.3kbits/s speed=3.54x
frame= 7816 fps=106 q=26.0 size= 72193kB time=00:04:20.75 bitrate=2268.0kbits/s speed=3.54x
frame= 7874 fps=106 q=26.0 size= 72495kB time=00:04:22.67 bitrate=2260.9kbits/s speed=3.54x
frame= 7933 fps=106 q=26.0 size= 72901kB time=00:04:24.64 bitrate=2256.7kbits/s speed=3.54x
frame= 7986 fps=106 q=26.0 size= 73449kB time=00:04:26.41 bitrate=2258.5kbits/s speed=3.54x
frame= 8041 fps=106 q=26.0 size= 74045kB time=00:04:28.24 bitrate=2261.3kbits/s speed=3.54x
frame= 8098 fps=106 q=26.0 size= 74565kB time=00:04:30.16 bitrate=2261.0kbits/s speed=3.54x
frame= 8147 fps=106 q=26.0 size= 75117kB time=00:04:31.85 bitrate=2263.6kbits/s speed=3.54x
frame= 8198 fps=106 q=26.0 size= 75839kB time=00:04:33.51 bitrate=2271.5kbits/s speed=3.53x
frame= 8248 fps=106 q=26.0 size= 76482kB time=00:04:35.22 bitrate=2276.5kbits/s speed=3.53x
frame= 8297 fps=106 q=26.0 size= 77092kB time=00:04:36.82 bitrate=2281.4kbits/s speed=3.53x
frame= 8356 fps=106 q=26.0 size= 77645kB time=00:04:38.74 bitrate=2281.9kbits/s speed=3.53x
frame= 8414 fps=106 q=26.0 size= 78104kB time=00:04:40.74 bitrate=2279.0kbits/s speed=3.53x
frame= 8474 fps=106 q=26.0 size= 78606kB time=00:04:42.70 bitrate=2277.8kbits/s speed=3.54x
frame= 8528 fps=106 q=26.0 size= 79172kB time=00:04:44.52 bitrate=2279.5kbits/s speed=3.54x
frame= 8587 fps=106 q=26.0 size= 79795kB time=00:04:46.46 bitrate=2281.9kbits/s speed=3.54x
frame= 8653 fps=106 q=26.0 size= 80391kB time=00:04:48.68 bitrate=2281.3kbits/s speed=3.54x
frame= 8718 fps=106 q=26.0 size= 81021kB time=00:04:50.90 bitrate=2281.6kbits/s speed=3.55x
frame= 8779 fps=106 q=26.0 size= 81570kB time=00:04:52.90 bitrate=2281.3kbits/s speed=3.55x
frame= 8826 fps=106 q=26.0 size= 82147kB time=00:04:54.50 bitrate=2285.0kbits/s speed=3.55x
frame= 8882 fps=106 q=26.0 size= 82800kB time=00:04:56.36 bitrate=2288.8kbits/s speed=3.55x
frame= 8950 fps=106 q=26.0 size= 83343kB time=00:04:58.64 bitrate=2286.2kbits/s speed=3.55x
frame= 9018 fps=107 q=26.0 size= 83935kB time=00:05:00.90 bitrate=2285.1kbits/s speed=3.56x
frame= 9086 fps=107 q=26.0 size= 84481kB time=00:05:03.14 bitrate=2282.9kbits/s speed=3.56x
frame= 9151 fps=107 q=26.0 size= 85052kB time=00:05:05.30 bitrate=2282.2kbits/s speed=3.57x
frame= 9161 fps=106 q=-1.0 Lsize= 85813kB time=00:05:06.02 bitrate=2297.1kbits/s speed=3.56x
video:70963kB audio:14493kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.417440%
[libx264 @ 000000000043c3a0] frame I:43 Avg QP:17.04 size: 36009
[libx264 @ 000000000043c3a0] frame P:2866 Avg QP:20.64 size: 16000
[libx264 @ 000000000043c3a0] frame B:6252 Avg QP:24.39 size: 4040
[libx264 @ 000000000043c3a0] consecutive B-frames: 1.0% 6.9% 51.7% 40.5%
[libx264 @ 000000000043c3a0] mb I I16..4: 27.5% 65.5% 7.1%
[libx264 @ 000000000043c3a0] mb P I16..4: 3.7% 12.3% 0.8% P16..4: 35.0% 15.9% 7.6% 0.0% 0.0% skip:24.7%
[libx264 @ 000000000043c3a0] mb B I16..4: 0.4% 0.8% 0.0% B16..8: 42.8% 4.8% 1.0% direct: 5.4% skip:44.8% L0:34.0% L1:43.7% BI:22.3%
[libx264 @ 000000000043c3a0] 8x8 transform intra:71.3% inter:82.4%
[libx264 @ 000000000043c3a0] coded y,uvDC,uvAC intra: 65.8% 73.9% 23.9% inter: 26.4% 20.4% 1.3%
[libx264 @ 000000000043c3a0] i16 v,h,dc,p: 21% 47% 5% 28%
[libx264 @ 000000000043c3a0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 26% 26% 4% 4% 4% 6% 4% 6%
[libx264 @ 000000000043c3a0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 28% 28% 8% 4% 6% 6% 8% 4% 7%
[libx264 @ 000000000043c3a0] i8c dc,h,v,p: 41% 31% 18% 9%
[libx264 @ 000000000043c3a0] Weighted P-Frames: Y:3.0% UV:2.5%
[libx264 @ 000000000043c3a0] ref P L0: 61.5% 19.2% 15.3% 3.9% 0.1%
[libx264 @ 000000000043c3a0] ref B L0: 83.3% 15.0% 1.7%
[libx264 @ 000000000043c3a0] ref B L1: 97.3% 2.7%
[libx264 @ 000000000043c3a0] kb/s:1901.79
[aac @ 00000000004b1080] Qavg: 583.592
[aac @ 0000000000474440] Qavg: 396.171And an example of a file that didn’t converted (in this case due to the fact that I didn’t specify to ignore subtitle stream, which I corrected by adding
-sn
to the batch file.) :Input #0, mpeg, from '571314.mpg':
Duration: 00:05:44.78, start: 0.060000, bitrate: 2989 kb/s
Stream #0:0[0x1bf]: Data: dvd_nav_packet
Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, smpte170m, top first), 720x480 [SAR 8:9 DAR 4:3], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0:2[0x81]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
Stream #0:3[0x20]: Subtitle: dvd_subtitle
Stream #0:4[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16p, 224 kb/s
Automatic encoder selection failed for output stream #0:2. Default encoder for format mp4 (codec none) is probably disabled. Please choose an encoder manually.
Error selecting an encoder for stream 0:2How exactly can I output a log file that simply state the files that weren’t converted and the error that entails. Example :
000002.mpg - Not converted
Automatic encoder selection failed for output stream #0:2. Default encoder for format mp4 (codec none) is probably disabled. Please choose an encoder manually.
Error selecting an encoder for stream 0:2
000123.mpg - Not converted
Automatic encoder selection failed for output stream #0:2. Default encoder for format mp4 (codec none) is probably disabled. Please choose an encoder manually.
Error selecting an encoder for stream 0:2This way, I won’t have to toy with a huge log file. Thanks !
-
Piwik Analytics and becoming a Piwik Certified Professional
10 juillet 2017, par Piwik Core Team — AboutDigital Analytics software
Piwik Analytics is the leading open source digital analytics software, offering users around the world an opportunity to liberate their analytics. Most recently, they have introduced the Piwik Certified Professional certification exam which now allows users to become qualified in Piwik Analytics software on an individual level to gain a deeper understanding of Piwik. In this blog post I will guide you through the topics that are covered during the exam and provide you with advice on taking the official Piwik Certified Professional exam.
Piwik certification exam
Taking the exam will cost you a maximum investment of 60 minutes of your time, besides learning all materials of course. The exam consists of 55 multiple choice questions with four answers to choose from. The score needed to pass is 80% (44 questions answered correctly) and the cost is 50 USD total. An earned certificate is valid for 18 months, before these eighteen months are over a person should pass the exam again in order to retain the certified status.
Learning topics
The exam consists of two sections. The main section is focused on the Piwik Analytics software itself while the second part relates to digital analytics in general. All topics and content covered about Piwik Analytics is available through the official Piwik user guides. The second section tests your experience as a digital analyst, online marketer or any other function title in which you work with Piwik Analytics. In this case, the general digital analytics questions should be quite straightforward and easy to answer, and cover only a fraction of the total questions in the exam (around 10% with 5-7 general questions). An outline of all exam topics are listed below :
- A Tour of Piwik
- Track Goals and Measure Conversions
- Event Tracking
- Content Tracking
- Ecommerce Analytics
- Row Evolution – View and compare historical data
- Segmentation – Compare segments of visitors
- Visitors Maps – World, region, city
- Real Time Visitor World Map
- Real Time Analytics
- The Visitor Profile
- Site speed and Page speed
- Site Search Tracking and Reporting
- Transitions – Analyze the previous and following actions of your visitors for each page
- Page Overlay
- Custom Variables Analytics
- Custom Dimensions
- User ID
- Annotating your data
- Tracking Campaigns
- URL Builder for Marketing Campaign Tracking
The best way to prepare for the exam is read the entire Piwik user guides. You should definitely read the “Analytics Features” section since most questions of the Piwik Certified Professional – Digital Analytics exam that will be asked come from these sections. Furthermore you should be able to find your way around in Piwik at a basic level which means you know what the reports mean and where to find certain information. In addition, some basic knowledge regarding the settings is useful too. The exam is definitely not a technical implementation exam so no coding knowledge or any other deeply technical knowledge regarding Piwik is required.
Finally, some general questions will be asked regarding digital analytics covering topics about KPI’s and the role of the analyst within an organization. While Piwik provides some links to articles by Avinash Kaushik covering these topics, you will not be able to learn these topics just by reading. When you have some experience with digital analytics you should be able to answer these general digital analytics questions with common sense and (even basic) experience as a digital analyst, analytics consultant, online marketer or any other related job whereby you work with Piwik.
Taking the exam
With 55 questions to be answered in 60 minutes the key to passing the exam is to keep moving. You have about 1 minute and 5 seconds to answer each question. This means that you should focus on the easiest questions first and return later to the questions that are a bit more challenging to answer. Keep an eye on the timer that will be displayed in the exam window. When the time expires or you click ‘Finish test’ your exam will end and be automatically submitted for review. Remember to first check all questions and answers before you click on the ‘Finish test’ button. If you click too soon and you still haven’t answered all questions, all unanswered questions will be marked as incorrect.
During the test, no hard copy or online materials may be referenced. As you can imagine, it is almost impossible to check if users reference these kind of materials. However, be aware of the penalty system that is in place during the test. When a user leaves from the active test screen to another screen (i.e. a different browser tab) the screen turns red and provides a warning count when the user returns to the test screen again. You will have three warnings, after this your test will be submitted and graded as false. Furthermore, keep in mind you will have to do the test in one go and cannot pause and come back another time.
Practice makes perfect
Below I have included some example questions that could be asked during the exam. These questions do not necessarily represent how Piwik will test you on these topics.
- What is the default report date that is selected by Piwik ?
- Why would someone flatten a report in Piwik ?
- Why would a user especially use the Page Overlay report ?
- What are the three main Ecommerce interactions tracked with Piwik ?
- What is an example of an anonymized IP address in Piwik ?
Passing the Piwik Certified Professional – Digital Analytics exam
Directly after submitting the exam you will receive a notification telling you whether or not you have passed the exam. If you pass, you will be able to download your personal certification right away. A report of your exam performance will also be available. This report lists the amount of correct answers and total questions by topic. The report with your exam performance is also available if you did not pass the exam. The certificate is valid for 18 months from the date of successful completion.
Sometimes the difference between passing and failing can be a matter of how you interpret some of Piwik’s questions. There are several tricky questions included, so be sure to pay attention to detail on every question. If you fail, you may take the exam again. You will have to pay the 50 USD fee for each try, so do your best to pass it the first time.
→ Register to become a Piwik Certified Professional.
We wish you the best of luck and happy analytics !
-
Video rotating to left by 90 degree when converted using ffmpeg
15 juillet 2017, par Herdesh VermaI developed a below code :
extern "C"
{
#include <libavutil></libavutil>imgutils.h>
#include <libavutil></libavutil>opt.h>
#include <libavcodec></libavcodec>avcodec.h>
#include <libavutil></libavutil>mathematics.h>
#include <libavutil></libavutil>samplefmt.h>
#include <libavutil></libavutil>timestamp.h>
#include <libavformat></libavformat>avformat.h>
#include <libavfilter></libavfilter>avfiltergraph.h>
#include <libswscale></libswscale>swscale.h>
}
#include
static AVFormatContext *fmt_ctx = NULL;
static int frame_index = 0;
static int j = 0, nbytes=0;
uint8_t *video_outbuf = NULL;
static AVPacket *pAVPacket=NULL;
static int value=0;
static AVFrame *pAVFrame=NULL;
static AVFrame *outFrame=NULL;
static AVStream *video_st=NULL;
static AVFormatContext *outAVFormatContext=NULL;
static AVCodec *outAVCodec=NULL;
static AVOutputFormat *output_format=NULL;
static AVCodecContext *video_dec_ctx = NULL, *audio_dec_ctx;
static AVCodecContext *outAVCodecContext=NULL;
static int width, height;
static enum AVPixelFormat pix_fmt;
static AVStream *video_stream = NULL, *audio_stream = NULL;
static const char *src_filename = NULL;
static const char *video_dst_filename = NULL;
static const char *audio_dst_filename = NULL;
static FILE *video_dst_file = NULL;
static FILE *audio_dst_file = NULL;
static uint8_t *video_dst_data[4] = {NULL};
static int video_dst_linesize[4];
static int video_dst_bufsize;
static int video_stream_idx = -1, audio_stream_idx = -1;
static AVPacket *pkt=NULL;
static AVPacket *pkt1=NULL;
static AVFrame *frame = NULL;
//static AVPacket pkt;
static int video_frame_count = 0;
static int audio_frame_count = 0;
static int refcount = 0;
AVCodec *codec;
static struct SwsContext *sws_ctx;
AVCodecContext *c= NULL;
int i, out_size, size, x, y, outbuf_size;
AVFrame *picture;
uint8_t *outbuf, *picture_buf;
int video_outbuf_size;
int w, h;
AVPixelFormat pixFmt;
uint8_t *data[4];
int linesize[4];
static int open_codec_context(int *stream_idx,
AVCodecContext **dec_ctx, AVFormatContext
*fmt_ctx, enum AVMediaType type)
{
int ret, stream_index;
AVStream *st;
AVCodec *dec = NULL;
AVDictionary *opts = NULL;
ret = av_find_best_stream(fmt_ctx, type, -1, -1, NULL, 0);
if (ret < 0) {
printf("Could not find %s stream in input file '%s'\n",
av_get_media_type_string(type), src_filename);
return ret;
} else {
stream_index = ret;
st = fmt_ctx->streams[stream_index];
/* find decoder for the stream */
dec = avcodec_find_decoder(st->codecpar->codec_id);
if (!dec) {
printf("Failed to find %s codec\n",
av_get_media_type_string(type));
return AVERROR(EINVAL);
}
/* Allocate a codec context for the decoder */
*dec_ctx = avcodec_alloc_context3(dec);
if (!*dec_ctx) {
printf("Failed to allocate the %s codec context\n",
av_get_media_type_string(type));
return AVERROR(ENOMEM);
}
/* Copy codec parameters from input stream to output codec context */
if ((ret = avcodec_parameters_to_context(*dec_ctx, st->codecpar)) < 0) {
printf("Failed to copy %s codec parameters to decoder context\n",
av_get_media_type_string(type));
return ret;
}
/* Init the decoders, with or without reference counting */
av_dict_set(&opts, "refcounted_frames", refcount ? "1" : "0", 0);
if ((ret = avcodec_open2(*dec_ctx, dec, &opts)) < 0) {
printf("Failed to open %s codec\n",
av_get_media_type_string(type));
return ret;
}
*stream_idx = stream_index;
}
return 0;
}
int main (int argc, char **argv)
{
int ret = 0, got_frame;
src_filename = argv[1];
video_dst_filename = argv[2];
audio_dst_filename = argv[3];
av_register_all();
avcodec_register_all();
printf("Registered all\n");
/* open input file, and allocate format context */
if (avformat_open_input(&fmt_ctx, src_filename, NULL, NULL) < 0) {
printf("Could not open source file %s\n", src_filename);
exit(1);
}
/* retrieve stream information */
if (avformat_find_stream_info(fmt_ctx, NULL) < 0) {
printf("Could not find stream information\n");
exit(1);
}
if (open_codec_context(&video_stream_idx, &video_dec_ctx, fmt_ctx,
AVMEDIA_TYPE_VIDEO) >= 0) {
video_stream = fmt_ctx->streams[video_stream_idx];
avformat_alloc_output_context2(&outAVFormatContext, NULL, NULL,
video_dst_filename);
if (!outAVFormatContext)
{
printf("\n\nError : avformat_alloc_output_context2()");
return -1;
}
}
if (open_codec_context(&audio_stream_idx, &audio_dec_ctx, fmt_ctx,
AVMEDIA_TYPE_AUDIO) >= 0) {
audio_stream = fmt_ctx->streams[audio_stream_idx];
audio_dst_file = fopen(audio_dst_filename, "wb");
if (!audio_dst_file) {
printf("Could not open destination file %s\n", audio_dst_filename);
ret = 1;
goto end;
}
}
/* dump input information to stderr */
av_dump_format(fmt_ctx, 0, src_filename, 0);
if (!audio_stream && !video_stream) {
printf("Could not find audio or video stream in the input, aborting\n");
ret = 1;
goto end;
}
output_format = av_guess_format(NULL, video_dst_filename, NULL);
if( !output_format )
{
printf("\n\nError : av_guess_format()");
return -1;
}
video_st = avformat_new_stream(outAVFormatContext ,NULL);
if( !video_st )
{
printf("\n\nError : avformat_new_stream()");
return -1;
}
outAVCodecContext = avcodec_alloc_context3(outAVCodec);
if( !outAVCodecContext )
{
printf("\n\nError : avcodec_alloc_context3()");
return -1;
}
outAVCodecContext = video_st->codec;
outAVCodecContext->codec_id = AV_CODEC_ID_MPEG4;// AV_CODEC_ID_MPEG4; //
AV_CODEC_ID_H264 // AV_CODEC_ID_MPEG1VIDEO
outAVCodecContext->codec_type = AVMEDIA_TYPE_VIDEO;
outAVCodecContext->pix_fmt = AV_PIX_FMT_YUV420P;
outAVCodecContext->bit_rate = 400000; // 2500000
outAVCodecContext->width = 1920;
//outAVCodecContext->width = 500;
outAVCodecContext->height = 1080;
//outAVCodecContext->height = 500;
outAVCodecContext->gop_size = 3;
outAVCodecContext->max_b_frames = 2;
outAVCodecContext->time_base.num = 1;
outAVCodecContext->time_base.den = 30; // 15fps
if (outAVCodecContext->codec_id == AV_CODEC_ID_H264)
{
av_opt_set(outAVCodecContext->priv_data, "preset", "slow", 0);
}
outAVCodec = avcodec_find_encoder(AV_CODEC_ID_MPEG4);
if( !outAVCodec )
{
printf("\n\nError : avcodec_find_encoder()");
return -1;
}
/* Some container formats (like MP4) require global headers to be
present
Mark the encoder so that it behaves accordingly. */
if ( outAVFormatContext->oformat->flags & AVFMT_GLOBALHEADER)
{
outAVCodecContext->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
}
value = avcodec_open2(outAVCodecContext, outAVCodec, NULL);
if( value < 0)
{
printf("\n\nError : avcodec_open2()");
return -1;
}
/* create empty video file */
if ( !(outAVFormatContext->flags & AVFMT_NOFILE) )
{
if( avio_open2(&outAVFormatContext->pb , video_dst_filename,
AVIO_FLAG_WRITE ,NULL, NULL) < 0 )
{
printf("\n\nError : avio_open2()");
}
}
if(!outAVFormatContext->nb_streams)
{
printf("\n\nError : Output file dose not contain any stream");
return -1;
}
/* imp: mp4 container or some advanced container file required header
information*/
value = avformat_write_header(outAVFormatContext , NULL);
if(value < 0)
{
printf("\n\nError : avformat_write_header()");
return -1;
}
printf("\n\nOutput file information :\n\n");
av_dump_format(outAVFormatContext , 0 ,video_dst_filename ,1);
int flag;
int frameFinished;
value = 0;
pAVPacket = (AVPacket *)av_malloc(sizeof(AVPacket));
av_init_packet(pAVPacket);
pAVFrame = av_frame_alloc();
if( !pAVFrame )
{
printf("\n\nError : av_frame_alloc()");
return -1;
}
outFrame = av_frame_alloc();//Allocate an AVFrame and set its fields to
default values.
if( !outFrame )
{
printf("\n\nError : av_frame_alloc()");
return -1;
}
nbytes = av_image_get_buffer_size(outAVCodecContext-
>pix_fmt,outAVCodecContext->width,outAVCodecContext->height,32);
video_outbuf = (uint8_t*)av_malloc(nbytes);
if( video_outbuf == NULL )
{
printf("\n\nError : av_malloc()");
}
value = av_image_fill_arrays( outFrame->data, outFrame->linesize,
video_outbuf , AV_PIX_FMT_YUV420P, outAVCodecContext-
>width,outAVCodecContext->height,1 ); // returns : the size in bytes
required for src
if(value < 0)
{
printf("\n\nError : av_image_fill_arrays()");
}
SwsContext* swsCtx_ ;
// Allocate and return swsContext.
// a pointer to an allocated context, or NULL in case of error
// Deprecated : Use sws_getCachedContext() instead.
swsCtx_ = sws_getContext(video_dec_ctx->width,
video_dec_ctx->height,
video_dec_ctx->pix_fmt,
video_dec_ctx->width,
video_dec_ctx->height,
video_dec_ctx->pix_fmt,
SWS_BICUBIC, NULL, NULL, NULL);
AVPacket outPacket;
int got_picture;
while( av_read_frame( fmt_ctx , pAVPacket ) >= 0 )
{
if(pAVPacket->stream_index == video_stream_idx)
{
value = avcodec_decode_video2(video_dec_ctx , pAVFrame ,
&frameFinished , pAVPacket );
if( value < 0)
{
printf("Error : avcodec_decode_video2()");
}
if(frameFinished)// Frame successfully decoded :)
{
sws_scale(swsCtx_, pAVFrame->data, pAVFrame-
>linesize,0, video_dec_ctx->height, outFrame->data,outFrame->linesize);
// sws_scale(swsCtx_, pAVFrame->data, pAVFrame-
>linesize,0, video_dec_ctx->height, outFrame->data,outFrame->linesize);
av_init_packet(&outPacket);
outPacket.data = NULL; // packet data will be
allocated by the encoder
outPacket.size = 0;
avcodec_encode_video2(outAVCodecContext ,
&outPacket ,outFrame , &got_picture);
if(got_picture)
{
if(outPacket.pts != AV_NOPTS_VALUE)
outPacket.pts =
av_rescale_q(outPacket.pts, video_st->codec->time_base, video_st-
>time_base);
if(outPacket.dts != AV_NOPTS_VALUE)
outPacket.dts =
av_rescale_q(outPacket.dts, video_st->codec->time_base, video_st-
>time_base);
printf("Write frame %3d (size= %2d)\n",
j++, outPacket.size/1000);
if(av_write_frame(outAVFormatContext ,
&outPacket) != 0)
{
printf("\n\nError :
av_write_frame()");
}
av_packet_unref(&outPacket);
} // got_picture
av_packet_unref(&outPacket);
} // frameFinished
}
}// End of while-loop
value = av_write_trailer(outAVFormatContext);
if( value < 0)
{
printf("\n\nError : av_write_trailer()");
}
//THIS WAS ADDED LATER
av_free(video_outbuf);
end:
avcodec_free_context(&video_dec_ctx);
avcodec_free_context(&audio_dec_ctx);
avformat_close_input(&fmt_ctx);
if (video_dst_file)
fclose(video_dst_file);
if (audio_dst_file)
fclose(audio_dst_file);
//av_frame_free(&frame);
av_free(video_dst_data[0]);
return ret < 0;
}Problem with above code is that it rotates a video to left by 90 degree.
Snapshot of video given as input to above program
Snapshot of output video. It is rotated by 90 degree to left.
I compiled program using below command :
g++ -D__STDC_CONSTANT_MACROS -Wall -g ScreenRecorder.cpp -I/home/harry/Documents/compressor/ffmpeg-3.3/ -I/root/android-ndk-r14b/platforms/android-21/arch-x86_64/usr/include/ -c -o ScreenRecorder.o -w
And linked it using below command :
g++ -Wall -g ScreenRecorder.o -I/home/harry/Documents/compressor/ffmpeg-3.3/ -I/root/android-ndk-r14b/platforms/android-21/arch-x86_64/usr/include/ -L/usr/lib64 -L/lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.4.7/ -L/home/harry/Documents/compressor/ffmpeg-3.3/ffmpeg-build -L/root/android-ndk-r14b/platforms/android-21/arch-x86_64/usr/lib64 -o ScreenRecorder.exe -lavformat -lavcodec -lavutil -lavdevice -lavfilter -lswscale -lx264 -lswresample -lm -lpthread -ldl -lstdc++ -lc -lrt
Program is being run using below command :
./ScreenRecorder.exe vertical.MOV videoH.mp4 audioH.mp3
Note :
- Source video is taken from iphone and is of .mov format.
- Output video is being stored in .mp4 file.Can anyone please tell me why it is rotating video by 90 degree ?
One thing i noticed in dump is shown below :
Duration: 00:00:06.04, start: 0.000000, bitrate: 17087 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 17014 kb/s, 29.98 fps, 29.97 tbr, 600 tbn, 1200 tbc (default)
Metadata:
rotate : 90
creation_time : 2017-07-09T10:56:42.000000Z
handler_name : Core Media Data Handler
encoder : H.264
Side data:
displaymatrix: rotation of -90.00 degreesit says
displaymatrix: rotation of -90.00 degrees
. Is it responsible for rotating video by 90 degree ?