
Recherche avancée
Médias (91)
-
Head down (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Echoplex (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Discipline (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Letting you (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
1 000 000 (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
999 999 (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
Autres articles (49)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)
Sur d’autres sites (4541)
-
How do I change audio language using ffmpeg in video files contaning two or more audio tracks
19 mai 2020, par warezsoftwarezI am transcoding video files, that contain 2 audio tracks - Polish and English. Unfortunately my transcoder messes somehow with metadata, and at the output, when I'm checking video file using MediaInfo, i see that both audio tracks are described as English. I'd like to change description of 1st audio track to Polish, so accordingly to ffmpeg documentation :



To set the language of the first audio stream:
ffmpeg -i INPUT -metadata:s:a:0 language=eng OUTPUT




Unfortunately, running command :



ffmpeg -i INPUTPATH -metadata:s:a:0 language=pol OUTPUTPATH




to overwrite input file resulted in saving file thats size is 63KB but it is described as Polish audio (no second audio track - English somehow was deleted)



When I used this command, to save output file as another file, to avoid overwriting if something misses (which is current situation), but using parameter
-metadata:s:a:4
because I thought that maybe I'm reading metadata from ffmpeg incorrectly, it resulted in saving output file as 800Mb with only English (no Polish track).


I don't know what should I change in this command to run as I want it to - just changing metadata of first audio track language to Polish.



Here is full ffmpeg output :



C:\Users\user>ffmpeg -i F:\Path\33244813_6000_1_trailer.mp4 -metadata:s:a:4 language=pol F:\Path\testtest.mp4
ffmpeg version N-91931-gb69ea742ab Copyright (c) 2000-2018 the FFmpeg developers
 built with gcc 8.2.1 (GCC) 20180813
 configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enabl
e-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amr
wb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enab
le-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --
enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc -
-enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --e
nable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
 libavutil 56. 19.101 / 56. 19.101
 libavcodec 58. 30.100 / 58. 30.100
 libavformat 58. 18.100 / 58. 18.100
 libavdevice 58. 4.103 / 58. 4.103
 libavfilter 7. 29.100 / 7. 29.100
 libswscale 5. 2.100 / 5. 2.100
 libswresample 3. 2.100 / 3. 2.100
 libpostproc 55. 2.100 / 55. 2.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'F:\Path\33244813_6000_1_trailer.mp4':
 Metadata:
 major_brand : isom
 minor_version : 1
 compatible_brands: isom
 creation_time : 2020-04-22T16:18:04.000000Z
 Duration: 00:40:39.12, start: 0.000000, bitrate: 8848 kb/s
 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], Closed C
aptions, 5068 kb/s, 25 fps, 25 tbr, 120k tbn, 50 tbc (default)
 Metadata:
 creation_time : 2020-04-22T16:18:04.000000Z
 handler_name : Video
 Stream #0:1(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], Closed C
aptions, 1857 kb/s, 25 fps, 25 tbr, 120k tbn, 50 tbc (default)
 Metadata:
 creation_time : 2020-04-22T16:18:04.000000Z
 handler_name : Video
 Stream #0:2(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], Closed Ca
ptions, 902 kb/s, 25 fps, 25 tbr, 120k tbn, 50 tbc (default)
 Metadata:
 creation_time : 2020-04-22T16:18:04.000000Z
 handler_name : Video
 Stream #0:3(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 640x480 [SAR 4:3 DAR 16:9], Closed Cap
tions, 628 kb/s, 25 fps, 25 tbr, 120k tbn, 50 tbc (default)
 Metadata:
 creation_time : 2020-04-22T16:18:04.000000Z
 handler_name : Video
 Stream #0:4(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 125 kb/s (default)
 Metadata:
 creation_time : 2020-04-22T16:18:04.000000Z
 handler_name : Sound
 Stream #0:5(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 253 kb/s (default)
 Metadata:
 creation_time : 2020-04-22T16:18:04.000000Z
 handler_name : Sound
Stream mapping:
 Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
 Stream #0:5 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 00000012bef91f80] using SAR=1/1
[libx264 @ 00000012bef91f80] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 00000012bef91f80] profile High, level 4.0, 4:2:0, 8-bit
[libx264 @ 00000012bef91f80] 264 - core 157 r2932 303c484 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.vid
eolan.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=34 looka
head_threads=5 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_lookah
ead=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, mp4, to 'F:\Path\testtest.mp4'
:
 Metadata:
 major_brand : isom
 minor_version : 1
 compatible_brands: isom
 encoder : Lavf58.18.100
 Stream #0:0(und): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 25 fps,
 12800 tbn, 25 tbc (default)
 Metadata:
 creation_time : 2020-04-22T16:18:04.000000Z
 handler_name : Video
 encoder : Lavc58.30.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
 Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 341 kb/s (default)
 Metadata:
 creation_time : 2020-04-22T16:18:04.000000Z
 handler_name : Sound
 encoder : Lavc58.30.100 aac
frame=60981 fps= 84 q=-1.0 Lsize= 816313kB time=00:40:39.12 bitrate=2741.7kbits/s dup=3 drop=0 speed=3.36x
video:713292kB audio:101322kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.208512%
[libx264 @ 00000012bef91f80] frame I:769 Avg QP:16.36 size: 46713
[libx264 @ 00000012bef91f80] frame P:37125 Avg QP:19.81 size: 15059
[libx264 @ 00000012bef91f80] frame B:23087 Avg QP:21.11 size: 5866
[libx264 @ 00000012bef91f80] consecutive B-frames: 40.4% 24.0% 10.2% 25.5%
[libx264 @ 00000012bef91f80] mb I I16..4: 40.3% 58.0% 1.7%
[libx264 @ 00000012bef91f80] mb P I16..4: 6.2% 12.5% 0.1% P16..4: 29.8% 3.7% 2.7% 0.0% 0.0% skip:45.0%
[libx264 @ 00000012bef91f80] mb B I16..4: 1.0% 1.7% 0.0% B16..8: 27.9% 1.1% 0.1% direct: 2.0% skip:66.2% L0:49
.4% L1:49.3% BI: 1.3%
[libx264 @ 00000012bef91f80] 8x8 transform intra:65.3% inter:95.1%
[libx264 @ 00000012bef91f80] coded y,uvDC,uvAC intra: 24.7% 39.7% 3.2% inter: 7.0% 14.6% 0.0%
[libx264 @ 00000012bef91f80] i16 v,h,dc,p: 34% 26% 13% 28%
[libx264 @ 00000012bef91f80] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 15% 41% 3% 3% 4% 3% 3% 2%
[libx264 @ 00000012bef91f80] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 32% 25% 20% 3% 6% 5% 4% 3% 2%
[libx264 @ 00000012bef91f80] i8c dc,h,v,p: 58% 19% 20% 3%
[libx264 @ 00000012bef91f80] Weighted P-Frames: Y:0.1% UV:0.0%
[libx264 @ 00000012bef91f80] ref P L0: 72.2% 6.3% 15.8% 5.7% 0.0%
[libx264 @ 00000012bef91f80] ref B L0: 86.6% 11.5% 1.9%
[libx264 @ 00000012bef91f80] ref B L1: 97.6% 2.4%
[libx264 @ 00000012bef91f80] kb/s:2395.53
[aac @ 00000012bef93b00] Qavg: 471.415



-
Problem using FFmpeg to convert MKV with A/52 B audio (aka E-AC3) to AAC
5 juillet 2020, par nxl4I've got a number of MKV files which are (per VLC) encoded with A/52 B (aka E-AC3) audio codecs. I would like to convert these to AAC, but I'm having trouble doing this with FFmpeg. The command I'm running is :



ffmpeg -hwaccel auto -i original_file.mkv -y -c:v copy -c:a aac output_file.mkv




The command completes without error. However, the generated file has no audio when I play it. FFmpeg's output is as follows :



ffmpeg version 4.2.2-1ubuntu1 Copyright (c) 2000-2019 the FFmpeg developers
 built with gcc 9 (Ubuntu 9.3.0-3ubuntu1)
 configuration: --prefix=/usr --extra-version=1ubuntu1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
 libavutil 56. 31.100 / 56. 31.100
 libavcodec 58. 54.100 / 58. 54.100
 libavformat 58. 29.100 / 58. 29.100
 libavdevice 58. 8.100 / 58. 8.100
 libavfilter 7. 57.100 / 7. 57.100
 libavresample 4. 0. 0 / 4. 0. 0
 libswscale 5. 5.100 / 5. 5.100
 libswresample 3. 5.100 / 3. 5.100
 libpostproc 55. 5.100 / 55. 5.100
Guessed Channel Layout for Input Stream #0.1 : 5.1
Input #0, matroska,webm, from 'input_file.mkv':
 Metadata:
 encoder : libebml v1.3.5 + libmatroska v1.4.8
 creation_time : 2018-05-10T10:21:30.000000Z
 Duration: 00:42:08.15, start: 0.000000, bitrate: 3201 kb/s
 Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
 Metadata:
 BPS-eng : 2559028
 DURATION-eng : 00:42:08.151000000
 NUMBER_OF_FRAMES-eng: 60615
 NUMBER_OF_BYTES-eng: 808701337
 _STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
 _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-10 10:21:30
 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
 Stream #0:1(eng): Audio: eac3, 48000 Hz, 5.1, fltp (default)
 Metadata:
 BPS-eng : 640000
 DURATION-eng : 00:42:08.096000000
 NUMBER_OF_FRAMES-eng: 79003
 NUMBER_OF_BYTES-eng: 202247680
 _STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
 _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-10 10:21:30
 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
 Stream #0:2(eng): Subtitle: subrip
 Metadata:
 BPS-eng : 79
 DURATION-eng : 00:41:15.299000000
 NUMBER_OF_FRAMES-eng: 802
 NUMBER_OF_BYTES-eng: 24598
 _STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
 _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-10 10:21:30
 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
 Stream #0:3(eng): Subtitle: subrip
 Metadata:
 title : SDH
 BPS-eng : 82
 DURATION-eng : 00:41:15.299000000
 NUMBER_OF_FRAMES-eng: 844
 NUMBER_OF_BYTES-eng: 25598
 _STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
 _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-10 10:21:30
 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream mapping:
 Stream #0:0 -> #0:0 (copy)
 Stream #0:1 -> #0:1 (eac3 (native) -> aac (native))
 Stream #0:2 -> #0:2 (subrip (srt) -> ass (ssa))
Press [q] to stop, [?] for help
[aac @ 0x55d0572a1740] Using a PCE to encode channel layout "5.1(side)"
Output #0, matroska, to 'output_file.mkv':
 Metadata:
 encoder : Lavf58.29.100
 Stream #0:0: Video: h264 (High) (H264 / 0x34363248), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 23.98 fps, 23.98 tbr, 1k tbn, 1k tbc (default)
 Metadata:
 BPS-eng : 2559028
 DURATION-eng : 00:42:08.151000000
 NUMBER_OF_FRAMES-eng: 60615
 NUMBER_OF_BYTES-eng: 808701337
 _STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
 _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-10 10:21:30
 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
 Stream #0:1(eng): Audio: aac (LC) ([255][0][0][0] / 0x00FF), 48000 Hz, 5.1(side), fltp, 394 kb/s (default)
 Metadata:
 BPS-eng : 640000
 DURATION-eng : 00:42:08.096000000
 NUMBER_OF_FRAMES-eng: 79003
 NUMBER_OF_BYTES-eng: 202247680
 _STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
 _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-10 10:21:30
 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
 encoder : Lavc58.54.100 aac
 Stream #0:2(eng): Subtitle: ass (ssa)
 Metadata:
 BPS-eng : 79
 DURATION-eng : 00:41:15.299000000
 NUMBER_OF_FRAMES-eng: 802
 NUMBER_OF_BYTES-eng: 24598
 _STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
 _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-10 10:21:30
 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
 encoder : Lavc58.54.100 ssa 
video:789747kB audio:121419kB subtitle:41kB other streams:0kB global headers:1kB muxing overhead: 0.142563%
[aac @ 0x55d0572a1740] Qavg: 428.063




Any ideas what I'm doing wrong here ? In case it helps an
ffprobe -show_streams
command run on the original file shows the following :


DL.DDP5.1.H.264-NTG.mkv
ffprobe version 4.2.2-1ubuntu1 Copyright (c) 2007-2019 the FFmpeg developers
 built with gcc 9 (Ubuntu 9.3.0-3ubuntu1)
 configuration: --prefix=/usr --extra-version=1ubuntu1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
 libavutil 56. 31.100 / 56. 31.100
 libavcodec 58. 54.100 / 58. 54.100
 libavformat 58. 29.100 / 58. 29.100
 libavdevice 58. 8.100 / 58. 8.100
 libavfilter 7. 57.100 / 7. 57.100
 libavresample 4. 0. 0 / 4. 0. 0
 libswscale 5. 5.100 / 5. 5.100
 libswresample 3. 5.100 / 3. 5.100
 libpostproc 55. 5.100 / 55. 5.100
Input #0, matroska,webm, from 'input_file.mkv':
 Metadata:
 encoder : libebml v1.3.5 + libmatroska v1.4.8
 creation_time : 2018-05-10T10:21:30.000000Z
 Duration: 00:42:08.15, start: 0.000000, bitrate: 3201 kb/s
 Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
 Metadata:
 BPS-eng : 2559028
 DURATION-eng : 00:42:08.151000000
 NUMBER_OF_FRAMES-eng: 60615
 NUMBER_OF_BYTES-eng: 808701337
 _STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
 _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-10 10:21:30
 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
 Stream #0:1(eng): Audio: eac3, 48000 Hz, 6 channels, fltp (default)
 Metadata:
 BPS-eng : 640000
 DURATION-eng : 00:42:08.096000000
 NUMBER_OF_FRAMES-eng: 79003
 NUMBER_OF_BYTES-eng: 202247680
 _STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
 _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-10 10:21:30
 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
 Stream #0:2(eng): Subtitle: subrip
 Metadata:
 BPS-eng : 79
 DURATION-eng : 00:41:15.299000000
 NUMBER_OF_FRAMES-eng: 802
 NUMBER_OF_BYTES-eng: 24598
 _STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
 _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-10 10:21:30
 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
 Stream #0:3(eng): Subtitle: subrip
 Metadata:
 title : SDH
 BPS-eng : 82
 DURATION-eng : 00:41:15.299000000
 NUMBER_OF_FRAMES-eng: 844
 NUMBER_OF_BYTES-eng: 25598
 _STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
 _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-10 10:21:30
 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[STREAM]
index=0
codec_name=h264
codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
profile=High
codec_type=video
codec_time_base=1001/48000
codec_tag_string=[0][0][0][0]
codec_tag=0x0000
width=1280
height=720
coded_width=1280
coded_height=720
has_b_frames=2
sample_aspect_ratio=1:1
display_aspect_ratio=16:9
pix_fmt=yuv420p
level=31
color_range=tv
color_space=bt709
color_transfer=bt709
color_primaries=bt709
chroma_location=left
field_order=progressive
timecode=N/A
refs=1
is_avc=true
nal_length_size=4
id=N/A
r_frame_rate=24000/1001
avg_frame_rate=24000/1001
time_base=1/1000
start_pts=0
start_time=0.000000
duration_ts=N/A
duration=N/A
bit_rate=N/A
max_bit_rate=N/A
bits_per_raw_sample=8
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=1
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
TAG:BPS-eng=2559028
TAG:DURATION-eng=00:42:08.151000000
TAG:NUMBER_OF_FRAMES-eng=60615
TAG:NUMBER_OF_BYTES-eng=808701337
TAG:_STATISTICS_WRITING_APP-eng=mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
TAG:_STATISTICS_WRITING_DATE_UTC-eng=2018-05-10 10:21:30
TAG:_STATISTICS_TAGS-eng=BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[/STREAM]
[STREAM]
index=1
codec_name=eac3
codec_long_name=ATSC A/52B (AC-3, E-AC-3)
profile=unknown
codec_type=audio
codec_time_base=1/48000
codec_tag_string=[0][0][0][0]
codec_tag=0x0000
sample_fmt=fltp
sample_rate=48000
channels=6
channel_layout=unknown
bits_per_sample=0
dmix_mode=-1
ltrt_cmixlev=-1.000000
ltrt_surmixlev=-1.000000
loro_cmixlev=-1.000000
loro_surmixlev=-1.000000
id=N/A
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/1000
start_pts=0
start_time=0.000000
duration_ts=N/A
duration=N/A
bit_rate=N/A
max_bit_rate=N/A
bits_per_raw_sample=N/A
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=1
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
TAG:language=eng
TAG:BPS-eng=640000
TAG:DURATION-eng=00:42:08.096000000
TAG:NUMBER_OF_FRAMES-eng=79003
TAG:NUMBER_OF_BYTES-eng=202247680
TAG:_STATISTICS_WRITING_APP-eng=mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
TAG:_STATISTICS_WRITING_DATE_UTC-eng=2018-05-10 10:21:30
TAG:_STATISTICS_TAGS-eng=BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[/STREAM]
[STREAM]
index=2
codec_name=subrip
codec_long_name=SubRip subtitle
profile=unknown
codec_type=subtitle
codec_time_base=0/1
codec_tag_string=[0][0][0][0]
codec_tag=0x0000
width=N/A
height=N/A
id=N/A
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/1000
start_pts=0
start_time=0.000000
duration_ts=2528151
duration=2528.151000
bit_rate=N/A
max_bit_rate=N/A
bits_per_raw_sample=N/A
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=0
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
TAG:language=eng
TAG:BPS-eng=79
TAG:DURATION-eng=00:41:15.299000000
TAG:NUMBER_OF_FRAMES-eng=802
TAG:NUMBER_OF_BYTES-eng=24598
TAG:_STATISTICS_WRITING_APP-eng=mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
TAG:_STATISTICS_WRITING_DATE_UTC-eng=2018-05-10 10:21:30
TAG:_STATISTICS_TAGS-eng=BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[/STREAM]
[STREAM]
index=3
codec_name=subrip
codec_long_name=SubRip subtitle
profile=unknown
codec_type=subtitle
codec_time_base=0/1
codec_tag_string=[0][0][0][0]
codec_tag=0x0000
width=N/A
height=N/A
id=N/A
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/1000
start_pts=0
start_time=0.000000
duration_ts=2528151
duration=2528.151000
bit_rate=N/A
max_bit_rate=N/A
bits_per_raw_sample=N/A
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=0
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
TAG:language=eng
TAG:title=SDH
TAG:BPS-eng=82
TAG:DURATION-eng=00:41:15.299000000
TAG:NUMBER_OF_FRAMES-eng=844
TAG:NUMBER_OF_BYTES-eng=25598
TAG:_STATISTICS_WRITING_APP-eng=mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
TAG:_STATISTICS_WRITING_DATE_UTC-eng=2018-05-10 10:21:30
TAG:_STATISTICS_TAGS-eng=BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[/STREAM]




-
Unplayable video after running FFmpeg command
25 mai 2020, par HB.I asked this question last year. I resolved the issue I had and I implemented the same logic for merging an image with a video, instead of two images. This is running on Android.



Here is the command I'm using currently :



"-i", mFilePath, "-i", drawingPath, "-filter_complex", "[0:v]scale=iw*sar:ih,setsar=1,pad='max(iw\\,2*trunc(ih*47/80/2))':'max(ih\\,2*trunc(ow*80/47/2))':(ow-iw)/2:(oh-ih)/2[v0];[1:v][v0]scale2ref[v1][v0];[v0][v1]overlay=x=(W-w)/2:y=(H-h)/2[v]", "-map", "[v]", "-map", "0:a", "-c:v", "libx264", "-preset", "ultrafast", "-r", outputFPS, outputPath}




47/80/2
is calculated by getting a device's screen dimensions -1128 x 1920
.


When running this on certain devices, it results in an unplayable video.



But running the following command works perfectly fine :



"-i", mFilePath, "-crf", "18", "-c:v", "libx264", "-preset", "ultrafast", outputPath};




I think the issue is with the filter being applied ?





I compared running the first command on two different devices.



- 

- On the first device (Samsung J7 Pro), I was able to run the command successfully and play the video afterward. I tested the output on both devices and it is working.
- On the second device (Sony Xperia Tablet Z), I was able to run the command successfully but could not play the video. I tested the output on both devices and it doesn't play on either. It does play on my computer.







I compared the original video with the one not working and the one without a filter and the only difference I could find is that the one that is not working profile is
Baseline@L4.2
and the one without a filter profile isBaseline@L4.0
. The original video profile isHigh@L4.0
.


Here are all the videos. The original, the one without a filter (working) and the one with the filter(no working).



I have no idea why this is happening ? Any help would be appreciated.





Edit 1 :



Here is the actual log as requested :



"-i", "/storage/emulated/0/Android/data/com.my.package/files/CameraTemp/2020_05_24_09_17_53.mp4", "-i", "/storage/emulated/0/Android/data/com.my.package/files/MyVideos/tempShapes.png", "-filter_complex", "[0:v]scale=iw*sar:ih,setsar=1,pad='max(iw\\,2*trunc(ih*47/80/2))':'max(ih\\,2*trunc(ow*80/47/2))':(ow-iw)/2:(oh-ih)/2[v0];[1:v][v0]scale2ref[v1][v0];[v0][v1]overlay=x=(W-w)/2:y=(H-h)/2[v]", "-map", "[v]", "-map", "0:a", "-c:v", "libx264", "-preset", "ultrafast", "-r", "30", "/storage/emulated/0/Android/data/com.my.package/files/MyVideos/video with line.mp4"




and here is the complete log :



ffmpeg version n4.0-39-gda39990 Copyright (c) 2000-2018 the FFmpeg developers
 built with gcc 4.9.x (GCC) 20150123 (prerelease)
 configuration: --target-os=linux --cross-prefix=/root/bravobit/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/root/bravobit/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-ffprobe --enable-libopus --enable-libvorbis --enable-libfdk-aac --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-fontconfig --enable-libvpx --enable-libass --enable-yasm --enable-pthreads --disable-debug --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-linux-perf --disable-doc --disable-shared --enable-static --enable-runtime-cpudetect --enable-nonfree --enable-network --enable-avresample --enable-avformat --enable-avcodec --enable-indev=lavfi --enable-hwaccels --enable-ffmpeg --enable-zlib --enable-gpl --enable-small --enable-nonfree --pkg-config=pkg-config --pkg-config-flags=--static --prefix=/root/bravobit/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/root/bravobit/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/root/bravobit/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-cxxflags=
 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
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Android/data/com.my.package/files/CameraTemp/2020_05_24_09_17_53.mp4':
 Metadata:
 major_brand : mp42
 minor_version : 0
 compatible_brands: isommp42
 creation_time : 2020-05-24T08:18:02.000000Z
 Duration: 00:00:01.64, start: 0.000000, bitrate: 20750 kb/s
 Stream #0:0(eng): Video: h264 (avc1 / 0x31637661), yuv420p, 1920x1080, 18056 kb/s, SAR 1:1 DAR 16:9, 29.70 fps, 29.67 tbr, 90k tbn, 180k tbc (default)
 Metadata:
 creation_time : 2020-05-24T08:18:02.000000Z
 handler_name : VideoHandle
 Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 155 kb/s (default)
 Metadata:
 creation_time : 2020-05-24T08:18:02.000000Z
 handler_name : SoundHandle
Input #1, png_pipe, from '/storage/emulated/0/Android/data/com.my.package/files/MyVideos/tempShapes.png':
 Duration: N/A, bitrate: N/A
 Stream #1:0: Video: png, rgba(pc), 1920x1128, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
 Stream #0:0 (h264) -> scale (graph 0)
 Stream #1:0 (png) -> scale2ref:default (graph 0)
 overlay (graph 0) -> Stream #0:0 (libx264)
 Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
frame= 0 fps=0.0 q=0.0 size= 0kB time=-577014:32:22.77 bitrate= -0.0kbits/s speed=N/A 
frame= 0 fps=0.0 q=0.0 size= 0kB time=-577014:32:22.77 bitrate= -0.0kbits/s speed=N/A 
[libx264 @ 0xb83fc8a0] using SAR=1/1
[libx264 @ 0xb83fc8a0] using cpu capabilities: ARMv6 NEON
[libx264 @ 0xb83fc8a0] profile Constrained Baseline, level 4.2
[libx264 @ 0xb83fc8a0] 264 - core 152 r2851M ba24899 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=2 keyint_min=1 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
Output #0, mp4, to '/storage/emulated/0/Android/data/com.my.package/files/MyVideos/video with line.mp4':
 Metadata:
 major_brand : mp42
 minor_version : 0
 compatible_brands: isommp42
 encoder : Lavf58.12.100
 Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1920x1128 [SAR 1:1 DAR 80:47], q=-1--1, 29 fps, 14848 tbn, 29 tbc (default)
 Metadata:
 encoder : Lavc58.18.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
 Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
 Metadata:
 creation_time : 2020-05-24T08:18:02.000000Z
 handler_name : SoundHandle
 encoder : Lavc58.18.100 aac
frame= 1 fps=0.4 q=0.0 size= 0kB time=00:00:01.01 bitrate= 0.4kbits/s speed=0.397x 
frame= 5 fps=1.6 q=0.0 size= 0kB time=00:00:01.01 bitrate= 0.4kbits/s speed=0.33x 
frame= 9 fps=2.5 q=24.0 size= 256kB time=00:00:01.01 bitrate=2075.0kbits/s speed=0.28x 
frame= 13 fps=3.1 q=25.0 size= 1024kB time=00:00:01.01 bitrate=8298.9kbits/s speed=0.243x 
frame= 18 fps=3.8 q=29.0 size= 2048kB time=00:00:01.01 bitrate=16597.5kbits/s speed=0.214x 
frame= 21 fps=3.9 q=25.0 size= 2560kB time=00:00:01.01 bitrate=20746.7kbits/s speed=0.19x 
frame= 23 fps=3.9 q=25.0 size= 2816kB time=00:00:01.01 bitrate=22821.4kbits/s speed=0.173x 
frame= 26 fps=4.0 q=29.0 size= 3584kB time=00:00:01.01 bitrate=29045.3kbits/s speed=0.156x 
Past duration 0.617577 too large
Past duration 0.639641 too large
frame= 28 fps=3.9 q=29.0 size= 3840kB time=00:00:01.01 bitrate=31119.9kbits/s speed=0.142x 
Past duration 0.665230 too large
frame= 29 fps=3.8 q=25.0 size= 3840kB time=00:00:01.01 bitrate=31119.9kbits/s speed=0.132x 
Past duration 0.690834 too large
Past duration 0.711281 too large
Past duration 0.736885 too large
frame= 32 fps=3.9 q=29.0 size= 4608kB time=00:00:01.01 bitrate=37343.8kbits/s speed=0.123x 
Past duration 0.762474 too large
Past duration 0.783577 too large
Past duration 0.807564 too large
frame= 35 fps=3.9 q=25.0 size= 4864kB time=00:00:01.01 bitrate=39418.4kbits/s speed=0.112x 
Past duration 0.831551 too large
Past duration 0.855537 too large
frame= 37 fps=3.5 q=25.0 size= 5376kB time=00:00:01.01 bitrate=43567.7kbits/s speed=0.0968x 
Past duration 0.879524 too large
Past duration 0.903511 too large
frame= 39 fps=3.4 q=25.0 size= 5376kB time=00:00:01.06 bitrate=41196.6kbits/s speed=0.0927x 
Past duration 0.927498 too large
Past duration 0.951500 too large
frame= 41 fps=3.4 q=25.0 size= 5376kB time=00:00:01.13 bitrate=38700.0kbits/s speed=0.0931x 
frame= 41 fps=3.2 q=25.0 size= 5376kB time=00:00:01.13 bitrate=38700.0kbits/s speed=0.0886x 
frame= 41 fps=3.1 q=25.0 size= 5888kB time=00:00:01.43 bitrate=33554.2kbits/s speed=0.108x 
Past duration 0.975487 too large
frame= 45 fps=3.2 q=26.0 size= 6656kB time=00:00:01.60 bitrate=33905.4kbits/s speed=0.114x 
frame= 45 fps=3.0 q=-1.0 Lsize= 8158kB time=00:00:01.65 bitrate=40480.7kbits/s speed=0.11x 
video:8127kB audio:28kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.032895%
[libx264 @ 0xb83fc8a0] frame I:23 Avg QP:24.70 size:337646
[libx264 @ 0xb83fc8a0] frame P:22 Avg QP:29.00 size: 25250
[libx264 @ 0xb83fc8a0] mb I I16..4: 100.0% 0.0% 0.0%
[libx264 @ 0xb83fc8a0] mb P I16..4: 0.4% 0.0% 0.0% P16..4: 43.6% 0.0% 0.0% 0.0% 0.0% skip:56.0%
[libx264 @ 0xb83fc8a0] coded y,uvDC,uvAC intra: 90.0% 84.7% 58.1% inter: 20.1% 6.2% 0.1%
[libx264 @ 0xb83fc8a0] i16 v,h,dc,p: 25% 28% 28% 20%
[libx264 @ 0xb83fc8a0] i8c dc,h,v,p: 39% 25% 20% 16%
[libx264 @ 0xb83fc8a0] kb/s:42901.20
[aac @ 0xb83d7d10] Qavg: 3517.779