
Recherche avancée
Autres articles (56)
-
Qu’est ce qu’un éditorial
21 juin 2013, parEcrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
Vous pouvez personnaliser le formulaire de création d’un éditorial.
Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...) -
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela. -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs
Sur d’autres sites (8736)
-
MOV to ACVHD conversion via Spring Boot and FFmpeg leads to file system error
31 décembre 2024, par epicUsernameI am experiencing an issue on a personal project that seeks to convert HEIC to JPG files and MOV files to AVCHD format. The HEIC to JPG conversion works, but the MOV to AVCHD does not, which is where my problems lie.


The intent is to do this with Spring Boot and FFmpeg, using a simple interface done in WindowBuilder.


The relevant bits are the pom file :


<dependencies>
 
 
 <dependency>
 <groupid>jmagick</groupid>
 <artifactid>jmagick</artifactid>
 <version>6.6.9</version>
 </dependency>

 
 <dependency>
 <groupid>net.java.dev.jna</groupid>
 <artifactid>jna</artifactid>
 <version>5.7.0</version> 
 </dependency>
 <dependency>
 <groupid>net.java.dev.jna</groupid>
 <artifactid>jna-platform</artifactid>
 <version>5.7.0</version>
 </dependency>
 
 


 <dependency>
 <groupid>org.bytedeco</groupid>
 <artifactid>ffmpeg</artifactid>
 <version>7.1-1.5.11</version>
 </dependency>
 <dependency>
 <groupid>org.bytedeco</groupid>
 <artifactid>javacv</artifactid>
 <version>1.5.11</version>
 </dependency>
 <dependency>
 <groupid>org.bytedeco</groupid>
 <artifactid>ffmpeg-platform</artifactid>
 <version>7.1-1.5.11</version>
 </dependency>
 
 <dependency>
 <groupid>org.bytedeco</groupid>
 <artifactid>javacpp</artifactid>
 <version>1.5.11</version>
 </dependency>
 </dependencies>




and the main file with the event handling for the application, based on the interface :


package home.multimeida.mmconverter;

imports...

public class MMConverterInterface extends JFrame {

 public static void main(String[] args) {
 
 
 try {
 System.setProperty("jna.library.path", "absolute/path/to/gstreamer/bin");
 // Gst.init("GStreamer Test");
 System.out.println("GStreamer initialized successfully.");
 } catch (Exception e) {
 e.printStackTrace();
 System.out.println("Failed to initialize GStreamer.");
 }
 EventQueue.invokeLater(new Runnable() {
 public void run() {
 try {
 MMConverterInterface frame = new MMConverterInterface();
 frame.setVisible(true);
 } catch (Exception e) {
 e.printStackTrace();
 }
 }
 });
 }

 /**
 * Create the frame.
 */
 public MMConverterInterface() {
 
 // convert button
 
 btnConvert.addActionListener(e -> {
 
 try {
 
 if (sourceFileLabel.getText().equals("No file chosen...") || destinationFolderLabel.getText().equals("No folder selected...")) {
 JOptionPane.showMessageDialog(null, "Please select both an input file and a save location.", "Validation Error", JOptionPane.WARNING_MESSAGE);
 return;
 }
 
 File sourceFile = new File(sourceFileLabel.getText());
 File destinationFile;
 
 if (rdbtnNewRadioButton.isSelected()) {
 
 System.out.println("Converting HEIC to JPG...");
 
 String outputFileName = sourceFile.getName().replaceFirst("[.][^.]+$", ".jpg");
 
 // Call your conversion logic here
 
 destinationFile = new File(destinationFolderLabel.getText(), outputFileName);
 
 convertHeicToJpg(sourceFile, destinationFile);
 
 } else if (rdbtnNewRadioButton_1.isSelected()) {
 
 if (sourceFileLabel.getText().equals("No file chosen...") || destinationFolderLabel.getText().equals("No folder selected...")) {
 JOptionPane.showMessageDialog(null, "Please select both an input file and a save location.", "Validation Error", JOptionPane.WARNING_MESSAGE);
 return;
 }
 
 // Validate source file
 if (!sourceFile.exists() || !sourceFile.canRead()) {
 JOptionPane.showMessageDialog(null, "Source file does not exist or is not readable.", "File Error", JOptionPane.ERROR_MESSAGE);
 return;
 }
 
 // Validate destination folder
 String destinationPath = destinationFolderLabel.getText();
 if (destinationPath == null || destinationPath.isEmpty() || !(new File(destinationPath).isDirectory())) {
 JOptionPane.showMessageDialog(null, "Invalid destination folder.", "File Error", JOptionPane.ERROR_MESSAGE);
 return;
 }
 
 System.out.println("Converting MOV to AVCHD...");
 
 String currentDate = new SimpleDateFormat("yyyyMMdd").format(new Date());

 // Extract the file name without the extension
 String baseName = sourceFile.getName().replaceFirst("[.][^.]+$", "");

 // Sanitize the base name (replace invalid characters with '_')
 baseName = baseName.replaceAll("[^a-zA-Z0-9-_]", "_");
 
 String sanitizedFileName = baseName + "_" + currentDate;
 sanitizedFileName = sanitizedFileName.replaceAll("[^a-zA-Z0-9._-]", "_"); // Allow alphanumeric, '-', '_', and '.'

 destinationFile = new File(destinationPath, sanitizedFileName);
 
 
 /*
 // Ensure the destination file is writable
 if (!destinationFile.canWrite()) {
 JOptionPane.showMessageDialog(null, "Output file is not writable.", "File Error", JOptionPane.ERROR_MESSAGE);
 return;
 }
 */
 

 convertMovToAvchd(sourceFile, destinationFile);
 
 } else {
 
 JOptionPane.showMessageDialog(null, "Please select a conversion type.");
 
 }
 
 } catch (Exception ex) {
 
 JOptionPane.showMessageDialog(null, "Error: " + ex.getMessage(), "Conversion Error", JOptionPane.ERROR_MESSAGE);
 ex.printStackTrace();
 }
 
 
 });
 
 // cancel button:
 
 btnCancel.addActionListener(e -> {
 System.out.println("Operation canceled.");
 System.exit(0); // Close the application
 });

 }
 
 public void convertMovToAvchd(File sourceFile, File destinationFile) {
 avutil.av_log_set_level(avutil.AV_LOG_DEBUG);
 
 

 AVFormatContext inputFormatContext = null;
 AVFormatContext outputFormatContext = new AVFormatContext(null);
 AVCodecContext inputCodecContext = null;
 AVCodecContext outputCodecContext = null;

 try {
 // Validate input file
 if (!sourceFile.exists() || !sourceFile.canRead()) {
 System.out.println("Source file does not exist or is not readable: " + sourceFile.getAbsolutePath());
 return;
 }
 
 // Validate output file path using the validateFileCreation method
 if (!validateFileCreation(destinationFile)) {
 return; // Exit if destination file validation fails
 }

 // Validate output file path
 if (destinationFile.getParentFile() == null || !destinationFile.getParentFile().exists()) {
 System.out.println("Output directory does not exist: " + destinationFile.getParentFile());
 return;
 }
 if (!destinationFile.getParentFile().canWrite()) {
 System.out.println("Output directory is not writable: " + destinationFile.getParentFile());
 return;
 }

 // Open input file
 inputFormatContext = avformat.avformat_alloc_context();
 if (avformat.avformat_open_input(inputFormatContext, sourceFile.getAbsolutePath(), null, null) < 0) {
 System.out.println("Failed to open input file: " + sourceFile.getAbsolutePath());
 return;
 }

 // Find stream information
 if (avformat.avformat_find_stream_info(inputFormatContext, (PointerPointer) null) < 0) {
 System.out.println("Failed to retrieve input stream information.");
 return;
 }

 // Find video stream
 int videoStreamIndex = avformat.av_find_best_stream(inputFormatContext, avutil.AVMEDIA_TYPE_VIDEO, -1, -1, (AVCodec) null, 0);
 if (videoStreamIndex < 0) {
 System.out.println("Failed to find video stream in input file.");
 return;
 }

 // Initialize input codec context
 inputCodecContext = avcodec.avcodec_alloc_context3(null);
 avcodec.avcodec_parameters_to_context(inputCodecContext, inputFormatContext.streams(videoStreamIndex).codecpar());

 AVCodec decoder = avcodec.avcodec_find_decoder(inputCodecContext.codec_id());
 if (decoder == null || avcodec.avcodec_open2(inputCodecContext, decoder, (PointerPointer) null) < 0) {
 System.out.println("Failed to open video decoder.");
 return;
 }

 // Allocate output format context
 if (avformat.avformat_alloc_output_context2(outputFormatContext, null, "mpegts", destinationFile.getAbsolutePath()) < 0) {
 System.out.println("Failed to allocate output format context.");
 return;
 }

 // Initialize output codec
 AVCodec encoder = avcodec.avcodec_find_encoder_by_name("mpeg2video");
 if (encoder == null) {
 System.out.println("Failed to find MPEG2 video encoder.");
 return;
 }

 outputCodecContext = avcodec.avcodec_alloc_context3(encoder);
 if (outputCodecContext == null) {
 System.out.println("Failed to allocate output codec context.");
 return;
 }
 
 if ((outputFormatContext.oformat().flags() & avformat.AVFMT_GLOBALHEADER) != 0) {
 outputCodecContext.flags(outputCodecContext.flags() | avcodec.AV_CODEC_FLAG_GLOBAL_HEADER);
 }


 //outputCodecContext.codec_id(avcodec.AV_CODEC_ID_MPEG2VIDEO);
 outputCodecContext.codec_id(encoder.id());
 outputCodecContext.codec_type(avutil.AVMEDIA_TYPE_VIDEO);
 outputCodecContext.width(1920);
 outputCodecContext.height(1080);
 outputCodecContext.pix_fmt(avutil.AV_PIX_FMT_YUV420P);
 outputCodecContext.time_base(avutil.av_make_q(1, 25));
 outputCodecContext.bit_rate(4000000);
 outputCodecContext.gop_size(12);

 if ((outputFormatContext.oformat().flags() & avformat.AVFMT_GLOBALHEADER) != 0) {
 outputCodecContext.flags(outputCodecContext.flags() | avcodec.AV_CODEC_FLAG_GLOBAL_HEADER);
 }

 
 
 if (avcodec.avcodec_open2(outputCodecContext, encoder, (PointerPointer) null) < 0) {
 System.out.println("Failed to open video encoder.");
 return;
 }

 // Create output stream
 AVStream videoStream = avformat.avformat_new_stream(outputFormatContext, encoder);
 if (videoStream == null) {
 System.out.println("Failed to create video stream.");
 return;
 }

 avcodec.avcodec_parameters_from_context(videoStream.codecpar(), outputCodecContext);
 
 System.out.println("Destination file path before trying to open the file is: " + destinationFile);

 if ((outputFormatContext.oformat().flags() & avformat.AVFMT_NOFILE) == 0) {
 // Ensure the output path has the correct extension
 String outputPath = destinationFile.getAbsolutePath().replace("\\", "/") + ".avchd";
 System.out.println("Normalized output path: " + outputPath);

 // Try opening the output file
 int ret = avformat.avio_open(outputFormatContext.pb(), outputPath, avformat.AVIO_FLAG_WRITE);
 if (ret < 0) {
 BytePointer errorBuffer = new BytePointer(avutil.AV_ERROR_MAX_STRING_SIZE);
 avutil.av_strerror(ret, errorBuffer, errorBuffer.capacity());
 System.out.println("Failed to open output file: " + errorBuffer.getString());
 return;
 }
 }


 // Write header
 if (avformat.avformat_write_header(outputFormatContext, (PointerPointer) null) < 0) {
 System.out.println("Failed to write header to output file.");
 return;
 }


 // Packet processing loop
 AVPacket packet = new AVPacket();
 while (avformat.av_read_frame(inputFormatContext, packet) >= 0) {
 if (packet.stream_index() == videoStreamIndex) {
 if (avcodec.avcodec_send_packet(inputCodecContext, packet) >= 0) {
 AVFrame frame = avutil.av_frame_alloc();
 while (avcodec.avcodec_receive_frame(inputCodecContext, frame) >= 0) {
 if (avcodec.avcodec_send_frame(outputCodecContext, frame) >= 0) {
 AVPacket encodedPacket = new AVPacket();
 while (avcodec.avcodec_receive_packet(outputCodecContext, encodedPacket) >= 0) {
 encodedPacket.stream_index(videoStream.index());
 avformat.av_interleaved_write_frame(outputFormatContext, encodedPacket);
 avcodec.av_packet_unref(encodedPacket);
 }
 }
 avutil.av_frame_unref(frame);
 }
 avutil.av_frame_free(frame);
 }
 }
 avcodec.av_packet_unref(packet);
 }

 // Write trailer
 avformat.av_write_trailer(outputFormatContext);
 System.out.println("Conversion completed successfully.");
 
 if (avcodec.avcodec_send_frame(outputCodecContext, null) >= 0) {
 AVPacket encodedPacket = new AVPacket();
 while (avcodec.avcodec_receive_packet(outputCodecContext, encodedPacket) >= 0) {
 encodedPacket.stream_index(videoStream.index());
 avformat.av_interleaved_write_frame(outputFormatContext, encodedPacket);
 avcodec.av_packet_unref(encodedPacket);
 }
 }

 } catch (Exception e) {
 e.printStackTrace();
 } finally {
 // Cleanup
 avcodec.avcodec_free_context(inputCodecContext);
 avcodec.avcodec_free_context(outputCodecContext);
 avformat.avformat_close_input(inputFormatContext);

 if (outputFormatContext != null && outputFormatContext.pb() != null) {
 avformat.avio_closep(outputFormatContext.pb());
 }
 avformat.avformat_free_context(outputFormatContext);
 }
 }
 
 private boolean validateFileCreation(File destinationFile) {
 // Check if the parent directory exists and is writable
 File parentDir = destinationFile.getParentFile();
 if (parentDir == null || !parentDir.exists()) {
 System.out.println("Parent directory does not exist: " + parentDir);
 return false;
 }
 if (!parentDir.canWrite()) {
 System.out.println("Cannot write to parent directory: " + parentDir);
 return false;
 }

 // Check if the file exists and is writable
 if (destinationFile.exists()) {
 if (!destinationFile.canWrite()) {
 System.out.println("Destination file is not writable: " + destinationFile);
 return false;
 }
 } else {
 // If the file doesn't exist, try to create it to verify writability
 try {
 if (!destinationFile.createNewFile()) {
 System.out.println("Unable to create destination file: " + destinationFile);
 return false;
 }
 // Delete the file after successful creation to avoid residual files
 destinationFile.delete();
 } catch (IOException e) {
 System.out.println("File creation failed: " + e.getMessage());
 return false;
 }
 }

 return true;
 }
 
}





A few caveats :


- 

-
I did explore FFmpeg and GStreamer for this project. GStreamer was inconclusive, with available version for it that were too old for use with my current state of STS4.27 and Java 17, even if this version of Java is under long-term support...


-
I've used AI to tell me about the options and suggest ways to build this thing, since multimedia handling is very far away from my skillset. I don't have a good conceptual grasp of video formats and how they transfrom from one to another.








The issue, as I have identified it, occurs at these lines :


// Ensure the destination file is writable
 if (!destinationFile.canWrite()) {
 JOptionPane.showMessageDialog(null, "Output file is not writable.", "File Error", JOptionPane.ERROR_MESSAGE);
 return;
 }



^^ And this, while temporarily commented out for testing, it meant to compensate for an issue that occurs here in the conversion function :


if ((outputFormatContext.oformat().flags() & avformat.AVFMT_NOFILE) == 0) {
 // Ensure the output path has the correct extension
 String outputPath = destinationFile.getAbsolutePath().replace("\\", "/") + ".avchd";
 System.out.println("Normalized output path: " + outputPath);

 // Try opening the output file
 int ret = avformat.avio_open(outputFormatContext.pb(), outputPath, avformat.AVIO_FLAG_WRITE);
 if (ret < 0) {
 BytePointer errorBuffer = new BytePointer(avutil.AV_ERROR_MAX_STRING_SIZE);
 avutil.av_strerror(ret, errorBuffer, errorBuffer.capacity());
 System.out.println("Failed to open output file: " + errorBuffer.getString());
 return;
 }
 }



The idea here is that the avio_open() function requires the use of the a valid file path that it can open to be able to write it.


Padadoxically, the file conversion seems to work, but the project crashes with a fatal error in the console :


Selected file: E:\TestConveresions\sample_960x540.mov
Save location: E:\TestConveresions
Converting MOV to AVCHD...
Destination file path before trying to open the file is: E:\TestConveresions\sample_960x540_20241231
Normalized output path: E:/TestConveresions/sample_960x540_20241231.avchd
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffcffb0868b, pid=11020, tid=14436
#
# JRE version: OpenJDK Runtime Environment Temurin-21.0.5+11 (21.0.5+11) (build 21.0.5+11-LTS)
# Java VM: OpenJDK 64-Bit Server VM Temurin-21.0.5+11 (21.0.5+11-LTS, mixed mode, emulated-client, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
# Problematic frame:
# C 0x00007ffcffb0868b
#
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# E:\STS4 Workspace\MMConverter\hs_err_pid11020.log
[80.882s][warning][os] Loading hsdis library failed
#
# If you would like to submit a bug report, please visit:
# https://github.com/adoptium/adoptium-support/issues
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
[AVFormatContext @ 000002528adcea40] Opening 'E:\TestConveresions\sample_960x540.mov' for reading
[file @ 000002528ae51c40] Setting default whitelist 'file,crypto,data'
[mov,mp4,m4a,3gp,3g2,mj2 @ 000002528adcea40] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 000002528adcea40] ISO: File Type Major Brand: qt 
[mov,mp4,m4a,3gp,3g2,mj2 @ 000002528adcea40] Unknown dref type 0x206c7275 size 12
[mov,mp4,m4a,3gp,3g2,mj2 @ 000002528adcea40] Processing st: 0, edit list 0 - media time: 2002, duration: 400410
[mov,mp4,m4a,3gp,3g2,mj2 @ 000002528adcea40] Offset DTS by 2002 to make first pts zero.
[mov,mp4,m4a,3gp,3g2,mj2 @ 000002528adcea40] Setting codecpar->delay to 2 for stream st: 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 000002528adcea40] Before avformat_find_stream_info() pos: 1320742 bytes read:38225 seeks:1 nb_streams:1
[h264 @ 000002528ae62780] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 000002528ae62780] Decoding VUI
[h264 @ 000002528ae62780] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 000002528ae62780] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 000002528ae62780] Decoding VUI
[h264 @ 000002528ae62780] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 000002528ae62780] nal_unit_type: 6(SEI), nal_ref_idc: 0
[h264 @ 000002528ae62780] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 000002528ae62780] Format yuv420p chosen by get_format().
[h264 @ 000002528ae62780] Reinit context to 960x544, pix_fmt: yuv420p
[h264 @ 000002528ae62780] no picture 
[mov,mp4,m4a,3gp,3g2,mj2 @ 000002528adcea40] All info found
[mov,mp4,m4a,3gp,3g2,mj2 @ 000002528adcea40] After avformat_find_stream_info() pos: 51943 bytes read:90132 seeks:2 frames:1
[h264 @ 000002528ae62780] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 000002528ae62780] Decoding VUI
[h264 @ 000002528ae62780] nal_unit_type: 8(PPS), nal_ref_idc: 3
[mpeg2video @ 000002528ae8e700] intra_quant_bias = 96 inter_quant_bias = 0




If I refer to the error log, I get this. It is partial, as I'm not sure SO will take all of it (quite long), but still might have enough to be relevant :


Host: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz, 8 cores, 31G, Windows 11 , 64 bit Build 26100 (10.0.26100.2454)


--------------- T H R E A D ---------------

Current thread (0x00000252d030b340): JavaThread "AWT-EventQueue-0" [_thread_in_native, id=14436, stack(0x000000a4e2b00000,0x000000a4e2c00000) (1024K)]

Stack: [0x000000a4e2b00000,0x000000a4e2c00000], sp=0x000000a4e2bfdf30, free space=1015k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C 0x00007ffcffb0868b

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j org.bytedeco.ffmpeg.global.avformat.avio_open(Lorg/bytedeco/ffmpeg/avformat/AVIOContext;Ljava/lang/String;I)I+0
j home.multimeida.mmconverter.MMConverterInterface.convertMovToAvchd(Ljava/io/File;Ljava/io/File;)V+1120
j home.multimeida.mmconverter.MMConverterInterface.lambda$2(Ljavax/swing/JRadioButton;Ljavax/swing/JRadioButton;Ljava/awt/event/ActionEvent;)V+347
j home.multimeida.mmconverter.MMConverterInterface$$Lambda+0x000002528c0c7778.actionPerformed(Ljava/awt/event/ActionEvent;)V+13
j javax.swing.AbstractButton.fireActionPerformed(Ljava/awt/event/ActionEvent;)V+84 java.desktop@21.0.5
j javax.swing.AbstractButton$Handler.actionPerformed(Ljava/awt/event/ActionEvent;)V+5 java.desktop@21.0.5
j javax.swing.DefaultButtonModel.fireActionPerformed(Ljava/awt/event/ActionEvent;)V+34 java.desktop@21.0.5
j javax.swing.DefaultButtonModel.setPressed(Z)V+117 java.desktop@21.0.5
j javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Ljava/awt/event/MouseEvent;)V+35 java.desktop@21.0.5
j java.awt.Component.processMouseEvent(Ljava/awt/event/MouseEvent;)V+64 java.desktop@21.0.5
j javax.swing.JComponent.processMouseEvent(Ljava/awt/event/MouseEvent;)V+23 java.desktop@21.0.5
J 2581 c1 java.awt.Component.processEvent(Ljava/awt/AWTEvent;)V java.desktop@21.0.5 (220 bytes) @ 0x00000252fa62719c [0x00000252fa627020+0x000000000000017c]
J 2580 c1 java.awt.Container.processEvent(Ljava/awt/AWTEvent;)V java.desktop@21.0.5 (22 bytes) @ 0x00000252fa627d9c [0x00000252fa627cc0+0x00000000000000dc]
J 2406 c1 java.awt.Component.dispatchEventImpl(Ljava/awt/AWTEvent;)V java.desktop@21.0.5 (785 bytes) @ 0x00000252fa670f14 [0x00000252fa670040+0x0000000000000ed4]
J 2325 c1 java.awt.Container.dispatchEventImpl(Ljava/awt/AWTEvent;)V java.desktop@21.0.5 (129 bytes) @ 0x00000252fa64e93c [0x00000252fa64e8a0+0x000000000000009c]
J 2608 c1 java.awt.LightweightDispatcher.retargetMouseEvent(Ljava/awt/Component;ILjava/awt/event/MouseEvent;)V java.desktop@21.0.5 (372 bytes) @ 0x00000252fa61c364 [0x00000252fa61b9e0+0x0000000000000984]
J 2578 c1 java.awt.LightweightDispatcher.processMouseEvent(Ljava/awt/event/MouseEvent;)Z java.desktop@21.0.5 (268 bytes) @ 0x00000252fa628a54 [0x00000252fa6284c0+0x0000000000000594]
J 2474 c1 java.awt.LightweightDispatcher.dispatchEvent(Ljava/awt/AWTEvent;)Z java.desktop@21.0.5 (73 bytes) @ 0x00000252fa699bbc [0x00000252fa699a60+0x000000000000015c]
J 2325 c1 java.awt.Container.dispatchEventImpl(Ljava/awt/AWTEvent;)V java.desktop@21.0.5 (129 bytes) @ 0x00000252fa64e914 [0x00000252fa64e8a0+0x0000000000000074]
J 2473 c1 java.awt.Window.dispatchEventImpl(Ljava/awt/AWTEvent;)V java.desktop@21.0.5 (23 bytes) @ 0x00000252fa699654 [0x00000252fa6994e0+0x0000000000000174]
J 1838 c1 java.awt.EventQueue.dispatchEventImpl(Ljava/awt/AWTEvent;Ljava/lang/Object;)V java.desktop@21.0.5 (139 bytes) @ 0x00000252fa3bec64 [0x00000252fa3beb20+0x0000000000000144]
J 1837 c1 java.awt.EventQueue$4.run()Ljava/lang/Void; java.desktop@21.0.5 (60 bytes) @ 0x00000252fa3c0504 [0x00000252fa3c0460+0x00000000000000a4]
J 1836 c1 java.awt.EventQueue$4.run()Ljava/lang/Object; java.desktop@21.0.5 (5 bytes) @ 0x00000252fa3c0a04 [0x00000252fa3c09c0+0x0000000000000044]
J 1778 c1 java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;Ljava/security/AccessControlContext;)Ljava/lang/Object; java.base@21.0.5 (22 bytes) @ 0x00000252fa4601d4 [0x00000252fa45ffa0+0x0000000000000234]
J 1832 c1 java.awt.EventQueue.dispatchEvent(Ljava/awt/AWTEvent;)V java.desktop@21.0.5 (80 bytes) @ 0x00000252fa44f14c [0x00000252fa44eae0+0x000000000000066c]
J 1846 c1 java.awt.EventDispatchThread.pumpOneEventForFilters(I)V java.desktop@21.0.5 (106 bytes) @ 0x00000252fa3ba544 [0x00000252fa3ba2e0+0x0000000000000264]
j java.awt.EventDispatchThread.pumpEventsForFilter(ILjava/awt/Conditional;Ljava/awt/EventFilter;)V+35 java.desktop@21.0.5
j java.awt.EventDispatchThread.pumpEventsForHierarchy(ILjava/awt/Conditional;Ljava/awt/Component;)V+11 java.desktop@21.0.5
j java.awt.EventDispatchThread.pumpEvents(ILjava/awt/Conditional;)V+4 java.desktop@21.0.5
j java.awt.EventDispatchThread.pumpEvents(Ljava/awt/Conditional;)V+3 java.desktop@21.0.5
j java.awt.EventDispatchThread.run()V+9 java.desktop@21.0.5
v ~StubRoutines::call_stub 0x00000252fa08100d

siginfo: EXCEPTION_ACCESS_VIOLATION (0xc0000005), writing address 0x0000000000000000




If anyone has a perspective on this, it'd be appreciated.


The catch 22 in this project is that pre-creating the file is not a good idea, since avio_open has a purpose in-built method for that (I tried). Error checking everything about Java's File class in terms of setting pathways and creating and deleting files is not problematic. Likewise, permissions are all fine (Full Control in source and target folders) ; I've tested default C drive folders, which have restritions, to a separate volume and removable media, to no effect. Likewise, FFmpeg requires a forward slash, "/" in file paths, whereas Java does the backslash, generally. That's been handled with the replace method in the above conditioning, also to no effect.


The basic contradiction in the project seems to be that the error tries open a file that does not exist, with a valid source and destination file, and if I try to create a placeholder file wiht an acvhd extension at the event handling for the Convert button, it still errors out ; meanwhile, FFmpeg allegedly handles the file creation at its core, but requires a valid path to be passed ; I've tried with and without a filename, with and without an extension. I'm not able to resovle it.


The excessive error handling conditions are in an effort to isolate the problem, which I think I've done.


There also seems to be a compatibility between mpegts and acvhd, which is why I also had that format specified in the conversion function, without result.


I also have the idea to be able to do this without having to install any libraries locally or having to set path variables, which is an aspect that both GStreamer and FFmpeg have.


Nearest suggestion I've found is this : integrate ffmpeg with spring boot


AI remains hopeless for resolving this issue.


-
-
How to Choose the Optimal Multi-Touch Attribution Model for Your Organisation
13 mars 2023, par Erin — Analytics Tips -
make : *** [ffmpeg_g] Error 1
22 décembre 2014, par P C SAS3hi i am trying to install ffmpeg . i choose to do it from source because i am using a vps server so i did these steps i am using git command for getting source from github after compiling i got the below result
#cd ~/ffmpeg_sources
#git clone --depth 1 git://source.ffmpeg.org/ffmpeg
#cd ffmpeg
#PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib" --bindir="$HOME/bin" --enable-gpl --enable-nonfree --enable-libfdk_aac --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264
install prefix /root/ffmpeg_build
source path .
C compiler gcc
C library glibc
ARCH x86 (generic)
big-endian no
runtime cpu detection yes
yasm yes
MMX enabled yes
MMXEXT enabled yes
3DNow! enabled yes
3DNow! extended enabled yes
SSE enabled yes
SSSE3 enabled yes
AVX enabled yes
XOP enabled yes
FMA3 enabled yes
FMA4 enabled yes
i686 features enabled yes
CMOV is fast yes
EBX available yes
EBP available yes
debug symbols yes
strip symbols yes
optimize for size no
optimizations yes
static yes
shared no
postprocessing support yes
new filter support yes
network support yes
threading support pthreads
safe bitstream reader yes
SDL support no
opencl enabled no
texi2html enabled no
perl enabled yes
pod2man enabled yes
makeinfo enabled no
makeinfo supports HTML no
External libraries:
iconv libopus libx264
libfdk_aac libvorbis zlib
libmp3lame libvpx
Enabled decoders:
aac bfi gsm
aac_latm bink gsm_ms
aasc binkaudio_dct h261
ac3 binkaudio_rdft h263
ac3_fixed bintext h263i
adpcm_4xm bmp h263p
adpcm_adx bmv_audio h264
adpcm_afc bmv_video hevc
adpcm_ct brender_pix hnm4_video
adpcm_dtk c93 huffyuv
adpcm_ea cavs iac
adpcm_ea_maxis_xa cdgraphics idcin
adpcm_ea_r1 cdxl idf
adpcm_ea_r2 cinepak iff_byterun1
adpcm_ea_r3 cljr iff_ilbm
adpcm_ea_xas cllc imc
adpcm_g722 comfortnoise indeo2
adpcm_g726 cook indeo3
adpcm_g726le cpia indeo4
adpcm_ima_amv cscd indeo5
adpcm_ima_apc cyuv interplay_dpcm
adpcm_ima_dk3 dca interplay_video
adpcm_ima_dk4 dfa jacosub
adpcm_ima_ea_eacs dirac jpeg2000
adpcm_ima_ea_sead dnxhd jpegls
adpcm_ima_iss dpx jv
adpcm_ima_oki dsd_lsbf kgv1
adpcm_ima_qt dsd_lsbf_planar kmvc
adpcm_ima_rad dsd_msbf lagarith
adpcm_ima_smjpeg dsd_msbf_planar libfdk_aac
adpcm_ima_wav dsicinaudio libopus
adpcm_ima_ws dsicinvideo libvorbis
adpcm_ms dvbsub libvpx_vp8
adpcm_sbpro_2 dvdsub libvpx_vp9
adpcm_sbpro_3 dvvideo loco
adpcm_sbpro_4 dxa mace3
adpcm_swf dxtory mace6
adpcm_thp eac3 mdec
adpcm_vima eacmv metasound
adpcm_xa eamad microdvd
adpcm_yamaha eatgq mimic
aic eatgv mjpeg
alac eatqi mjpegb
alias_pix eightbps mlp
als eightsvx_exp mmvideo
amrnb eightsvx_fib motionpixels
amrwb escape124 movtext
amv escape130 mp1
anm evrc mp1float
ansi exr mp2
ape ffv1 mp2float
apng ffvhuff mp3
ass ffwavesynth mp3adu
asv1 fic mp3adufloat
asv2 flac mp3float
atrac1 flashsv mp3on4
atrac3 flashsv2 mp3on4float
atrac3p flic mpc7
aura flv mpc8
aura2 fourxm mpeg1video
avrn fraps mpeg2video
avrp frwu mpeg4
avs g2m mpegvideo
avui g723_1 mpl2
ayuv g729 msa1
bethsoftvid gif msmpeg4v1
msmpeg4v2 qcelp twinvq
msmpeg4v3 qdm2 txd
msrle qdraw ulti
mss1 qpeg utvideo
mss2 qtrle v210
msvideo1 r10k v210x
mszh r210 v308
mts2 ra_144 v408
mvc1 ra_288 v410
mvc2 ralf vb
mxpeg rawvideo vble
nellymoser realtext vc1
nuv rl2 vc1image
on2avc roq vcr1
opus roq_dpcm vima
paf_audio rpza vmdaudio
paf_video rv10 vmdvideo
pam rv20 vmnc
pbm rv30 vorbis
pcm_alaw rv40 vp3
pcm_bluray s302m vp5
pcm_dvd sami vp6
pcm_f32be sanm vp6a
pcm_f32le sgi vp6f
pcm_f64be sgirle vp7
pcm_f64le shorten vp8
pcm_lxf sipr vp9
pcm_mulaw smackaud vplayer
pcm_s16be smacker vqa
pcm_s16be_planar smc wavpack
pcm_s16le smvjpeg webp
pcm_s16le_planar snow webvtt
pcm_s24be sol_dpcm wmalossless
pcm_s24daud sonic wmapro
pcm_s24le sp5x wmav1
pcm_s24le_planar srt wmav2
pcm_s32be ssa wmavoice
pcm_s32le stl wmv1
pcm_s32le_planar subrip wmv2
pcm_s8 subviewer wmv3
pcm_s8_planar subviewer1 wmv3image
pcm_u16be sunrast wnv1
pcm_u16le svq1 ws_snd1
pcm_u24be svq3 xan_dpcm
pcm_u24le tak xan_wc3
pcm_u32be targa xan_wc4
pcm_u32le targa_y216 xbin
pcm_u8 text xbm
pcm_zork theora xface
pcx thp xl
pgm tiertexseqvideo xsub
pgmyuv tiff xwd
pgssub tmv y41p
pictor truehd yop
pjs truemotion1 yuv4
png truemotion2 zero12v
ppm truespeech zerocodec
prores tscc zlib
prores_lgpl tscc2 zmbv
ptx tta
Enabled encoders:
a64multi libopus pgmyuv
a64multi5 libvorbis png
aac libvpx_vp8 ppm
ac3 libvpx_vp9 prores
ac3_fixed libx264 prores_aw
adpcm_adx libx264rgb prores_ks
adpcm_g722 ljpeg qtrle
adpcm_g726 mjpeg r10k
adpcm_ima_qt movtext r210
adpcm_ima_wav mp2 ra_144
adpcm_ms mp2fixed rawvideo
adpcm_swf mpeg1video roq
adpcm_yamaha mpeg2video roq_dpcm
alac mpeg4 rv10
alias_pix msmpeg4v2 rv20
amv msmpeg4v3 s302m
ass msvideo1 sgi
asv1 nellymoser snow
asv2 pam sonic
avrp pbm sonic_ls
avui pcm_alaw srt
ayuv pcm_f32be ssa
bmp pcm_f32le subrip
cinepak pcm_f64be sunrast
cljr pcm_f64le svq1
comfortnoise pcm_mulaw targa
dca pcm_s16be tiff
dnxhd pcm_s16be_planar tta
dpx pcm_s16le utvideo
dvbsub pcm_s16le_planar v210
dvdsub pcm_s24be v308
dvvideo pcm_s24daud v408
eac3 pcm_s24le v410
ffv1 pcm_s24le_planar vorbis
ffvhuff pcm_s32be wavpack
flac pcm_s32le webvtt
flashsv pcm_s32le_planar wmav1
flashsv2 pcm_s8 wmav2
flv pcm_s8_planar wmv1
g723_1 pcm_u16be wmv2
gif pcm_u16le xbm
h261 pcm_u24be xface
h263 pcm_u24le xsub
h263p pcm_u32be xwd
huffyuv pcm_u32le y41p
jpeg2000 pcm_u8 yuv4
jpegls pcx zlib
libfdk_aac pgm zmbv
libmp3lame
Enabled hwaccels:
Enabled parsers:
aac dvd_nav mpegvideo
aac_latm dvdsub opus
ac3 flac png
adx gsm pnm
bmp h261 rv30
cavsvideo h263 rv40
cook h264 tak
dca hevc vc1
dirac mjpeg vorbis
dnxhd mlp vp3
dpx mpeg4video vp8
dvbsub mpegaudio vp9
Enabled demuxers:
aac h261 mxg
ac3 h263 nc
act h264 nistsphere
adf hevc nsv
adp hls nut
adx hnm nuv
aea ico ogg
afc idcin oma
aiff idf paf
amr iff pcm_alaw
anm ilbc pcm_f32be
apc image2 pcm_f32le
ape image2_alias_pix pcm_f64be
apng image2_brender_pix pcm_f64le
aqtitle image2pipe pcm_mulaw
asf image_bmp_pipe pcm_s16be
ass image_dpx_pipe pcm_s16le
ast image_exr_pipe pcm_s24be
au image_j2k_pipe pcm_s24le
avi image_jpeg_pipe pcm_s32be
avr image_jpegls_pipe pcm_s32le
avs image_pictor_pipe pcm_s8
bethsoftvid image_png_pipe pcm_u16be
bfi image_sgi_pipe pcm_u16le
bink image_sunrast_pipe pcm_u24be
bintext image_tiff_pipe pcm_u24le
bit image_webp_pipe pcm_u32be
bmv ingenient pcm_u32le
boa ipmovie pcm_u8
brstm ircam pjs
c93 iss pmp
caf iv8 pva
cavsvideo ivf pvf
cdg jacosub qcp
cdxl jv r3d
cine latm rawvideo
concat live_flv realtext
data lmlm4 redspark
daud loas rl2
dfa lrc rm
dirac lvf roq
dnxhd lxf rpl
dsf m4v rsd
dsicin matroska rso
dts mgsts rtp
dtshd microdvd rtsp
dv mjpeg sami
dxa mlp sap
ea mlv sbg
ea_cdata mm sdp
eac3 mmf sdr2
epaf mov segafilm
ffm mp3 shorten
ffmetadata mpc siff
filmstrip mpc8 sln
flac mpegps smacker
flic mpegts smjpeg
flv mpegtsraw smush
fourxm mpegvideo sol
frm mpl2 sox
g722 mpsub spdif
g723_1 msnwc_tcp srt
g729 mtv stl
gif mv str
gsm mvi subviewer
gxf mxf subviewer1
sup vc1t webvtt
swf vivo wsaud
tak vmd wsvqa
tedcaptions vobsub wtv
thp voc wv
tiertexseq vplayer xa
tmv vqf xbin
truehd w64 xmv
tta wav xwma
tty wc3 yop
txd webm_dash_manifest yuv4mpegpipe
vc1
Enabled muxers:
a64 ipod pcm_s24le
ac3 ircam pcm_s32be
adts ismv pcm_s32le
adx ivf pcm_s8
aiff jacosub pcm_u16be
amr latm pcm_u16le
asf lrc pcm_u24be
asf_stream m4v pcm_u24le
ass matroska pcm_u32be
ast matroska_audio pcm_u32le
au md5 pcm_u8
avi microdvd psp
avm2 mjpeg rawvideo
bit mkvtimestamp_v2 rm
caf mlp roq
cavsvideo mmf rso
crc mov rtp
dash mp2 rtp_mpegts
data mp3 rtsp
daud mp4 sap
dirac mpeg1system segment
dnxhd mpeg1vcd smjpeg
dts mpeg1video smoothstreaming
dv mpeg2dvd sox
eac3 mpeg2svcd spdif
f4v mpeg2video spx
ffm mpeg2vob srt
ffmetadata mpegts stream_segment
filmstrip mpjpeg swf
flac mxf tee
flv mxf_d10 tg2
framecrc null tgp
framemd5 nut truehd
g722 oga uncodedframecrc
g723_1 ogg vc1
gif oma vc1t
gxf opus voc
h261 pcm_alaw w64
h263 pcm_f32be wav
h264 pcm_f32le webm
hds pcm_f64be webm_dash_manifest
hevc pcm_f64le webp
hls pcm_mulaw webvtt
ico pcm_s16be wtv
ilbc pcm_s16le wv
image2 pcm_s24be yuv4mpegpipe
image2pipe
Enabled protocols:
cache http rtmpt
concat httpproxy rtp
crypto icecast srtp
data md5 subfile
ffrtmphttp mmsh tcp
file mmst udp
ftp pipe udplite
gopher rtmp unix
hls
Enabled filters:
adelay dejudder pad
aecho delogo pan
aeval deshake perms
aevalsrc drawbox perspective
afade drawgrid phase
aformat earwax pixdesctest
ainterleave ebur128 pp
allpass edgedetect psnr
alphaextract elbg pullup
alphamerge equalizer removelogo
amerge extractplanes replaygain
amix fade rgbtestsrc
amovie field rotate
anull fieldmatch sab
anullsink fieldorder scale
anullsrc flanger select
apad format sendcmd
aperms fps separatefields
aphaser framepack setdar
aresample framestep setfield
aselect geq setpts
asendcmd gradfun setsar
asetnsamples haldclut settb
asetpts haldclutsrc showcqt
asetrate hflip showinfo
asettb highpass showspectrum
ashowinfo histeq showwaves
asplit histogram shuffleplanes
astats hqdn3d signalstats
astreamsync hqx silencedetect
atempo hue silenceremove
atrim idet sine
avectorscope il smartblur
bandpass interlace smptebars
bandreject interleave smptehdbars
bass join split
bbox kerndeint spp
biquad lenscorrection stereo3d
blackdetect life super2xsai
blackframe lowpass swapuv
blend lut telecine
boxblur lut3d testsrc
cellauto lutrgb thumbnail
channelmap lutyuv tile
channelsplit mandelbrot tinterlace
codecview mcdeint transpose
color mergeplanes treble
colorbalance movie trim
colorchannelmixer mp unsharp
colorlevels mpdecimate uspp
colormatrix mptestsrc vflip
compand negate vignette
concat noformat volume
copy noise volumedetect
crop null w3fdif
cropdetect nullsink xbr
curves nullsrc yadif
dctdnoiz overlay zoompan
decimate owdenoise
Enabled bsfs:
aac_adtstoasc imx_dump_header mp3_header_decompress
chomp mjpeg2jpeg noise
dump_extradata mjpega_dump_header remove_extradata
h264_mp4toannexb mov2textsub text2movsub
Enabled indevs:
dv1394 lavfi v4l2
fbdev oss
Enabled outdevs:
fbdev oss v4l2
License: nonfree and unredistributable
Creating config.mak, config.h, and doc/config.texi...
config.h is unchanged
config.asm is unchanged
libavutil/avconfig.h is unchangednow i am trying to run make command but getting the following error
make
POD doc/ffmpeg.pod
POD doc/ffprobe.pod
POD doc/ffserver.pod
POD doc/ffmpeg-all.pod
POD doc/ffprobe-all.pod
POD doc/ffserver-all.pod
MAN doc/ffmpeg.1
MAN doc/ffprobe.1
MAN doc/ffserver.1
MAN doc/ffmpeg-all.1
MAN doc/ffprobe-all.1
MAN doc/ffserver-all.1
LD ffmpeg_g
libavcodec/libavcodec.a(tiertexseqv.o): In function `seq_decode_op1':
/root/ffmpeg_sources/ffmpeg/libavcodec/tiertexseqv.c:111: undefined reference to `ff_log2_tab'
libavcodec/libavcodec.a(xsubdec.o): In function `decode_frame':
/root/ffmpeg_sources/ffmpeg/libavcodec/xsubdec.c:121: undefined reference to `ff_log2_tab'
libavcodec/libavcodec.a(xsubenc.o): In function `put_xsub_rle':
/root/ffmpeg_sources/ffmpeg/libavcodec/xsubenc.c:45: undefined reference to `ff_log2_tab'
/root/ffmpeg_sources/ffmpeg/libavcodec/xsubenc.c:45: undefined reference to `ff_log2_tab'
/root/ffmpeg_sources/ffmpeg/libavcodec/xsubenc.c:45: undefined reference to `ff_log2_tab'
libavcodec/libavcodec.a(aacps.o):/root/ffmpeg_sources/ffmpeg/libavcodec/aacps.c:196: more undefined references to `ff_log2_tab' follow
collect2: ld returned 1 exit status
make: *** [ffmpeg_g] Error 1can anyone help me for it . thank you in advance