Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid data found when processing input #222

Open
Cappe93 opened this issue Jan 13, 2023 · 1 comment
Open

Invalid data found when processing input #222

Cappe93 opened this issue Jan 13, 2023 · 1 comment

Comments

@Cappe93
Copy link

Cappe93 commented Jan 13, 2023

Greetings,
I'm currently having some troubles using the video compression on large videos, it returns me the following error:

2023-01-12 18:16:50,360 [http-nio-8080-exec-7 ] [33c58596-41d0-4f07-b4c2-8965765cdab2] DEBUG w.s.j.p.ffmpeg.DefaultFFMPEGLocator  - Os name is <linux> isWindows: false isMac: false
2023-01-12 18:16:50,360 [http-nio-8080-exec-7 ] [33c58596-41d0-4f07-b4c2-8965765cdab2] DEBUG w.s.j.p.ffmpeg.DefaultFFMPEGLocator  - Creating jave temp folder to place executables in </tmp/jave>
2023-01-12 18:16:50,361 [http-nio-8080-exec-7 ] [33c58596-41d0-4f07-b4c2-8965765cdab2] DEBUG w.s.j.p.ffmpeg.DefaultFFMPEGLocator  - Executable path: /tmp/jave/ffmpeg-amd64-3.0.1
2023-01-12 18:16:50,362 [http-nio-8080-exec-7 ] [33c58596-41d0-4f07-b4c2-8965765cdab2] DEBUG w.s.j.p.ffmpeg.DefaultFFMPEGLocator  - Need to copy executable to </tmp/jave/ffmpeg-amd64-3.0.1>
2023-01-12 18:16:50,362 [http-nio-8080-exec-7 ] [33c58596-41d0-4f07-b4c2-8965765cdab2] DEBUG w.s.j.p.ffmpeg.DefaultFFMPEGLocator  - Copy from resource <nativebin/ffmpeg-amd64> to target </tmp/jave/ffmpeg-amd64-3.0.1>
2023-01-12 18:16:50,362 [http-nio-8080-exec-7 ] [33c58596-41d0-4f07-b4c2-8965765cdab2] DEBUG w.s.j.p.ffmpeg.DefaultFFMPEGLocator  - Alternative copy from SystemResourceAsStream <ws/schild/jave/nativebin/ffmpeg-amd64> to target </tmp/jave/ffmpeg-amd64-3.0.1>
2023-01-12 18:16:50,362 [http-nio-8080-exec-7 ] [33c58596-41d0-4f07-b4c2-8965765cdab2] DEBUG w.s.j.p.ffmpeg.DefaultFFMPEGLocator  - Alternative copy from Thread.currentThread().getContextClassLoader() <ws/schild/jave/nativebin/ffmpeg-amd64> to target </tmp/jave/ffmpeg-amd64-3.0.1>
2023-01-12 18:16:51,947 [http-nio-8080-exec-7 ] [33c58596-41d0-4f07-b4c2-8965765cdab2] DEBUG w.s.j.p.ffmpeg.DefaultFFMPEGLocator  - Target </tmp/jave/ffmpeg-amd64-3.0.1> exists
2023-01-12 18:16:51,961 [http-nio-8080-exec-7 ] [33c58596-41d0-4f07-b4c2-8965765cdab2] DEBUG w.s.j.p.ffmpeg.DefaultFFMPEGLocator  - ffmpeg executable found: /tmp/jave/ffmpeg-amd64-3.0.1
2023-01-12 18:16:52,047 [http-nio-8080-exec-7 ] [33c58596-41d0-4f07-b4c2-8965765cdab2] DEBUG w.s.j.p.ffmpeg.DefaultFFMPEGLocator  - Os name is <linux> isWindows: false isMac: false
2023-01-12 18:16:52,047 [http-nio-8080-exec-7 ] [33c58596-41d0-4f07-b4c2-8965765cdab2] DEBUG w.s.j.p.ffmpeg.DefaultFFMPEGLocator  - Jave temp folder exists in </tmp/jave>
2023-01-12 18:16:52,047 [http-nio-8080-exec-7 ] [33c58596-41d0-4f07-b4c2-8965765cdab2] DEBUG w.s.j.p.ffmpeg.DefaultFFMPEGLocator  - Executable path: /tmp/jave/ffmpeg-amd64-3.0.1
2023-01-12 18:16:52,047 [http-nio-8080-exec-7 ] [33c58596-41d0-4f07-b4c2-8965765cdab2] DEBUG w.s.j.p.ffmpeg.DefaultFFMPEGLocator  - Executable exists in </tmp/jave/ffmpeg-amd64-3.0.1>
2023-01-12 18:16:52,048 [http-nio-8080-exec-7 ] [33c58596-41d0-4f07-b4c2-8965765cdab2] DEBUG w.s.j.p.ffmpeg.DefaultFFMPEGLocator  - ffmpeg executable found: /tmp/jave/ffmpeg-amd64-3.0.1
2023-01-12 18:16:52,145 [http-nio-8080-exec-7 ] [33c58596-41d0-4f07-b4c2-8965765cdab2] DEBUG w.schild.jave.process.ProcessWrapper  - About to execute /tmp/jave/ffmpeg-amd64-3.0.1 -f mp4 -i /tmp/source7487986526572441446mp4 -vcodec h264 -vb 160000 -r 15 -s 640x480 -movflags faststart -profile:v baseline -acodec aac -ab 64000 -ac 2 -ar 44100 -f mp4 -y /tmp/target6577105422244485239mp4 -hide_banner
2023-01-12 18:16:52,146 [http-nio-8080-exec-7 ] [33c58596-41d0-4f07-b4c2-8965765cdab2] DEBUG w.schild.jave.process.ProcessWrapper  - About to execute /tmp/jave/ffmpeg-amd64-3.0.1 -i /tmp/source7487986526572441446mp4 -hide_banner
2023-01-12 18:16:52,236 [http-nio-8080-exec-7 ] [33c58596-41d0-4f07-b4c2-8965765cdab2] DEBUG ws.schild.jave.MultimediaObject  - Output line: Input #0, matroska,webm, from '/tmp/source7487986526572441446mp4':
2023-01-12 18:16:52,239 [http-nio-8080-exec-7 ] [33c58596-41d0-4f07-b4c2-8965765cdab2] DEBUG ws.schild.jave.MultimediaObject  - Output line:   Metadata:
2023-01-12 18:16:52,239 [http-nio-8080-exec-7 ] [33c58596-41d0-4f07-b4c2-8965765cdab2] DEBUG ws.schild.jave.MultimediaObject  - Output line:     encoder         : QTmuxingAppLibWebM-0.0.1
2023-01-12 18:16:52,239 [http-nio-8080-exec-7 ] [33c58596-41d0-4f07-b4c2-8965765cdab2] DEBUG ws.schild.jave.MultimediaObject  - Output line:   Duration: N/A, start: -0.001000, bitrate: N/A
2023-01-12 18:16:52,239 [http-nio-8080-exec-7 ] [33c58596-41d0-4f07-b4c2-8965765cdab2] WARN  ws.schild.jave.MultimediaObject  - Invalid duration found   Duration: N/A, start: -0.001000, bitrate: N/A
2023-01-12 18:16:52,239 [http-nio-8080-exec-7 ] [33c58596-41d0-4f07-b4c2-8965765cdab2] DEBUG ws.schild.jave.MultimediaObject  - Output line:   Stream #0:0(eng): Video: vp8, yuv420p(progressive), 640x480, SAR 1:1 DAR 4:3, 10 fps, 10 tbr, 1k tbn, 1k tbc (default)
2023-01-12 18:16:52,240 [http-nio-8080-exec-7 ] [33c58596-41d0-4f07-b4c2-8965765cdab2] DEBUG ws.schild.jave.MultimediaObject  - Output line:   Stream #0:1(eng): Audio: opus, 48000 Hz, mono, fltp (default)
2023-01-12 18:16:52,241 [http-nio-8080-exec-7 ] [33c58596-41d0-4f07-b4c2-8965765cdab2] DEBUG ws.schild.jave.MultimediaObject  - Output line: At least one output file must be specified
2023-01-12 18:16:52,241 [http-nio-8080-exec-7 ] [33c58596-41d0-4f07-b4c2-8965765cdab2] DEBUG ws.schild.jave.MultimediaObject  - Output line: null
2023-01-12 18:16:52,330 [http-nio-8080-exec-7 ] [33c58596-41d0-4f07-b4c2-8965765cdab2] DEBUG w.s.jave.ConversionOutputAnalyzer  - Input Line (1): <[mov,mp4,m4a,3gp,3g2,mj2 @ 0x73bb040] moov atom not found>
2023-01-12 18:16:52,331 [http-nio-8080-exec-7 ] [33c58596-41d0-4f07-b4c2-8965765cdab2] DEBUG w.s.jave.ConversionOutputAnalyzer  - Input Line (2): </tmp/source7487986526572441446mp4: Invalid data found when processing input>
2023-01-12 18:16:52,331 [http-nio-8080-exec-7 ] [33c58596-41d0-4f07-b4c2-8965765cdab2] ERROR ws.schild.jave.Encoder  - Process exit code: 1  to target6577105422244485239mp4

The code we're using:

compressor.reduceVideoSizeWithCustomRes(videoBytes, VideoFormats.MP4, getIvSize(dto));
The method getIvSize simply sets height and width to respectively 480 and 640, the videos uploaded are 10 seconds long(registered via webcam).
We can't figure out the solution to this problem.

PS: we're using IVCompressor 2.0.2

@a-schild
Copy link
Owner

This video streams is corrupt, does not match the specifications.
We see a lot of such bad video files :(

When you run the command interactively, is the resulting output file still usable?

ffmpeg-amd64-3.0.1 -f mp4 -i /tmp/source7487986526572441446mp4 -vcodec h264 -vb 160000 -r 15 -s 640x480 -movflags faststart -profile:v baseline -acodec aac -ab 64000 -ac 2 -ar 44100 -f mp4 -y /tmp/target6577105422244485239mp4 -hide_banner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants