
Recherche avancée
Médias (1)
-
Carte de Schillerkiez
13 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (15)
-
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 (...) -
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...) -
Other interesting software
13 avril 2011, parWe don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
We don’t know them, we didn’t try them, but you can take a peek.
Videopress
Website : http://videopress.com/
License : GNU/GPL v2
Source code : (...)
Sur d’autres sites (3637)
-
Can not use the jsmpeg in react "Unexpected use of 'self'"
5 mai 2020, par Muhammad Anas Khancode that i want to convert in React




 
 <code class="echappe-js"><script type="text/javascript" src='http://stackoverflow.com/feeds/tag/jsmpeg.min.js'></script>


<script type="text/javascript">&#xA; var canvas = document.getElementById("videoCanvas");&#xA; console.log(document.location.hostname);&#xA; var url = "ws://localhost:9999/";&#xA; </script>

 




Can not change it to react format.When i try to convert it is giving jsmpeg error 
i.e



code that i tried but get an error



import React from 'react';
import ReactDOM from 'react-dom';
import "./jsmpeg.min.js"
const App =()=>{
 return(
 <h1>Hello</h1>
 )
}


ReactDOM.render(<app></app>,document.getElementById('root'));




Error



/src/jsmpeg.min.js
Line 606:9 : Unexpected use of 'self' no-restricted-globals
 Line 2771:13 : Expected an assignment or function call and instead saw an expression no-unused-expressions



Search for the keywords to learn more about each error.


-
Error of FFmpeg on Java in "av_image_copy_to_buffer" method during decoding H.264 stream
26 mai 2020, par maru2213I'm trying to decode H.264 stream, which is sent over Socket from an Android application to a computer. And I also want to show the decoded stream using JavaFX. I searched for a long time, and decided to use JavaCV / FFmpeg. However I got error from FFmpeg. (I was inspired by this code.)



Questions :



- 

- Why does FFmpeg make error ?
- Is it a correct way to convert
AVFrame
tojavafx.scene.image.Image
?







I'm using :



- 

- javacv-platform 1.4.4
- ffmpeg-platform 4.1-1.4.4







Code :



This is a part of import and class fields, and method which runs once at the first time. (Actually the content of
initialize()
is wrapped by try catch.)


import javafx.scene.image.Image;

 private avcodec.AVCodec avCodec;
 private avcodec.AVCodecContext avCodecContext;
 private avutil.AVDictionary avDictionary;
 private avutil.AVFrame avFrame;

 public void initialize() {
 avCodec = avcodec_find_decoder(AV_CODEC_ID_H264);
 if (avCodec == null) {
 throw new RuntimeException("Can't find decoder");
 }
 avCodecContext = avcodec_alloc_context3(avCodec);
 if (avCodecContext == null) {
 throw new RuntimeException("Can't allocate decoder context");
 }
 int result = avcodec_open2(avCodecContext, avCodec, (AVDictionary) null);
 if (result < 0) {
 throw new RuntimeException("Can't open decoder");
 }
 avFrame = av_frame_alloc();
 if (avFrame == null) {
 throw new RuntimeException("Can't allocate frame");
 }
 }




And this is a method which is called every time when I receive a packet from Android.
byte[] data
is the packet data starting with0x00
,0x00
,0x00
,0x01
.


The place where I get error is
number_of_written_bytes
. It always gets <0.


private void decode(byte[] data) {
 AVPacket avPacket = new AVPacket();
 av_init_packet(avPacket);
 avPacket.pts(AV_NOPTS_VALUE);
 avPacket.dts(AV_NOPTS_VALUE);
 BytePointer bytePointer = new BytePointer(data);
 bytePointer.capacity(data.length);
 avPacket.data(bytePointer);
 avPacket.size(data.length);
 avPacket.pos(-1);

 avcodec_send_packet(avCodecContext, avPacket);
 int result = avcodec_receive_frame(avCodecContext, avFrame);
 if (result >= 0) {
 int bufferOutputSize = av_image_get_buffer_size(avFrame.format(), avFrame.width(), avFrame.height(), 16);
 Pointer pointer = av_malloc(bufferOutputSize);
 BytePointer outputPointer = new BytePointer(pointer);
 int number_of_written_bytes = av_image_copy_to_buffer(outputPointer, bufferOutputSize, avFrame.data(), avFrame.linesize(), avFrame.chroma_location(), avFrame.width(), avFrame.height(), 1);
 if (number_of_written_bytes < 0) {
 //The process always come here.
 throw new RuntimeException("Can't copy image to buffer");
 }

 System.out.println("decode success");
 Image image = new Image(new ByteArrayInputStream(outputPointer.asBuffer().array()));
 } else {
 System.out.println("decode failed");
 }
 }




Anything is helpful for me. Thanks.


-
Edit H264 video stream header information ("start_pts" and "start_time")
27 juin 2020, par DavidI have a video clip that appears to be slightly corrupted. Does not play on VLC but works on Potplayer. I used FFprobe to get information on the video.


The problem appears to be with the start points of the video stream :


time_base=1/90000
start_pts=585050940
start_time=6500.566000
duration_ts=585050940
duration=6500.566000
bit_rate=3123218



I'm just wondering whether it is possible to manually edit the "start_pts" and "start_time" to 0 ? Is there any specific software to do this ? Due to large size of video file, I couldn't load it in Notepad++.


Full ffprobe output shown below :


# ffprobe output

[streams.stream.0]
index=0
codec_name=h264
codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
profile=unknown
codec_type=video
codec_time_base=1/60
codec_tag_string=avc1
codec_tag=0x31637661
width=1920
height=1080
coded_width=1920
coded_height=1080
closed_captions=0
has_b_frames=0
sample_aspect_ratio=N/A
display_aspect_ratio=N/A
pix_fmt=unknown
level=-99
color_range=unknown
color_space=unknown
color_transfer=unknown
color_primaries=unknown
chroma_location=unspecified
field_order=unknown
timecode=N/A
refs=1
is_avc=true
nal_length_size=4
id=N/A
r_frame_rate=30/1
avg_frame_rate=30/1
time_base=1/90000
start_pts=585050940
start_time=6500.566000
duration_ts=585050940
duration=6500.566000
bit_rate=3123218
max_bit_rate=N/A
bits_per_raw_sample=N/A
nb_frames=195017
nb_read_frames=N/A
nb_read_packets=N/A

[streams.stream.0.disposition]
default=1
dub=0
original=0
comment=0
lyrics=0
karaoke=0
forced=0
hearing_impaired=0
visual_impaired=0
clean_effects=0
attached_pic=0
timed_thumbnails=0

[streams.stream.0.tags]
language=und
handler_name=VideoHandler

[streams.stream.1]
index=1
codec_name=aac
codec_long_name=AAC (Advanced Audio Coding)
profile=LC
codec_type=audio
codec_time_base=1/48000
codec_tag_string=mp4a
codec_tag=0x6134706d
sample_fmt=fltp
sample_rate=48000
channels=2
channel_layout=stereo
bits_per_sample=0
id=N/A
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/48000
start_pts=0
start_time=0.000000
duration_ts=312029184
duration=6500.608000
bit_rate=189376
max_bit_rate=189376
bits_per_raw_sample=N/A
nb_frames=304718
nb_read_frames=N/A
nb_read_packets=N/A

[streams.stream.1.disposition]
default=1
dub=0
original=0
comment=0
lyrics=0
karaoke=0
forced=0
hearing_impaired=0
visual_impaired=0
clean_effects=0
attached_pic=0
timed_thumbnails=0

[streams.stream.1.tags]
language=eng
handler_name=SoundHandler

[format]
filename=D\:\\Start\\test.mp4
nb_streams=2
nb_programs=0
format_name=mov,mp4,m4a,3gp,3g2,mj2
format_long_name=QuickTime / MOV
start_time=0.000000
duration=6500.608000
size=2703218140
bit_rate=3326726
probe_score=100

[format.tags]
major_brand=isom
minor_version=512
compatible_brands=isomiso2avc1mp41