
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 (98)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)
Sur d’autres sites (7793)
-
How to fix video in gallery from not playing (probable cause encoding from ffmpeg)
30 avril 2020, par Nathan SinclairI'm setting up a video stream by which I can download a video into the Android gallery, so that I can play it back later.
I have a problem with playing the video back from gallery. The same problem arises when trying to view the url in a videoview.



video information from ffmpeg displays this.



Input #0, mpjpeg, from '':
 Duration: N/A, bitrate: N/A
 Stream #0:0: Video: mjpeg (Baseline), yuvj422p(pc, bt470bg/unknown/unknown), 1280x720, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
 Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[swscaler @ 0x1cab5e0] deprecated pixel format used, make sure you did set range correctly
[libx264 @ 0x1c6f030] using cpu capabilities: ARMv6 NEON
[libx264 @ 0x1c6f030] profile Constrained Baseline, level 3.0, 4:2:0, 8-bit
[libx264 @ 0x1c6f030] 264 - core 157 r2969 d4099dd - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 - http://www.videolan.org/x264.html - options: cabac=0 ref=2 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=6 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=30 rc=crf mbtree=1 crf=18.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'out.mp4':
 Metadata:
 encoder : Lavf58.33.100
 Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 720x406, q=-1--1, 30 fps, 15360 tbn, 30 tbc
 Metadata:
 encoder : Lavc58.59.101 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
Error opening file out.mp4: IsoMedia File is truncated28.56 bitrate= 734.1kbits/s speed=0.478x
[pid: 5138|app: 0|req: 1/1] 192.168.178.21 () {32 vars in 406 bytes} [Mon Oct 7 01:12:17 2019] GET /stop => generated 39 bytes in 152 msecs (HTTP/1.1 200) 2 headers in 79 bytes (1 switches on core 0)
frame= 899 fps= 15 q=-1.0 Lsize= 2779kB time=00:00:29.93 bitrate= 760.6kbits/s speed=0.49x
video:2775kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.157041%




I have attempted to follow this article. Android MediaPlayer error (1, -2147483648)



I'm using FFMpeg to record from a mjpeg stream into a file, which then is hosted by a uwsgi/flask server into a convenient url : http://ipaddress/video.mp4



Thus far ive been able to open the video fine using chrome in Android.



my FFMPEG command looks like this :



ffmpeg -i $1 -crf 18 -r 30 -vf "scale=720x406, setpts='1/(30*TB) * (N + 0.05 * sin(N*2*PI/25))', fps=fps=30" -profile:v baseline -pix_fmt yuv420p -f mp4 -preset fast out.mp4




I thought it may have something to do with the transmission of the file. I'm using an android library called volley to send the url so it can be downloaded as a file on the Android. Then it is subsequently put in gallery. This is when I began to experience the problems. I wanted to be thorough, so tried to find out if the file contents was the issue. This is because when displaying it on gallery, there is no width or height information, or even duration. I have come to suspect something is at issue with ffmpeg. I'm not cutting out that it could be keeping the file from opening if it can't find it's normal file properties.



The volley code for the downloaded file is as follows :



@Override
 public void onResponse(byte[] response) {
 try {
 if (response!=null) {

 File file = createVideoFile();

 FileOutputStream stream = new FileOutputStream(file);
 try {
 stream.write(response);
 } finally {
 stream.close();
 }

 addToGallery(file.getAbsolutePath());
 MediaScannerConnection.scanFile(this, new String[]{file.getAbsolutePath()}, null, (path, uri) -> {
 Intent intent = new Intent (context, VideoActivity.class);
 intent.setData(uri);
 startActivity(intent);

 });


 Toast.makeText(this, "Download complete.", Toast.LENGTH_LONG).show();
 }
 } catch (Exception e) {
 // TODO Auto-generated catch block
 Log.d("KEY_ERROR", "UNABLE TO DOWNLOAD FILE");
 e.printStackTrace();
 }
 }

private void addToGallery(String path) throws FileNotFoundException {
 MediaScannerConnection.scanFile(context, new String[]{

 path},

 null, new MediaScannerConnection.OnScanCompletedListener() {

 public void onScanCompleted(String path, Uri uri)

 {

 Log.e(TAG, "file" + path + " was scanned successfully");

 }

 });

 Uri uri = Uri.parse("file:///" + path);
 Intent intent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, uri);
 context.sendBroadcast(intent);

 }




I did have a VideoView to display it, as pertaining to a code example i found to download videos using volley.



https://github.com/coderminion/AndroidVolleyLib


-
arm : vp9itxfm : Do a simpler half/quarter idct16/idct32 when possible
22 novembre 2016, par Martin Storsjöarm : vp9itxfm : Do a simpler half/quarter idct16/idct32 when possible
This work is sponsored by, and copyright, Google.
This avoids loading and calculating coefficients that we know will
be zero, and avoids filling the temp buffer with zeros in places
where we know the second pass won’t read.This gives a pretty substantial speedup for the smaller subpartitions.
The code size increases from 12388 bytes to 19784 bytes.
The idct16/32_end macros are moved above the individual functions ; the
instructions themselves are unchanged, but since new functions are added
at the same place where the code is moved from, the diff looks rather
messy.Before : Cortex A7 A8 A9 A53
vp9_inv_dct_dct_16x16_sub1_add_neon : 273.0 189.5 212.0 235.8
vp9_inv_dct_dct_16x16_sub2_add_neon : 2102.1 1521.7 1736.2 1265.8
vp9_inv_dct_dct_16x16_sub4_add_neon : 2104.5 1533.0 1736.6 1265.5
vp9_inv_dct_dct_16x16_sub8_add_neon : 2484.8 1828.7 2014.4 1506.5
vp9_inv_dct_dct_16x16_sub12_add_neon : 2851.2 2117.8 2294.8 1753.2
vp9_inv_dct_dct_16x16_sub16_add_neon : 3239.4 2408.3 2543.5 1994.9
vp9_inv_dct_dct_32x32_sub1_add_neon : 758.3 456.7 864.5 553.9
vp9_inv_dct_dct_32x32_sub2_add_neon : 10776.7 7949.8 8567.7 6819.7
vp9_inv_dct_dct_32x32_sub4_add_neon : 10865.6 8131.5 8589.6 6816.3
vp9_inv_dct_dct_32x32_sub8_add_neon : 12053.9 9271.3 9387.7 7564.0
vp9_inv_dct_dct_32x32_sub12_add_neon : 13328.3 10463.2 10217.0 8321.3
vp9_inv_dct_dct_32x32_sub16_add_neon : 14176.4 11509.5 11018.7 9062.3
vp9_inv_dct_dct_32x32_sub20_add_neon : 15301.5 12999.9 11855.1 9828.2
vp9_inv_dct_dct_32x32_sub24_add_neon : 16482.7 14931.5 12650.1 10575.0
vp9_inv_dct_dct_32x32_sub28_add_neon : 17589.5 15811.9 13482.8 11333.4
vp9_inv_dct_dct_32x32_sub32_add_neon : 18696.2 17049.2 14355.6 12089.7After :
vp9_inv_dct_dct_16x16_sub1_add_neon : 273.0 189.5 211.7 235.8
vp9_inv_dct_dct_16x16_sub2_add_neon : 1203.5 998.2 1035.3 763.0
vp9_inv_dct_dct_16x16_sub4_add_neon : 1203.5 998.1 1035.5 760.8
vp9_inv_dct_dct_16x16_sub8_add_neon : 1926.1 1610.6 1722.1 1271.7
vp9_inv_dct_dct_16x16_sub12_add_neon : 2873.2 2129.7 2285.1 1757.3
vp9_inv_dct_dct_16x16_sub16_add_neon : 3221.4 2520.3 2557.6 2002.1
vp9_inv_dct_dct_32x32_sub1_add_neon : 753.0 457.5 866.6 554.6
vp9_inv_dct_dct_32x32_sub2_add_neon : 7554.6 5652.4 6048.4 4920.2
vp9_inv_dct_dct_32x32_sub4_add_neon : 7549.9 5685.0 6046.9 4925.7
vp9_inv_dct_dct_32x32_sub8_add_neon : 8336.9 6704.5 6604.0 5478.0
vp9_inv_dct_dct_32x32_sub12_add_neon : 10914.0 9777.2 9240.4 7416.9
vp9_inv_dct_dct_32x32_sub16_add_neon : 11859.2 11223.3 9966.3 8095.1
vp9_inv_dct_dct_32x32_sub20_add_neon : 15237.1 13029.4 11838.3 9829.4
vp9_inv_dct_dct_32x32_sub24_add_neon : 16293.2 14379.8 12644.9 10572.0
vp9_inv_dct_dct_32x32_sub28_add_neon : 17424.3 15734.7 13473.0 11326.9
vp9_inv_dct_dct_32x32_sub32_add_neon : 18531.3 17457.0 14298.6 12080.0Signed-off-by : Martin Storsjö <martin@martin.st>
-
FFMPEG intermittent failures reading live RTMP stream
22 janvier 2019, par stevendesuThe Command
I’m attempting to read a live RTMP stream and save the result to a file with the following command :
ffmpeg -re -rtmp_live live -y -i "rtmp://<server>/<app>/<stream>" -c copy -f flv /tmp/dump.flv
</stream></app></server>I run this command then after 10-15 seconds I kill the process and check
/tmp/dump.flv
. I’m trying to do this for stream diagnostic purposes (determine the encoding, bitrate, resolution, pixel format, and key frame interval of the live stream)This command works about 25-50% of the time. When it works FFMPEG takes about 5 seconds to connect to the stream, then it begins dumping data to disk. After I kill the process, I can find a couple of megabytes of video data in
/tmp/dump.flv
which can be probed usingffprobe
.When the command fails, it goes into one of two failure states :
Failure State 1
stderr is flooded with a series of messages about "missing picture in access unit with size X", and the output file
/tmp/dump.flv
is created but contains 0 bytesffmpeg version 3.4.4-1~16.04.york0 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
configuration: --prefix=/usr --extra-version='1~16.04.york0' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
[NULL @ 0x55b72d568920] pps_id 381 out of range
[AVBSFContext @ 0x55b72d5692c0] Invalid NAL unit 0, skipping.
Last message repeated 1 times
[h264 @ 0x55b72d568920] Invalid NAL unit 0, skipping.
Last message repeated 1 times
[h264 @ 0x55b72d568920] no frame!
[h264 @ 0x55b72d568920] missing picture in access unit with size 2200
[AVBSFContext @ 0x55b72d5692c0] Invalid NAL unit 0, skipping.
Last message repeated 2 times
[h264 @ 0x55b72d568920] Invalid NAL unit 0, skipping.
Last message repeated 2 times
[h264 @ 0x55b72d568920] no frame!
[h264 @ 0x55b72d568920] missing picture in access unit with size 3171
[AVBSFContext @ 0x55b72d5692c0] Invalid NAL unit 0, skipping.
[h264 @ 0x55b72d568920] Invalid NAL unit 0, skipping.
[h264 @ 0x55b72d568920] no frame!
[NULL @ 0x55b72d568920] missing picture in access unit with size 80572
[h264 @ 0x55b72d568920] missing picture in access unit with size 1560
[h264 @ 0x55b72d568920] missing picture in access unit with size 2608
[h264 @ 0x55b72d568920] non-existing PPS 0 referenced
[h264 @ 0x55b72d568920] missing picture in access unit with size 2734
[h264 @ 0x55b72d568920] missing picture in access unit with size 2885
[h264 @ 0x55b72d568920] missing picture in access unit with size 77739
[h264 @ 0x55b72d568920] non-existing PPS 254 referenced
[h264 @ 0x55b72d568920] missing picture in access unit with size 3360
[h264 @ 0x55b72d568920] missing picture in access unit with size 2804
[h264 @ 0x55b72d568920] missing picture in access unit with size 3051
[h264 @ 0x55b72d568920] missing picture in access unit with size 3067
[h264 @ 0x55b72d568920] missing picture in access unit with size 77693
[h264 @ 0x55b72d568920] non-existing PPS 0 referenced
[h264 @ 0x55b72d568920] missing picture in access unit with size 2421
[h264 @ 0x55b72d568920] missing picture in access unit with size 2779
[h264 @ 0x55b72d568920] missing picture in access unit with size 2442
[h264 @ 0x55b72d568920] missing picture in access unit with size 2678
[h264 @ 0x55b72d568920] missing picture in access unit with size 76877
[h264 @ 0x55b72d568920] sps_id 15 out of range
[h264 @ 0x55b72d568920] missing picture in access unit with size 1342
[h264 @ 0x55b72d568920] missing picture in access unit with size 2412
[h264 @ 0x55b72d568920] missing picture in access unit with size 2238
[h264 @ 0x55b72d568920] missing picture in access unit with size 3550
[h264 @ 0x55b72d568920] missing picture in access unit with size 3075
...
(after hitting Ctrl+C:)
Input #0, flv, from 'rtmp://<server>/<app>/<stream>':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.83.100
Duration: 00:00:00.00, start: 5285.919000, bitrate: N/A
Stream #0:0: Video: h264 (Constrained Baseline), yuv420p, 1920x1080, 2543 kb/s, 24 fps, 24 tbr, 1k tbn, 48 tbc
Output #0, flv, to '/tmp/dump.flv':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.83.100
Stream #0:0: Video: h264 (Constrained Baseline) ([7][0][0][0] / 0x0007), yuv420p, 1920x1080, q=2-31, 2543 kb/s, 24 fps, 24 tbr, 1k tbn, 1k tbc
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
frame= 0 fps=0.0 q=-1.0 Lsize= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Exiting normally, received signal 2.
</stream></app></server>Failure State 2
The message "No start code is found." is displayed and FFMPEG immediately terminates after less than a half-second. When this happens the file
/tmp/dump.flv
is not created.ffmpeg version 3.4.4-1~16.04.york0 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
configuration: --prefix=/usr --extra-version='1~16.04.york0' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
[NULL @ 0x56274b0be920] missing picture in access unit with size 3710
[AVBSFContext @ 0x56274b0bf2c0] No start code is found.
rtmp://<server>/<app>/<stream>: could not find codec parameters
Input #0, flv, from 'rtmp://<server>/<app>/<stream>':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.83.100
Duration: 00:00:00.00, start: 0.000000, bitrate: N/A
Stream #0:0: Video: h264, none, 2543 kb/s, 24 fps, 1k tbn
Output #0, flv, to '/tmp/dump.flv':
Output file #0 does not contain any stream
</stream></app></server></stream></app></server>What I’ve tried
- Adding or removing
-re
to try and limit the input frame rate to the source frame rate - Adding or removing
-rtmp_live live
- Adding or removing
-timeout 5
(or any other timeout value) - Using RTMP URL parameters (e.g.
-i "rtmp://<server>/<app>/<stream> live=1 timeout=5"</stream></app></server>
)
Does anyone know why this command’s success is so intermittent or how I can get more consistent results ?
Alternate Acceptable Solution
The only reason I’m using
ffmpeg
to dump the stream to a temporary file at all is because I plan to perform multiple tests on the file (at least two at the moment — one to get the encoding, and another to get the key frame interval). By downloading the stream I reduce bandwidth usage and reduce runtime. However it’s perfectly acceptable to foregoffmpeg
and just useffprobe
directly on the RTMP URL if this would help.Note that I did try this and I get the same two failure states with
ffprobe
- Adding or removing