Search the Community
Showing results for tags 'OMX'.
-
Need help troubleshooting permissions for ffmpeg (raspberry Pi, OMX)
cachaca posted a topic in Linux
Ok.. I have been able to compile and install a custom ffmpeg with OMX (hardware encoding enabled) https://emby.media/community/index.php?/topic/36227-h264-omx-instead-of-x264/page-2 But when enabled in the Emby server.. it silently fails.. HOWEVER... When I copy/paste the command (for example): ffmpeg -i file:"/media/usb0/TV Shows/SpongeBob SquarePants (1999-2015) [480p] [720p] [HEVC] [x265]/Season 01/[pseudo] S01E02 Reef Blower [480p] [h.265].mkv" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_omx -b:v 2211644 -maxrate 2211644 -bufsize 4423288 -force_key_frames "expr:gte(t,n_forced*3)" -vf "scale=trunc(min(max(iw\,ih*dar)\,1280)/2)*2:trunc(ow/dar/2)*2" -copyts -vsync -1 -codec:a:0 aac -strict experimental -ac 2 -ab 192000 -f segment -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero -segment_time 3 -individual_header_trailer 0 -segment_format mpegts -segment_list_type m3u8 -segment_start_number 0 -segment_list "/tmp/transcoding-temp/e438c53f7db6725b084b892f6c3028cf.m3u8" -y "/tmp/transcoding-temp/e438c53f7db6725b084b892f6c3028cf%d.ts" and sudo as ROOT ... it DOES work. I am really confused.. tried changing the temp folder... and properly installing the ffmpeg (instead of running it from its source folder where I compiled it). so.. the fact that ROOT can run it.. leads me to think it is a permissions issue.. the funny thing is that without ANY other changes.. by simply switching OMX off in the Emby config.. it WORKS. It is as if the omx extension inside ffmpeg is trying to do something... like accessing hardware or another path.. that user emby does not have access to. It is a near silent failure... (since error 255 really does not mean anything). " 2017-04-25 04:22:01.7063 Info HttpServer: HTTP Response 500 to 192.168.50.74. Time: 28122ms (slow). http://192.168.50.60:8096/emby/videos/74d91a1ee63cfcb5cdc99751ba1b5c68/hls1/main/0.ts?DeviceId=4b23de016b5225894d6e76c8edb8536321d8b37b&MediaSourceId=74d91a1ee63cfcb5cdc99751ba1b5c68&VideoCodec=h264&AudioCodec=aac&AudioStreamIndex=1&VideoBitrate=193747394&AudioBitrate=192000&Level=51&Profile=high&PlaySessionId=52bf6796426d495ab39c16770487c4cf&CopyTimestamps=false&TranscodingMaxAudioChannels=6&EnableSubtitlesInManifest=false&Tag=24a43aa38dd13e58d36422fbc16ced9c&RequireAvc=true&RequireNonAnamorphic=false&DeInterlace=false&SegmentContainer=ts&MinSegments=2&BreakOnNonKeyFrames=False 2017-04-25 04:22:01.7081 Info App: ffmpeg -i file:"/media/usb0/TV Shows/SpongeBob SquarePants (1999-2015) [480p] [720p] [HEVC] [x265]/Season 01/[pseudo] S01E03 Tea at the Treedome [480p] [h.265].mkv" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_omx -b:v 1122230 -maxrate 1122230 -bufsize 2244460 -force_key_frames "expr:gte(t,n_forced*3)" -vf "scale=trunc(min(max(iw\,ih*dar)\,1280)/2)*2:trunc(ow/dar/2)*2" -copyts -vsync -1 -codec:a:0 aac -strict experimental -ac 2 -ab 192000 -f segment -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero -segment_time 3 -individual_header_trailer 0 -segment_format mpegts -segment_list_type m3u8 -segment_start_number 0 -segment_list "/var/tmp/transcoding-temp/transcoding-temp/aa6d990b7ad85df3cb9e9a131f4da08d.m3u8" -y "/var/tmp/transcoding-temp/transcoding-temp/aa6d990b7ad85df3cb9e9a131f4da08d%d.ts" 2017-04-25 04:22:02.1496 Info App: FFMpeg exited with code 255 2017-04-25 04:22:02.1643 Info App: returning /var/tmp/transcoding-temp/transcoding-temp/aa6d990b7ad85df3cb9e9a131f4da08d0.ts " And again.. if I take that line to my prompt and run it with sudo.. it WORKS: root@avcenter:/tmp# ffmpeg -i file:"/media/usb0/TV Shows/SpongeBob SquarePants (1999-2015) [480p] [720p] [HEVC] [x265]/Season 01/[pseudo] S01E03 Tea at the Treedome [480p] [h.265].mkv" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_omx -b:v 1122230 -maxrate 1122230 -bufsize 2244460 -force_key_frames "expr:gte(t,n_forced*3)" -vf "scale=trunc(min(max(iw\,ih*dar)\,1280)/2)*2:trunc(ow/dar/2)*2" -copyts -vsync -1 -codec:a:0 aac -strict experimental -ac 2 -ab 192000 -f segment -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero -segment_time 3 -individual_header_trailer 0 -segment_format mpegts -segment_list_type m3u8 -segment_start_number 0 -segment_list "/var/tmp/transcoding-temp/transcoding-temp/aa6d990b7ad85df3cb9e9a131f4da08d.m3u8" -y "/var/tmp/transcoding-temp/transcoding-temp/aa6d990b7ad85df3cb9e9a131f4da08d%d.ts" ffmpeg version N-85641-gdd49eff Copyright (c) 2000-2017 the FFmpeg developers built with gcc 4.9.2 (Raspbian 4.9.2-10) configuration: --enable-gpl --enable-nonfree --enable-mmal --enable-omx --enable-omx-rpi --enable-libmp3lame --enable-libx264 --enable-libvorbis libavutil 55. 61.100 / 55. 61.100 libavcodec 57. 93.100 / 57. 93.100 libavformat 57. 72.101 / 57. 72.101 libavdevice 57. 7.100 / 57. 7.100 libavfilter 6. 86.100 / 6. 86.100 libswscale 4. 7.101 / 4. 7.101 libswresample 2. 8.100 / 2. 8.100 libpostproc 54. 6.100 / 54. 6.100 Input #0, matroska,webm, from 'file:/media/usb0/TV Shows/SpongeBob SquarePants (1999-2015) [480p] [720p] [HEVC] [x265]/Season 01/[pseudo] S01E03 Tea at the Treedome [480p] [h.265].mkv': Metadata: encoder : libebml v1.3.1 + libmatroska v1.4.2 creation_time : 2016-02-06T18:59:27.000000Z Duration: 00:11:03.73, start: 0.000000, bitrate: 561 kb/s Stream #0:0: Video: hevc (Main), yuv420p(tv), 704x480 [SAR 10:11 DAR 4:3], 29.97 fps, 29.97 tbr, 1k tbn, 29.97 tbc (default) Metadata: BPS : 469945 BPS-eng : 469945 DURATION : 00:11:03.729000000 DURATION-eng : 00:11:03.729000000 NUMBER_OF_FRAMES: 19892 NUMBER_OF_FRAMES-eng: 19892 NUMBER_OF_BYTES : 38989538 NUMBER_OF_BYTES-eng: 38989538 _STATISTICS_WRITING_APP: mkvmerge v8.4.0 ('A better way to fly') 64bit _STATISTICS_WRITING_APP-eng: mkvmerge v8.4.0 ('A better way to fly') 64bit _STATISTICS_WRITING_DATE_UTC: 2016-02-06 18:59:27 _STATISTICS_WRITING_DATE_UTC-eng: 2016-02-06 18:59:27 _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:1(eng): Audio: aac (LC), 48000 Hz, stereo, fltp (default) Metadata: BPS : 88626 BPS-eng : 88626 DURATION : 00:11:03.701000000 DURATION-eng : 00:11:03.701000000 NUMBER_OF_FRAMES: 31111 NUMBER_OF_FRAMES-eng: 31111 NUMBER_OF_BYTES : 7352727 NUMBER_OF_BYTES-eng: 7352727 _STATISTICS_WRITING_APP: mkvmerge v8.4.0 ('A better way to fly') 64bit _STATISTICS_WRITING_APP-eng: mkvmerge v8.4.0 ('A better way to fly') 64bit _STATISTICS_WRITING_DATE_UTC: 2016-02-06 18:59:27 _STATISTICS_WRITING_DATE_UTC-eng: 2016-02-06 18:59:27 _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream mapping: Stream #0:0 -> #0:0 (hevc (native) -> h264 (h264_omx)) Stream #0:1 -> #0:1 (aac (native) -> aac (native)) Press [q] to stop, [?] for help [h264_omx @ 0x1d336a0] Using OMX.broadcom.video_encode Output #0, segment, to '/var/tmp/transcoding-temp/transcoding-temp/aa6d990b7ad85df3cb9e9a131f4da08d%d.ts': Metadata: encoder : Lavf57.72.101 Stream #0:0: Video: h264 (h264_omx), yuv420p, 704x528 [SAR 1:1 DAR 4:3], q=2-31, 1122 kb/s, 29.97 fps, 90k tbn, 29.97 tbc (default) Metadata: encoder : Lavc57.93.100 h264_omx Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp, 192 kb/s (default) Metadata: encoder : Lavc57.93.100 aac frame= 7342 fps= 24 q=-0.0 Lsize=N/A time=00:04:05.16 bitrate=N/A speed=0.793x video:34589kB audio:5817kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown [aac @ 0x1d34aa0] Qavg: 1460.591 Exiting normally, received signal 2. I tried once changing the emby default user to root.. but it did nothing. ANY help would be greatly appreciated.. I feel like I survived the desert to die at the water fountain with a broken handle. TTFN- 19 replies
-
- ffmpeg
- permissions
-
(and 2 more)
 Tagged with: