Giter Site home page Giter Site logo

Comments (11)

xat avatar xat commented on August 17, 2024

can you update to the latest castnow version and run it with --debug and then paste the output here?

from castnow.

ahmet2mir avatar ahmet2mir commented on August 17, 2024

[core] launching...
[localfile] started webserver on address 192.168.1.93 using port 60661
[transcode] started webserver on address 192.168.1.93 using port 48881
[core] player status: loading plugins
[core] player status: scanning
[core] player status: connecting
[core] player status: launching
[core] player status: loading
[transcode] incoming request for path http://192.168.1.93:60661/0
[localfile] incoming request serving ./myvideo.avi
[transcode] transcoding error [Error: FFmpeg error: Stream mapping:]

from castnow.

xat avatar xat commented on August 17, 2024

Thank You. I guess I have to setup a VM with the latest ubuntu version (with avconv) to be able to debug this.

from castnow.

ahmet2mir avatar ahmet2mir commented on August 17, 2024

You can use Vagrant https://docs.vagrantup.com/v2/installation/, I published a testing environment in my repo

git clone https://github.com/ahmet2mir/vagrant-castnow
cd vagrant-castnow
vagrant up # will download trusty image then install castnow
vagrant ssh # ssh the image

In the image

wget http://mirrorblender.top-ix.org/peach/bigbuckbunny_movies/big_buck_bunny_1080p_h264.mov
wget http://mirrorblender.top-ix.org/peach/bigbuckbunny_movies/big_buck_bunny_1080p_surround.avi

#works
castnow ./big_buck_bunny_1080p_h264.mov --myip <ip of image> 
#failed
castnow ./big_buck_bunny_1080p_surround.avi --tomp4 --myip <ip of image> --debug

Quit image and destroy it

vagrant destroy

You can test ffmpeg, it works

from castnow.

xat avatar xat commented on August 17, 2024

Thanks for the Vagrant instructions, it helped me to quickly set it up and reproduce the problem. :-)

Here are my findings:

The actual ffmpeg command which is created by the stream-transcode-module to transcode the input file on the fly is this:

ffmpeg -i - -vcodec h264 -f mp4 -movflags frag_keyframe+faststart -strict experimental pipe:1

You can test it separated from castnow like this:

cat video.avi | ffmpeg -i - -vcodec h264 -f mp4 -movflags frag_keyframe+faststart -strict experimental pipe:1

The Problem seems to be caused by the faststart option. If that is removed, transcoding works. So avconv seems to have a problem with that particular option.

I'm not quite sure if we need the faststart option. Maybe it could just be workarouned for avconv-users like this (update to castnow v0.4.2 before, there was a bug with custom ffmpeg options):

castnow video.avi --tomp4 --ffmpeg-movflags frag_keyframe

from castnow.

ahmet2mir avatar ahmet2mir commented on August 17, 2024

It works! Awesome!

castnow ./myvideo.avi --tomp4 --ffmpeg-movflags frag_keyframe --myip 192.168.1.1

Thanks for your help and your time.

from castnow.

ahmet2mir avatar ahmet2mir commented on August 17, 2024

Still have the issue on Debian Wheezy

castnow ./big_buck_bunny_1080p_surround.avi --tomp4 --ffmpeg-movflags faststart --myip 192.168.1.74 --debug
[core] launching...
[localfile] started webserver on address 192.168.1.74 using port 34488
[transcode] started webserver on address 192.168.1.74 using port 59367
[core] player status: loading plugins
[core] player status: scanning
[core] player status: connecting
[core] player status: launching
[core] player status: loading
[transcode] incoming request for path http://192.168.1.74:34488/0
[localfile] incoming request serving ./big_buck_bunny_1080p_surround.avi
[transcode] transcoding error [Error: FFmpeg error: Stream mapping:]

You can test with the same repo of my vagrant ubuntu, you have Vagrantfile.debian and install.sh.debian, juste remove .debian and vagrant up :)

For Debian, you need to replace h264 by libx264 in transcode.js (in install script)

from castnow.

xat avatar xat commented on August 17, 2024

I can reproduce it and will look into it :)

from castnow.

xat avatar xat commented on August 17, 2024

Hmm, this is the full error:

vagrant@castnow:~/castnow$ cat ./big_buck_bunny_1080p_surround.avi | ffmpeg -i - -vcodec libx264 -f mp4 -movflags frag_keyframe -strict experimental pipe:1
avconv version 0.8.16-6:0.8.16-1, Copyright (c) 2000-2014 the Libav developers
  built on Sep 16 2014 23:10:48 with gcc 4.7.2
Input #0, avi, from 'pipe:':
  Metadata:
    encoder         : AVI-Mux GUI 1.17.7, Aug  8 2006  20:59:17
    JUNK            : 
  Duration: 00:09:56.45, start: 0.000000, bitrate: N/A
    Stream #0.0: Video: mpeg4 (Simple Profile), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 24 tbr, 24 tbn, 24 tbc
    Stream #0.1: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
[buffer @ 0xb206c0] w:1920 h:1080 pixfmt:yuv420p
[libx264 @ 0xb24920] using SAR=1/1
[libx264 @ 0xb24920] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle Cache64
[libx264 @ 0xb24920] profile Main, level 4.0
[libx264 @ 0xb24920] 264 - core 123 r2189 35cf912 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=0 b_adapt=1 b_bias=0 direct=1 weightb=0 open_gop=1 weightp=2 keyint=250 keyint_min=24 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.25 aq=1:1.00
[mp4 muxer @ 0x1312c60] [Eval @ 0x7fff4c375e50] Undefined constant or missing '(' in 'frag_keyframe'
[mp4 muxer @ 0x1312c60] Unable to parse option value "frag_keyframe"
[mp4 muxer @ 0x1312c60] Error setting option movflags to value frag_keyframe.
Output #0, mp4, to 'pipe:1':
  Metadata:
    encoder         : AVI-Mux GUI 1.17.7, Aug  8 2006  20:59:17
    JUNK            : 
    Stream #0.0: Video: libx264, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], q=-1--1, 90k tbn, 24 tbc
    Stream #0.1: Audio: aac, 48000 Hz, 5.1, s16, 200 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg4 -> libx264)
  Stream #0:1 -> #0:1 (ac3 -> aac)
Could not write header for output file #0 (incorrect codec parameters ?)

Seems it has todo something with the bug mentioned here:

https://bugzilla.libav.org/show_bug.cgi?id=287

from castnow.

xat avatar xat commented on August 17, 2024

In that bug report they state "This flag simply doesn't exist in the 0.8 release.". So I guess you have to update to avconv 9.x in order to get it to work. The ubuntu VM had avconv v9.16 installed.. that should be the reason it worked there.

from castnow.

ahmet2mir avatar ahmet2mir commented on August 17, 2024

I change the vagrantfile to use jessie repo instead of wheezy.
Now libav-tools user version 6:11-2 and it works :)

from castnow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.