
Recherche avancée
Médias (91)
-
Spitfire Parade - Crisis
15 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Wired NextMusic
14 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
-
Video d’abeille en portrait
14 mai 2011, par
Mis à jour : Février 2012
Langue : français
Type : Video
-
Sintel MP4 Surround 5.1 Full
13 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
-
Carte de Schillerkiez
13 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (51)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Contribute to a better visual interface
13 avril 2011MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community. -
Submit enhancements and plugins
13 avril 2011If you have developed a new extension to add one or more useful features to MediaSPIP, let us know and its integration into the core MedisSPIP functionality will be considered.
You can use the development discussion list to request for help with creating a plugin. As MediaSPIP is based on SPIP - or you can use the SPIP discussion list SPIP-Zone.
Sur d’autres sites (6145)
-
Add "prefer_tcp" flag to "rtsp_flags"
4 mars 2014, par Andrey Utkin -
node-fluent-ffmpeg conversion to mp3 does not fire any "end" or "finish" event
27 février 2024, par 1voyI am downloading a video using ytdl-core and converting it to mp3 using node-fluent-ffmpeg. It seems that the code after the ffmpeg conversion gets executed before the conversion finishes as trying to upload the .mp3 file to a Google Cloud Storage bucket throws an error. I am trying to detect 'end' or 'finish' events but none are being triggered.


Code :


ytdl(url?.toString() as string)
 .once('data', (data) => {
 console.log('start', data);
 })
 .on('progress', async function (progress, downloaded, total) {
 console.log(parseInt(((downloaded / total) * 100).toString()) + '%');
 
 })
 .on('finish', async function () {
 console.log('Download finished...');
 
 console.log('using ffmpeg to convert into mp3');
 Ffmpeg({ source: `/Users/user/project/server/output/${videoId}.mp4` })
 .setFfmpegPath(ffmpeg.path)
 .toFormat('mp3')
 .saveToFile(`/Users/user/project/server/output/${videoId}.mp3`)
 .on('finish', () => {
 console.log('finished conversion');
 });
 console.log('after ffmpeg mp3 conversion');

 const storage = new Storage({
 keyFilename: `./key.json`,
 });

 const bucketName = 'bucketname';
 const bucket = storage.bucket(bucketName);
 let mp3_url;
 console.log(
 fs.existsSync(`/Users/user/project/server/output/${videoId}.mp3`)
 ); // returns false
 bucket.upload(
 `/Users/user/project/server/output/${videoId}.mp3`,
// Error uploading: Error: ENOENT: no such file or directory, open '/Users/me/project/server/output/RMvenf7E-Dg.mp3'
 {
 destination: `${userId}/${videoId}.mp3`,
 },
 function (err, file) {
 if (err) {
 console.error(`Error uploading: ${err}`);
 } else {
 console.log(`mp3 uploaded to ${bucketName}.`);
 console.log(file?.publicUrl());
 }
 }
 );

 
 .pipe(
 fs.createWriteStream(`/Users/me/project/server/output/${videoId}.mp4`)
 );

 console.log('after download and conversion');

 req.on('close', async () => {
 res.end();
 });



Error uploading: Error: ENOENT: no such file or directory, open '/Users/polo/makeklips/server/output/RMvenf7E-Dg.mp3'
[1] /Users/me/project/server/node_modules/.pnpm/fluent-ffmpeg@2.1.2/node_modules/fluent-ffmpeg/lib/processor.js:182
[1] handleExit(new Error('ffmpeg exited with code ' + code));
[1] ^
[1] Error: ffmpeg exited with code 1: Output #0, mp3, to '/Users/me/project/server/output/RMvenf7E-Dg.mp3':
[1] Output file #0 does not contain any stream



-
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