About ffmpeg results (e.g. storage location)

Asked 2 years ago, Updated 2 years ago, 116 views

I don't know where to save the video after encoding it using ffmpeg.
After using ffmpeg, the encoding ended without any errors, but I couldn't find the most important encoded file.
The command you executed is

ffmpeg-itest.mp4-threads2-codec:v libx264-s:v1280x720-aspect:v16:9-b:v256k-map0-f segment-segment_format mpegts-segment_time10-segment_list stream.m3 u8streamfiles/stream%03dts

This is the directory called streamfiles, right?
/usr/share/nginx/www/streamfiles and test.mp4 is in this directory.

Also, ffmpeg results are

ffmpeg version N-75926-gce0834b Copyright (c) 2000-2015 the FFmpeg developers
  build with gcc 4.6 (Debian 4.6.3-14 + rpi1)
  configuration:--arch=armel--target-os=linux--enable-shared--enable-gpl--enable-libx264--enable-nonfree
  libavutil 55.3.100 / 55.3.100
  libavcodec 57.5.100 / 57.5.100
  libavformat 57.3.100/57.3.100
  libavdevice 57.0.100/57.0.100
  libavfilter 6.11.100 / 6.11.100
  libswscale 4.0.100 / 4.0.100
  libswresample 2.0.100 / 2.0.100
  libpostproc54.0.100/54.0.100
Input#0,mov,mp4,m4a,3gp,3g2,mj2,from 'test.mp4':
  Metadata:
    major_brand —isom
    minor_version —512
    compatible_brands —isomiso2avc1mp41
    encoder:Lavf56.40.100
  Duration: 00:00:03.28, start: 0.000000, bitrate: 10159 kb/s
    Stream #0:0(und): Video: h264(High) (avc1/0x31637661), yuv420p, 1920x1080, 10156kb/s, 25fps, 25tbr, 1200ktbn, 2400ktbc (default)
    Metadata:
      handler_name —VideoHandler
Illegal instruction

That's what happened.
It's encoded, right?
If it is successful, where are the encoded files stored...
Please let me know if you understand.

Now we know that this is an error and is failing!
I've heard about cross-compilation in the past, but this time I'm running it directly on raspi.

ffmpeg

2022-09-30 18:47

3 Answers

Illegal instruction is a error that the CPU displays when trying to execute an incomprehensible instruction. Error messages detected by ffmpeg and displayed by ffmpeg are clearly displayed, such as red letters, which are happening at a lower level.

So, what's more specific is

  • Ffmpeg (or related libraries) bugged
  • ./configure has the wrong option
    (Sometimes optimization is done with instructions that are only available on a particular CPU)
  • cross-compile ./configure without specifying a target environment
    (If you do not specify an option, you will configure optimization settings for your environment.)

It may be one of the following:

Looking at the past questions, it seems that there have been a lot of trial and error, but I don't know exactly which step is wrong because I don't know how to build libx264 or ffmpeg in the end.

However, if you don't add --extra-cflags='-march=armv6' --extra-ldflags='-march=armv6' in libx264's ./configure, you might end up using an unsupported instruction (probably Illegal instruction).

https://trac.ffmpeg.org/wiki/CompilationGuide/RaspberryPi?confirm_email=&email_confirm=&action=diff&version=7&old_version=6


2022-09-30 18:47

If you add the --extra-cflags='-march=armv6' --extra-ldflags='-march=armv6' option to ./configure and make it
common/arm/quant-a.S:Assembler messages:
common/arm/quant-a.S:362:Error: selected processor does not support ARM mode rbit r1,r1'
common/arm/quant-a.S:363:Error: selected processor does not support ARM mode
rbit r1,r1'
Makefile:217:recipe for target'common/arm/quant-a.o'failed
make:*** [common/arm/quant-a.o] Error 1
The error occurred.
I understand that ARM mode is not supported, but will armv6 be changed to armv7?
How do I deal with this?


2022-09-30 18:47

It's a new question.I'd like you to make a new statement, but for now...

raspberry-pi What is it? raspberry-pi2model B What is it?
In short, is the CPU BCM2835 or BCM2836?

raspberry-pi2modelBis BCM2836that is, armv7
raspberry-pi is BCM2835 that is, armv6
rbit is OK if armv7 is not available in armv6

$./config.guess
armv7l-unknown-linux-gnueabihf

That's what happened.
Perhaps raspberry-pi2model B works without --extra-cflags.

Same

$./configure -- extra-cflags='-march=armv7'
No working C compiler found

So I think it's useless to specify it recklessly.


2022-09-30 18:47

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.